pushgateway
下载pushgateway
wget https://github.com/prometheus/pushgateway/releases/download/v0.9.0/pushgateway-0.9.0.freebsd-amd64.tar.gz
解压缩:tar -zxvf pushgateway-0.9.0.freebsd-amd64.tar.gz
启动: ./pushgateway
prometheus.yml中配置如下:
数据管理:
通过API向 {job='some_job'}中添加单条数据
echo "some_metric 3.14" | curl --data-binary @- http://localhost:9091/metrics/job/some_job
查看:
通过ip:9090,搜索{job='some_job'}可以查找到
删除某个组下的所有数据:
curl -X DELETE http://localhost:9091/metrics/job/some_job,删除之后,ip:9091/metrics和ip:/9090/graph中都不可见了;
越努力,越幸运!!!
good good study,day day up!!!