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

Add job label by default when using Prometheus collector #13878

Merged
merged 4 commits into from
Oct 2, 2019

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented Oct 2, 2019

This PR adds job label by default when using prometheus collector. So when using raw Prometheus collector it will always be prometheus.

When using lightweight modules it is the name of the lightweight module ie cockroachdb

Closes #12739

Testing:

  1. Try the module with metrics_path: /metrics in the configuration and collect metrics from a node-exporter directly.
  2. Try the module with metrics_path: '/federate' and collect metrics from Prometheus server.

In both cases label job should be present.
https://www.elastic.co/guide/en/beats/metricbeat/master/metricbeat-metricset-prometheus-collector.html

Extra: Try the same with cockroachdb lightweight module. Unitest's testdata cover this case too.

Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
@ChrsMark ChrsMark requested a review from a team as a code owner October 2, 2019 13:11
Signed-off-by: chrismark <chrismarkou92@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add instance label by default when using Prometheus collector
3 participants