This feature lets the openITCOCKPIT Agent act as a proxy for Prometheus Exporters installed on the same system.
The idea is to have one central HTTP endpoint that can be queried by openITCOCKPIT (the Agent itself) and a /prometheus target that can be scraped by Prometheus.
Exporters like for example the node_exporter do not have to be exposed to the network, instead they can be bind to 127.0.0.1 because the openITCOCKPIT Agent will scrape the exporters.
The new API endpoint /prometheus will return a list of all available exporters
To get the data of a specific exporter, just add a query parameter /prometheus?exporter=mysqld_exporter
If the Agent is using AutoTLS (default) the /prometheus endpoint is encrypted and will also require a TLS certificate for authentication. So everything is secure by default.
The exporter configuration in openITCOCKPIT is pretty straightforward
This feature lets the openITCOCKPIT Agent act as a proxy for Prometheus Exporters installed on the same system. The idea is to have one central HTTP endpoint that can be queried by openITCOCKPIT (the Agent itself) and a
/prometheus
target that can be scraped by Prometheus.Exporters like for example the
node_exporter
do not have to be exposed to the network, instead they can be bind to127.0.0.1
because the openITCOCKPIT Agent will scrape the exporters.The new API endpoint
/prometheus
will return a list of all available exportersTo get the data of a specific exporter, just add a query parameter
/prometheus?exporter=mysqld_exporter
If the Agent is using AutoTLS (default) the
/prometheus
endpoint is encrypted and will also require a TLS certificate for authentication. So everything is secure by default.The exporter configuration in openITCOCKPIT is pretty straightforward
Currently only Pull Mode is supported, but I think this could also be implemented into the Push Mode.