carlosedp / cluster-monitoring

Cluster monitoring stack for clusters based on Prometheus Operator
MIT License
740 stars 200 forks source link

Additional scrape configs #60

Closed steeef closed 4 years ago

steeef commented 4 years ago

This is a great project, and was really easy to get it monitoring my k3s raspberry pi cluster. Thank you. Is there any way to add additional entries to the scrape_configs in Prometheus' configuration to monitor things outside of the cluster? I found these instructions in the original project: https://github.com/coreos/prometheus-operator/blob/master/Documentation/additional-scrape-config.md I see the same files mentioned in this project, but it doesn't look like it's being ingested when running make deploy. Is there something I should add to vars.jsonnet to get that working?

carlosedp commented 4 years ago

You need to deploy the exporters for your applications that are outside the cluster and create the ServiceMonitors for them. Look at the modules directory where I configure some collectors.

The UPS one is outside the cluster and might be similar to what you need.

steeef commented 4 years ago

Ah, thanks. I'll read up on what parameters are necessary there.

zoide commented 4 years ago

I just wanted to add something here: for me the docs with https://github.com/coreos/prometheus-operator/blob/master/Documentation/additional-scrape-config.md work as they are.

All I had to do:

This is more convenient for me, since I have a lot of external targets, thus writing a module for all of those is rather tedious.

Cheers!