Skip to content

Commit b8f7878

Browse files
authored
Merge pull request #123691 from Sohamdg081992/patch-1
Update basic auth to make username more clear
2 parents 4da3247 + 096b1a0 commit b8f7878

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

articles/azure-monitor/containers/prometheus-metrics-scrape-configuration.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,8 @@ If you are using `basic_auth` setting in your prometheus configuration, please f
482482

483483
1. Create a secret in the **kube-system** namespace named **ama-metrics-mtls-secret**
484484

485-
The value for password1 is **base64encoded**
485+
The value for password1 is **base64encoded**.
486+
486487
The key *password1* can be anything, but just needs to match your scrapeconfig *password_file* filepath.
487488

488489
```yaml
@@ -497,10 +498,11 @@ data:
497498
```
498499
The **ama-metrics-mtls-secret** secret is mounted on to the ama-metrics containers at path - **/etc/prometheus/certs/** and is made available to the process that is scraping prometheus metrics. The key( ex - password1) in the above example will be the file name and the value is base64 decoded and added to the contents of the file within the container and the prometheus scraper uses the contents of this file to get the value that is used as the password used to scrape the endpoint.
499500

500-
2. In the configmap for the custom scrape configuration use the following setting -
501+
2. In the configmap for the custom scrape configuration use the following setting. The username field should contain the actual username string. The password_file field should contain the path to a file that contains the password.
502+
501503
```yaml
502504
basic_auth:
503-
username: admin
505+
username: <username string>
504506
password_file: /etc/prometheus/certs/password1
505507
506508
```

0 commit comments

Comments
 (0)