[node_exporter] Add textcollector in order to fetch more metrics
Important notices Before you add a new report, we ask you kindly to acknowledge the following:
- [X] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- [X] I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- [X] When the request is meant for an existing plugin, I've added its name to the title.
Is your feature request related to a problem? Please describe.
I use node_exporter to monitor my opnsense firewall.
I want to know when a gateway is down.
Describe the solution you'd like
So far, I can run a script that will create a file in let's say /var/lib/node_exporter/textcollector/gateways.prom with the following content:
# TYPE opnsense_gateway gauge
# HELP opnsense_gateway zero if gateway is okay, 1 otherwise
opnsense_gateway{gateway_name="wan1"} 0
opnsense_gateway{gateway_name="wan2"} 1
Enabling text collector for node_exporter would allow to pick up these metrics.
Describe alternatives you've considered There's SNMP, but that's alot of work.
Additional context
Perhaps there should exist some kind of repository with basic scripts that could provide more prometheus metrics. Willing to provide my gateway script here.