Skip to content

Commit aec55f1

Browse files
Update basic auth to make username more clear
1 parent 457faa3 commit aec55f1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

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

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

471-
The value for password1 is **base64encoded**
471+
The value for password1 is **base64encoded**.
472+
472473
The key *password1* can be anything, but just needs to match your scrapeconfig *password_file* filepath.
473474

474475
```yaml
@@ -483,10 +484,10 @@ data:
483484
```
484485
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.
485486

486-
2. In the configmap for the custom scrape configuration use the following setting -
487+
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. -
487488
```yaml
488489
basic_auth:
489-
username: admin
490+
username: <username string>
490491
password_file: /etc/prometheus/certs/password1
491492
492493
```

0 commit comments

Comments
 (0)