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

Feat/prometheus-exporter : Add prometheus exporter docs in en and de language. #812

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Hassanzadeh-sd
Copy link

Following your suggestion on

pull request #6314 ( mailcow/mailcow-dockerized#6314 ),

I have separated the documentation changes into this new pull request within the mailcow repository., in to third-party - Prometheus exporter section.

I've tested the documentation locally using mkdocs serve for two languages, and it appears to be rendering correctly.

Copy link

@j6s j6s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to make things harder for you, but I took this opportunity to change a couple of things about the exporter - the exporter was started as a quick and dirty solution for myself and I wanted to have something more presentable and secure if it was going to be added to official docs

The following prometheus configuration can be used in order to pass these information
to the endpoint:

```yaml
Copy link

@j6s j6s Mar 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scrape_configs:
  - job_name: 'mailcow'
    static_configs:
      - targets: [ 'mailcow_exporter:9099' ]
    params:
       token: [ 'YOUR-APIKEY-HERE' ]


### Usage

The `/metrics` endpoint requires `host` and `apiKey` URL parameters. `host` is the
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to prevent using the exporter to be instrumented to access third party domains, providing host and apikey using URL parameters is not supported anymore. Instead, they must be provided on startup using MAILCOW_EXPORTER_HOST & MAILCOW_EXPORTER_API_KEY or --host=... & --api-key=....


### Setting host or api key on application start-up

When using the exporter for a single mailcow host, it might be useful not to send `host` and `apiKey` with every request, since they don't change.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using the exporter for a single mailcow host

Using a single exporter for multiple mailcow hosts now isn't supported anymore. An exporter must always be provided with host & apiKey on startup

```


[Prometheus](https://prometheus.io) exporter for information about a
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sentence ends here


![Visualization of where to find the API Key](../../assets/images/prometheus_exporter/mailcow-apikey.jpg)

**ImpoWichtigrtant:** Beschränken Sie den Zugriff auf den Exporter und schützen Sie Ihren API-Schlüssel!
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

German & English mixed

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.

2 participants