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

pushgateway看不到prometheus-pusher推送的metrics #1

Open
zhaomeng-a opened this issue Sep 1, 2017 · 3 comments
Open

pushgateway看不到prometheus-pusher推送的metrics #1

zhaomeng-a opened this issue Sep 1, 2017 · 3 comments

Comments

@zhaomeng-a
Copy link

zhaomeng-a commented Sep 1, 2017

能看懂中文么?我就不写英语了。

我使用docker-compose启动的prometheus-pusher。而且prometheus和pushgateway都搭建成功,但不知道为什么pushgateway看不到prometheus-pusher推送的任何metrics,是pusher没有UI界面吗?怎么才能知道pusher有没有搭建成功?找了好久,也找不到原因。

@yunlzheng
Copy link
Owner

可以提供一下pusher容器的日志,我帮你看一下。

@yunlzheng yunlzheng reopened this Oct 24, 2017
@Sunny-kubernetes
Copy link

Sunny-kubernetes commented Jan 28, 2024

部署文件如下:

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

@Sunny-kubernetes
Copy link

如下图所示:没有sql_sql_queries这个指标
push

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

3 participants