OA-55 Implement a Prometheus Exporter Proxy (similar to the exporter_exporter) #87
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.