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

Fix missing roles in prometheus kubernetes example #1840

Merged
merged 3 commits into from
Jul 21, 2016
Merged

Fix missing roles in prometheus kubernetes example #1840

merged 3 commits into from
Jul 21, 2016

Conversation

zoidyzoidzoid
Copy link
Contributor

Needed with Prometheus 1.0

@@ -60,6 +61,7 @@ scrape_configs:
- api_servers:
- 'https://kubernetes.default.svc'
in_cluster: true
role: endpoint

relabel_configs:
- source_labels: [__meta_kubernetes_role, __meta_kubernetes_service_annotation_prometheus_io_scrape]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also drop the __meta_kubernetes_role in each of the source_labels.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the corresponding true; in the regexp.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see potential problem for the job kubernetes-cluster as there is a combination of two roles. If you set role to apiserver directly, you will not have entries for nodes targets.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point - this needs a another job with role: node.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks. Will do.

@jimmidyson
Copy link
Contributor

👍

1 similar comment
@matthiasr
Copy link
Contributor

👍

@beorn7 beorn7 merged commit e980913 into prometheus:master Jul 21, 2016
@zoidyzoidzoid zoidyzoidzoid deleted the patch-1 branch July 21, 2016 14:41
@sdurrheimer sdurrheimer added this to the v1.0.3 milestone Aug 25, 2016
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

Successfully merging this pull request may close these issues.

6 participants