You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/containers/prometheus-metrics-scrape-configuration.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -462,6 +462,7 @@ metric_relabel_configs:
462
462
463
463
464
464
### Basic Authentication
465
+
### [Scrape Configs using Config file](#tab/ConfigFileScrapeConfigBasicAuth)
465
466
466
467
If you are using `basic_auth` setting in your prometheus configuration, please follow the steps -
467
468
@@ -483,6 +484,7 @@ type: Opaque
483
484
data:
484
485
password1: <base64-encoded-string>
485
486
```
487
+
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.
486
488
487
489
2. In the configmap for the custom scrape configuration use the following setting -
488
490
```yaml
@@ -491,6 +493,12 @@ basic_auth:
491
493
password_file: /etc/prometheus/certs/password1
492
494
493
495
```
496
+
By providing the path to the password_file above, the prometheus scraper uses the contents of the file named password1 in the path /etc/prometheus/certs as the value of password for basic auth based scraping.
497
+
498
+
### [Scrape Configs using CRD(Pod/Service Monitor)](#tab/CRDScrapeConfigBasicAuth)
499
+
Scraping targets using basic auth is currently not supported using pod/service monitors. Support for this will be added in the upcoming releases.
0 commit comments