planetary-social / ansible-scripts

Ansible automation scripts used at Planetary
MIT License
2 stars 3 forks source link

Add node exporter role #33

Closed cooldracula closed 1 year ago

cooldracula commented 1 year ago

This adds a role and example playbook for installing the prometheus node_exporter to target hosts.

cooldracula commented 1 year ago

Looks good! Does prometheus poll node exporter?

Yep! It works on a simple standard of prometheus expecting a /metrics endpoint at the url given, and then it will poll and consume whatever metrics are at that endpoint.

In the config file for our prometheus instance we set the name for the jobs to poll and the targets of those jobs. It's nice because you can build custom metrics (like we did to check whether specific docker services were running) and just make sure they are broadcasting at /metrics.