prometheus 配置http_sd_config服务发现 prometheus.yml global: scrape_interval: 60s evaluation_interval: 60s scrape_configs: - job_name: 'http-other' http_sd_configs: - url: http://my:8080/api/hosts - job_name: "node_exporter" static_configs: - targets: ['my:9100'] labels: instance: "...
- containerPort: 9090 name: http volumeMounts: - mountPath: "/etc/prometheus" name: config-volume - mountPath: "/prometheus" name: data resources: requests: cpu: 200m memory: 1024Mi limits: cpu: 200m memory: 1024Mi volumes: - name: data emptyDir: {} - configMap: name: prometheus-con...
称为远程热加载配置文件,在修改了prometheus.yml后可以直接远程刷新配置。刷新命令为:curl -XPOST http...
- job_name:'kubernetes-apiserver' #kubernetes_sd_configs:#基于 kubernetes_sd_configs 实现服务发现-role: endpoints#发现 endpoints,还有 node svc pod ingress等其他rolescheme: https#当前 jod 使用的发现协议tls_config:#证书配置ca_file:/var/run/secrets/kubernetes.io/serviceaccount/ca.crt#容器里的证书路...
1. promethues基于k8s的服务发现kubernetes_sd_configs 2. promethues基于consul的服务发现consul_sd_config 3. promethues基于Eureka的服务发现eureka_sd_config 还有基于DNS等等的就不一一列举。 下面主要讲解promethues基于的k8s服务发现kubernetes_sd_configs ...
http_sd_configs: - url:"http://cmdbIp:8080/queryAll' 这个yml文件里面,定义了两个job,分别为抓取127.0.0.1:9100这个监控Prometheus自身的job。第二个为我们自定义的http_sd_confgis,向我们的cmdb获取数据。这样,Prometheus就可以和我们本身的运维基础设施联动了。
<openstack_sd_config> <file_sd_config> <gce_sd_config> <hetzner_sd_config> <http_sd_config> <kubernetes_sd_config> <kuma_sd_config> <lightsail_sd_config> <linode_sd_config> <marathon_sd_config> <nerve_sd_config> <serverset_sd_config> ...
<azure_sd_config><consul_sd_config><digitalocean_sd_config><docker_sd_config><dockerswarm_sd_config><dns_sd_config><ec2_sd_config><openstack_sd_config><file_sd_config><gce_sd_config><hetzner_sd_config><http_sd_config><kubernetes_sd_config><kuma_sd_config><lightsail_sd_config><linode_...
http_sd_configs: url: http://127.0.0.1:8848/nacos/prometheus #prometheus run log ts=2024-06-09T18:29:25.243Z caller=refresh.go:80 level=error component="discovery manager scrape" discovery=http config=nacos-public msg="Unable to refresh target groups" err=""preserved.register.source" is...
- job_name: "prometheus" #每个被监控实例的集合用job_name命名,支持静态配置(static_configs)和动态服务发现的机制(*_sd_configs) # metrics_path defaults to '/metrics' # scheme defaults to 'http'. static_configs: #静态目标配置,固定从某个target拉取数据 - targets: ["localhost:9090"] (2)配置...