prometheus-pusher
prometheus-pusher copied to clipboard
pushgateway看不到prometheus-pusher推送的metrics
能看懂中文么?我就不写英语了。
我使用docker-compose启动的prometheus-pusher。而且prometheus和pushgateway都搭建成功,但不知道为什么pushgateway看不到prometheus-pusher推送的任何metrics,是pusher没有UI界面吗?怎么才能知道pusher有没有搭建成功?找了好久,也找不到原因。
可以提供一下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
配置文件:
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 麻烦帮忙看看
如下图所示:没有sql_sql_queries这个指标