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

Enable providing mqtt login details via the environment #70

Merged
merged 2 commits into from
Sep 20, 2021

Conversation

genkobar
Copy link
Contributor

This PR adds the ability to provide a username and password for the MQTT broker via the environment instead of the configuration file.

If the environment variables MQTT2PROM_MQTT_USER and MQTT2PROM_MQTT_PASSWORD exist and are not empty, they will override those parameters in the configuration file.

This is especially helpful when trying to avoid leaking application secrets via a version control system.

Environment variables override config variables, if they exist
Describe how to supply MQTT username and password via environment variables.
genkobar referenced this pull request in Momeno/mqtt2prometheus Sep 20, 2021
Environment variables override config variables, if they exist
@hikhvar hikhvar merged commit e4d37ac into hikhvar:master Sep 20, 2021
@hikhvar
Copy link
Owner

hikhvar commented Sep 20, 2021

Thank you 🥳

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.

None yet

2 participants