prometheus exporter 各种服务 docker-compose文件

整理了一些prometheus exporter docker-compose文件配置


node-exporter 服务器基础监控


version: '2'
networks:
  monitor:
    driver: bridge
services:
    node-exporter:
      image: quay.io/prometheus/node-exporter
      container_name: node-exporter
      hostname: node-exporter
      restart: always
      ports:
        - "9100:9100"
      networks:

redis-exporter 配置 docker-compose

version: '3'
services:
  redis-exporter:
    image: oliver006/redis_exporter
    restart: always
    command:
    - '--redis.addr=redis://10.x.x.x:6379'
    - '--redis.password=123456'
    ports:
    - '9121:9121'

nginx exporter 配置docker-compose

version: '3'
services:
  nginx-exporter-12:
    image: xxx.com/nginx-prometheus-exporter
    restart: always
    command:
    - '--nginx.scrape-uri=http://10.x.x.x:84/stub_status'
    ports:
    - '9113:9113'
  nginx-exporter-13:
    image: xxx.com/nginx-prometheus-exporter
    restart: always
    command:
    - '--nginx.scrape-uri=http://10.x.x.x:84/stub_status'
    ports:
    - '9113:9113'

rocketmq_exporter 配置docker-compose

version: '3'
services:
  rocketmq-exporter:
    image: xxx.com/rocketmq-exporter
    restart: always
    command:
    - '--rocketmq.config.namesrvAddr=10.x.x.x:9876'
    - '--rocketmq.config.rocketmqVersion=V4_8_0'
    ports:
    - '5557:5557'

blackbox_exporter 配置docker-compose ##域名监控

version: '3.7'
services:
  blackbox_exporter:
    container_name: blackbox_exporter
    image: xxx.com/blackbox-exporter:master
    volumes:
      - ./config.yml:/etc/blackbox_exporter/config.yml
    ports:
      - 9115:9115
    restart: always
    extra_hosts:
      - "www.163.com:172.17.3.1"

vim config.yml

modules:
  http_2xx:
    prober: http
    timeout: 8s
    http:
      valid_status_codes: []
      method: GET
      fail_if_body_not_matches_regexp: []
      tls_config:
        insecure_skip_verify: true
  springboot_actuator:
    prober: http
    timeout: 8s
    http:
      valid_status_codes: []
      method: GET
      fail_if_body_not_matches_regexp: ['"status":"UP"']
      tls_config:
        insecure_skip_verify: true

zookeeper-exporter

version: '3'
services:
  zookeeper-exporter-1:
    image: carlpett/zookeeper_exporter
    restart: always
    command:
      - '-zookeeper=172.x.x.x:4181'
    ports:
      - '9141:9141'
      
  zookeeper-exporter-2:
    image: carlpett/zookeeper_exporter
    restart: always
    command:
      - '-zookeeper=10.x.x.x:2181'
    ports:
      - '9142:9141'

kafka exporter

version: '3'
services: 
  kafka-exporter:
    image: bitnami/kafka-exporter:latest
    command:
      - '--kafka.server=192.168.1.x:9092'
      - '--kafka.server=192.168.1.x:9092'
    restart: always
    port:
      - "9308:9308"

elasticsearch-exporter

version: '3'
services: 
  elasticsearch-exporter:
    image: bitnami/elasticsearch-exporter:latest
    commmand:
      - '--es.uri:http://elasticsearch:9200'
    restart: always
    ports:
      - "9114:9114"

mysql exporter

services:
    mysqld-exporter:
      image: prom/mysqld-exporter
      container_name: mysqld-exporter
      hostname: mysqld-exporter
      restart: always
      ports:
        - "9104:9104"
      environment:
        - DATA_SOURCE_NAME=user:password@(192.168.2.169:3306)/

webhook-adapter

version: '3'
services:
  webhook-adapter:
    image: xx.com/library/webhook-adapter:latest
    ports:
      - "8081:80"
    container_name: webhook-adapter
    command:
      - "--adapter=/app/prometheusalert/wx.js=/wx=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx-d37c-499a-84c1-bf94c93aae4d"
    restart: always
  webhook-adapter-2:
    image: xxx.com/library/webhook-adapter:latest
    ports:
      - "8082:80"
    container_name: webhook-adapter-2
    command:
      - "--adapter=/app/prometheusalert/wx.js=/wx=https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxx-f0e9-4878-b7ee-be93d03e9a7c"
    restart: always
posted @ 2022-09-28 15:17  清风木  阅读(852)  评论(0编辑  收藏  举报