lucky-sideburn / kubeinvaders

Gamified Chaos Engineering Tool for Kubernetes
Apache License 2.0
1.02k stars 127 forks source link

The POD needs to have annotation for sending Prometheus style metrics #62

Closed rohits-splunk closed 2 years ago

rohits-splunk commented 2 years ago

I know the PODs are exposing the metrics on the metrics endpoint, but shouldnt the pods need to have right annotation so that the external tool can easily identify the right source, we use open telemetry collector and have added appropriate annotation to the collector configuration, but looks like PODs need to be annotated as well:

`prometheus.io/scrape: true: The default configuration scrapes all pods. If set to false, this annotation excludes the pod from the scraping process.

prometheus.io/path: The path to scrape the metrics from. The default value is /metrics.

prometheus.io/port: The port to scrape the metrics from. The default value is 9090.`

lucky-sideburn commented 2 years ago

@rohits-splunk please do some pull request :)

rohits-splunk commented 2 years ago

I will, but i need to test the changes on my local system first :) . Can you tell me which port i need to use for the metrics endpoint ? I am able to get the metrics data on /metrics endpoint but i need the port to configure in the collector, 8080, 8000, 9090 dont work.

lucky-sideburn commented 2 years ago

Tthe port is the same of the pod. Because if you see OpenResty configuration there is /metrics exposed by Nginx. Thanks for contributing <3

rohits-splunk commented 2 years ago

It would be great if somehow i can find pod port , right now i am assuming 8080, if you a way to find out it would be great.

rohits-splunk commented 2 years ago

This issue can be closed, i have successfully injested metrics into the tool.

lucky-sideburn commented 2 years ago

Hi @rohits-splunk thank you very much!