yunlzheng / prometheus-pusher Goto Github PK
View Code? Open in Web Editor NEWcollection jobs/exportes data and push to pushgateway
collection jobs/exportes data and push to pushgateway
能看懂中文么?我就不写英语了。
我使用docker-compose启动的prometheus-pusher。而且prometheus和pushgateway都搭建成功,但不知道为什么pushgateway看不到prometheus-pusher推送的任何metrics,是pusher没有UI界面吗?怎么才能知道pusher有没有搭建成功?找了好久,也找不到原因。
部署文件如下:
[root@prometheus pushgateway-pusher]# cat docker-compose.yml
version: '2'
services:
prometheus-pusher:
image: wisecity/prometheus-pusher:latest
environment:
PUSH_GATEWAY: http://192.168.10.30:9091
TZ: Asia/Shanghai
volumes:
- ./prom-conf:/etc/prom-conf/
ports:
- "8080:8080"
entrypoint:
- /bin/prometheus_pusher
- -config.file
- /etc/prom-conf/prometheus.yml
目前我这边也看不到pushgateway上面的值。日志如下:
send data to pushgateway :http://192.168.10.30:9091/metrics/job/SqlMetrics/instance/192-168-10-20-9237-metrics
prometheus-pusher配置如下:
cat prom-conf/prometheus.yml
global:
scrape_interval: 15s
evaluation_interval: 15s
external_labels:
monitor: 'exporter-metrics'
scrape_configs:
- job_name: 'SqlMetrics'
static_configs:
- targets:
- '192.168.10.20:9237'
sql-exporter采集数据如下:
[root@postgres-master mysql-exporter]# curl -s 192.168.10.20:9237/metrics |grep "ids"
sql_sql_queries{col="ids",database="mydb",driver="mysql",host="192.168.10.20:3306",sql_job="SqlMetrics",user="root"} 5
但是pushgateway上面没有将上述的指标推送到pushgateway
@yunlzheng 麻烦帮忙看看
prometheus server 和 consul server 都在一个机房, 通过部署pushgateway+ pusher采集另外机房的数据 但是怎么配置pusher所在机房取到异地机房consul 中注册服务的信息呢?
i noticed when trying this out that this line https://github.com/yunlzheng/prometheus-pusher/blob/master/scrape/exporterscrape.go#L147 is filtering labels. could an option to added to specify prefixes via environment var, and maybe even allow a *
to pass all metrics through?
i dont mind submitting a PR if necessary.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.