Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upQuestion: Configure Prometheus to scrape metrics from k8s nginx-containers with nginx-exporter #2009
Comments
This comment has been minimized.
This comment has been minimized.
|
The static configuration will never know about pods, and the static config points to a service, meaning there can be multiple pods load balanced behind it. If you go to the We are soon going to look into improving kubernetes service discovery, so stay tuned for that. In the mean time, maybe you can discover pods directly through pod discovery and group the job labels via relabelling. |
This comment has been minimized.
This comment has been minimized.
|
Hi @brancz, Thanks for a prompt reply. I'll give another try to a pod discovery, but, if you please, can you explain, how should I use relabelling to get in Thanks in advance. |
This comment has been minimized.
This comment has been minimized.
|
You could do the same thing as your configuration does with services/endpoints, where only endpoints of a service are kept where the service has the |
This comment has been minimized.
This comment has been minimized.
|
@brancz Thank you, mate. Closing issue. |
Blasterdick
closed this
Sep 21, 2016
abraithwaite
referenced this issue
Oct 2, 2017
Open
Add integration for service discovery & kv config stores (dynamic config) #272
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Blasterdick commentedSep 20, 2016
•
edited
Can't get how to scrape pod-level labels only for pods with openresty and nginx-exporter containers deployed (port 9113).
Now I have default config, where job 'kubernetes-service-endpoints' scrapes metrics from nginx-exporter out-of-box, but I can't get how to scrape labels, such as pod_name, etc.
Also, I have such a job:
Which scrapes no container or pod labels at all (eventually?)
Thanks in advance for any kind of help.