Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OA-55 Implement a Prometheus Exporter Proxy (similar to the exporter_exporter) #87

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nook24
Copy link
Member

@nook24 nook24 commented Jul 3, 2024

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
Unbenannt

To get the data of a specific exporter, just add a query parameter /prometheus?exporter=mysqld_exporter
Unbenannt

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

Unbenannt

params:
    exporter: [mysqld_exporter]
scheme: https
tls_config:
    insecure_skip_verify: true
    ca_file: /opt/openitc/agent/server_ca.pem
    cert_file: /opt/openitc/agent/server_ca.pem
    key_file: /opt/openitc/agent/server_ca.key

Currently only Pull Mode is supported, but I think this could also be implemented into the Push Mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant