Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bgelov/prometheus-web-yml
Prometheus web.yml file generator for basic authentication
https://github.com/bgelov/prometheus-web-yml
authentication basic-auth-prometheus basic-authentication prometheus prometheus-authentication prometheus-yml web-yml yml
Last synced: about 1 month ago
JSON representation
Prometheus web.yml file generator for basic authentication
- Host: GitHub
- URL: https://github.com/bgelov/prometheus-web-yml
- Owner: bgelov
- License: cc0-1.0
- Created: 2023-06-07T00:27:17.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-06-18T01:40:29.000Z (over 1 year ago)
- Last Synced: 2024-09-30T23:02:17.058Z (about 1 month ago)
- Topics: authentication, basic-auth-prometheus, basic-authentication, prometheus, prometheus-authentication, prometheus-yml, web-yml, yml
- Language: Shell
- Homepage:
- Size: 10.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## What kind of script is this?
The script generates a web.yml file with a password hash using [bcrypt](https://en.wikipedia.org/wiki/Bcrypt), which is necessary to enable basic authentication for Prometheus.## How does it work?
The script prompts for username and password.
When you enter username and password, you need waiting 10 seconds timeout for bcrypt processing.
- If there is a web.yml file, you will be prompted to either recreate it or add credentials to the end of the file.
- If there is no web.yml file, a new file will be generated.After, you need add web.yml to Prometheus configuration:
```
--web.config.file=/etc/prometheus/web.yml
```Prometheus documentations about basic auth: [https://prometheus.io/docs/guides/basic-auth/](https://prometheus.io/docs/guides/basic-auth/)
## Example of a generated file
```
basic_auth_users:
test: $2y$17$Ac2deeUOLKZSP2L81awluuTAiisMp46T4NTJ0MX3tpfPXC3MUVl8G
```## Why is it necessary?
Read the article by [JFrog](https://github.com/jfrog): [Don’t let Prometheus Steal your Fire](https://jfrog.com/blog/dont-let-prometheus-steal-your-fire/)## Add rights for executing .sh file
```
chmod u+x generate_web_yml.sh
```