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

docs for Metricbeat Prometheus module show confusing port for scraping Prometheus exporters #11282

Closed
DanRoscigno opened this issue Mar 17, 2019 · 4 comments
Assignees
Labels
bug docs Metricbeat Metricbeat Team:Integrations Label for the Integrations team

Comments

@DanRoscigno
Copy link
Contributor

DanRoscigno commented Mar 17, 2019

URL

  • Version: 7.0 beta 1
  • Operating System: Linux / Kubernetes
  • Steps to Reproduce:

The docs show this for scraping from an exporter:

- module: prometheus
  period: 10s
  hosts: ["localhost:9090"]
  metrics_path: /metrics

The 9090 is the problem. Port 9090 is the port of the Prometheus server, not any exporter. The ports for the exporters are here.

Here is what I would suggest:

To scrape metrics from a Prometheus exporter, configure the hosts field to it. The default port assignments for known exporters are documented in the Prometheus docs.The path to retrieve the metrics from (/metrics by default) can be configured with metrics_path. The following example collects Redis (port 9121) and HAProxy (port 9101) from the servers redisserver and haproxyserver respectively:

- module: prometheus
  period: 10s
  hosts: ["redisserver:9121", "haproxyserver:9101"]
  metrics_path: /metrics
@fearful-symmetry
Copy link
Contributor

Agreed, that's a tad confusing as an example for exporter scraping.

@fearful-symmetry
Copy link
Contributor

Fixed in the above PR. Not sure if we want to backport it?

@DanRoscigno
Copy link
Contributor Author

Please do, it will be a long time before most of our customers upgrade to 7. Thanks Alex @fearful-symmetry

@fearful-symmetry
Copy link
Contributor

So it looks like 6.7 doesn't have any of this documentation, as #9948 was never backported that far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug docs Metricbeat Metricbeat Team:Integrations Label for the Integrations team
Projects
None yet
Development

No branches or pull requests

4 participants