Closed carstencodes closed 11 months ago
I'd love to start monitoring my mailcow instance like explain in this issue without sharing the API key to the scraper. Any chance this gets merged someday?
I don't know. The last commit was 6 weeks before my PR was created. According to the contributing guide,
Contributions are always welcome - just open an issue or PR. Please be aware that even though it may not seem like it there are always other humans on the other end of a conversation.
Please treat others with respect and kindness.
If you have general questions or suggestions for improvement, open an issue or [hit me up on twitter](https://twitter.com/thej6s)
Since I'm no longer using twitter/X, can anybody hit @j6s on twitter?
Not like I'm ever going to be a paying customer of Twitter either, but his handle on Twitter mentioned @j6s@mastodon.social so I tried that 😀
Ok, as a non-member I cannot even see that, otherwise I would have pinged him there. I started following him, maybe I will receive the answer ;)
I am very sorry, I saw this PR, mentally filed it under "should review" and then never did. I have just returned from a vacation and will check out the code during the week
@j6s A gentle reminder.
@j6s I feel the urge to ask for a status ...
I am very sorry about the long delay, I've had a hell of a year. This PR should have been merged a long time ago, since the code is very straight forward. I will do a single change to the code, which is renaming the environment variables to MAILCOW_EXPORTER_*
instead of MCE_*
since I believe that the verbosity makes things clearer
I renamed the environment variables and also added MAILCOW_EXPORTER_LISTEN
- now available in 1.4.0
Why has this pull request beed created?
I use mailcow-exporter as a workaround for the missing support within mailcow itself.
If only one mailcow instance is mirrored, it might be a wise idea to put this exporter to into the same network and application stack using
docker-compose.override.yml
and add an endpoint to the prometheus scraper on the same host or a neighbored host.In this case, the host is known AND the API Key should not leave the application stack. Therefore it is a good idea to keep both secret and not to share them with the scraper.
What does this pull request do?
It adds an implementation, so that both - host and API Key - can be set during application startup phase using either flags (host or apikey) or environment variables (MCE_HOST and MCE_API_KEY, where MCE is short for MailCow-Exporter).
Are there alternatives?
I'm using traefik as reverse proxy for my mailcow application stack. Unfortunately, it does not allow modifying the query parameters, using a path replacement does not work either, since the ampersand (
&
) will be url encoded. The middleware to replace, add or delete parameters is still pending.What has been done?
ReadMe.md
)