Grafana 数据源普罗米修斯 404
Grafana Datasource Prometheus 404
我们正在使用 AWS EKS,我使用以下命令部署了 Promethus:
kubectl create namespace prometheus
helm install prometheus prometheus-community/prometheus \
--namespace prometheus \
--set alertmanager.persistentVolume.storageClass="gp2" \
--set server.persistentVolume.storageClass="gp2"
完成后,我收到此消息:
Prometheus 服务器可以通过集群中以下 DNS 名称上的端口 80 访问:
我的 prometheus 部署上的服务如下所示:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/prometheus-alertmanager ClusterIP 10.22.210.131 <none> 80/TCP 20h
service/prometheus-kube-state-metrics ClusterIP 10.12.43.248 <none> 8080/TCP 20h
service/prometheus-node-exporter ClusterIP None <none> 9100/TCP 20h
service/prometheus-pushgateway ClusterIP 10.130.54.42 <none> 9091/TCP 20h
service/prometheus-server ClusterIP 10.90.94.70 <none> 80/TCP 20h
我现在在 Grafana 的数据源中使用这个 URL 作为:
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://prometheus-alertmanager.prometheus.svc.cluster.local
access: proxy
isDefault: true
Grafana 也启动了,但是当默认数据源(在这种情况下为 prometheus)无法提取任何数据时,当我检查 Grafana 上的数据源选项卡并尝试测试数据源时,我收到读取 Prometheus 错误: client_error:客户端错误:404
因为这两个部署都在同一个集群上,理想情况下它应该能够访问它。
如有任何帮助,我们将不胜感激。
这是因为您定位了错误的服务。您正在使用警报管理器 url 而不是普罗米修斯服务器。
URL 应该是这个:
url: http://prometheus-server.prometheus.svc.cluster.local
我们正在使用 AWS EKS,我使用以下命令部署了 Promethus:
kubectl create namespace prometheus
helm install prometheus prometheus-community/prometheus \
--namespace prometheus \
--set alertmanager.persistentVolume.storageClass="gp2" \
--set server.persistentVolume.storageClass="gp2"
完成后,我收到此消息: Prometheus 服务器可以通过集群中以下 DNS 名称上的端口 80 访问:
我的 prometheus 部署上的服务如下所示:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/prometheus-alertmanager ClusterIP 10.22.210.131 <none> 80/TCP 20h
service/prometheus-kube-state-metrics ClusterIP 10.12.43.248 <none> 8080/TCP 20h
service/prometheus-node-exporter ClusterIP None <none> 9100/TCP 20h
service/prometheus-pushgateway ClusterIP 10.130.54.42 <none> 9091/TCP 20h
service/prometheus-server ClusterIP 10.90.94.70 <none> 80/TCP 20h
我现在在 Grafana 的数据源中使用这个 URL 作为:
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://prometheus-alertmanager.prometheus.svc.cluster.local
access: proxy
isDefault: true
Grafana 也启动了,但是当默认数据源(在这种情况下为 prometheus)无法提取任何数据时,当我检查 Grafana 上的数据源选项卡并尝试测试数据源时,我收到读取 Prometheus 错误: client_error:客户端错误:404
因为这两个部署都在同一个集群上,理想情况下它应该能够访问它。 如有任何帮助,我们将不胜感激。
这是因为您定位了错误的服务。您正在使用警报管理器 url 而不是普罗米修斯服务器。
URL 应该是这个:
url: http://prometheus-server.prometheus.svc.cluster.local