Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prometheus-pusher无法将sql-exporter收集的数据推送到pushgateway上面 #6

Open
Sunny-kubernetes opened this issue Feb 1, 2024 · 0 comments

Comments

@Sunny-kubernetes
Copy link

图片如下:
push

部署文件如下:

[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 麻烦帮忙看看

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant