侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

Pushgateway使用

2023-12-19 星期二 / 0 评论 / 0 点赞 / 140 阅读 / 795 字

#Pushgateway使用###简介prometheus只能主动向targe抓取数据, pushgateway添加一层网关,能让client端主动推送数据到prometheus 。###使用运行pu

#Pushgateway使用###简介prometheus只能主动向targe抓取数据, pushgateway添加一层网关,能让client端主动推送数据到prometheus 。

###使用运行pushgateway

docker run --rm -p 9091:9091 prom/pushgateway

配置prometheus添加target抓取pushgateway

target: "http://172.17.42.1:9091/metrics"

prometheus重新载入配置:

curl -s -XPOST localhost:9090/-/reload

推送数据到gateway

echo "some_metric 3.14" | curl --data-binary @- http://pushgateway.:9091/metrics/job/some_job

####参考https://pypi.python.org/pypi/prometheushttps://github.com/prometheus/pushgateway/blob/master/README.md

广告 广告

评论区