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

the prometheus how to scrape Prometheus Pushgateway data #1008

Closed
zengzhihai110 opened this Issue Aug 19, 2015 · 2 comments

Comments

Projects
None yet
3 participants
@zengzhihai110
Copy link

zengzhihai110 commented Aug 19, 2015

i don't find to how to it

@juliusv

This comment has been minimized.

Copy link
Member

juliusv commented Aug 20, 2015

You'd just scrape the pushgateway like any other Prometheus target. Have you taken a look at:

Closing this issue here since it's not a bug in the Prometheus server.

@juliusv juliusv closed this Aug 20, 2015

@KyleFromOhio

This comment has been minimized.

Copy link

KyleFromOhio commented Dec 28, 2018

The following example worked for me...

EDIT: /opt/prometheus/prometheus.yml (must have correct indentation)

job_name: 'pushgateway'
honor_labels: true
static_configs:
- targets: ['localhost:9091']

Restart prometheus service to load new scrape config.
Run/start the pushgateway service.
For testing i ran manually: $ /pathto/binary/file/pushgateway --web.listen-address=":9091"

Then send a curl request from remote server to gateway (make sure firewall is correct first)...
$ echo 'test_metric 3.15' | curl --data-binary @- http://YOURGATEWAY:9091/metrics/job/pushgateway/instance/yourremoteserver01

Then check if scraping ok: http://YOURPROMETHEUS:9090/targets
Then look for your metric (should be the last one at bottom: http://YOURGATEWAY:9091/metrics
You could check locally like: $ curl -vs http://localhost:9091/metrics | tail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.