relabel_configs: - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_service_name, __meta_kubernetes_endpoint_port_name] action: keep regex: default;kubernetes;https - job_name: 'kubernetes-cadvisor' kubernetes_sd_configs: - role: node scheme: https tls_config: ca_file: /var/...
- static_configs: - targets: ["alertmanager:9093"] scrape_configs: - job_name: jvm **#java相关的监控需要在服务端集成agent** scrape_interval: 5s kubernetes_sd_configs: - role: endpoints relabel_configs: - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_jvm] action: keep ...
Docker部署Prometheus监控 1. 拉取所需的镜像docker pull prom/node-exporter # 用于机器系统数据收集docker pull prom/mysqld-exporter # 用于MySQL数据库数据收集docker pull google/cadvisor # 用于收集宿主机上的docker容器数据docker pull prom/prometheus docker Prometheus prometheus 监控 k8s Prometheus 是一个...
module: [http_2xx] relabel_configs: - source_labels: [__meta_kubernetes_service_annotation_prometheus_io_probe] action: keep regex: true - source_labels: [__address__] target_label: __param_target - target_label: __address__ replacement: blackbox-exporter.example.com:9115 - source_labels...
$ docker run -d -p 9090:9090 --name=prometheus \ -v /root/prometheus/conf/:/etc/prometheus/ \ prom/prometheus 使用官方镜像部署可以参考我的这篇文章:Docker部署Prometheus实现微信邮件报警。 2. 制作镜像 现在我们创建自己的Prometheus镜像,当然你也可以直接使用我制作的镜像 $ docker pull zhanganmin2017...
首先去Prometheus下载二进制文件安装包解压到package目录下,我的Dockerfile目录结构如下: $ tree prometheus-2.9.0/ prometheus-2.9.0/ ├── conf │ ├── CentOS7-Base-163.repo │ ├── container-entrypoint │ ├── epel-7.repo │ ├── prometheus-start.conf ...
- static_configs: - targets: # 告警规则配置 rule_files: # - "first_rules.yml" # 被监控端的配置,目前只有一个节点,就是prometheus本身 scrape_configs: - job_name: 'prometheus' static_configs: - targets: ['localhost:9090'] - job_name: 'prometheus docker' static_configs: - targets: ['10....
Alertmanager 可以通过static_configs参数静态配置,也可以使用其中一种支持的服务发现机制动态发现,我们上面的配置是静态的单实例。 此外,relabel_configs允许从发现的实体中选择 Alertmanager,并对使用的API路径提供高级修改,该路径通过__alerts_path__标签公开。
*<scrape_config>*<tls_config>*<azure_sd_config>*<consul_sd_config>*<digitalocean_sd_config>*<dockerswarm_sd_config>*<dns_sd_config>*<ec2_sd_config>*<openstack_sd_config>*<file_sd_config>*<gce_sd_config>*<hetzner_sd_config>*<kubernetes_sd_config>*<marathon_sd_config>*<nerve_sd_co...
You can set up the Docker daemon as a Prometheus target in such contexts too. Configure the metrics-addr of the daemon and add the address of the daemon as a scrape endpoint in your Prometheus configuration. - job_name: docker static_configs: - targets: ["docker.daemon.example:PORT"]...