prometheus-pushgateway部署

https://www.cnblogs.com/xiaobaozi-95/p/10684524.html

https://www.cnblogs.com/xiao987334176/p/9933963.html

容器部署

docker run -d -p 9091:9091  -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -v /etc/timezone:/etc/timezone:ro  prom/pushgateway

  

在prometheus.yml中添加pushgateway的job信息,然后重启prometheus容器。

  - job_name: pushgateway
    static_configs:
      - targets: ['192.168.18.19:9091']
        labels:
          instance: pushgateway

  

Python Client

https://github.com/prometheus/client_python

原文地址:https://www.cnblogs.com/jabbok/p/13048896.html