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
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -498,7 +498,7 @@ Scraping targets using basic auth is currently not supported using pod/service m
498
498
---
499
499
500
500
If you are using both basic auth and tls auth, please refer to the [section](#create-secret-using-yaml-for-both-basic-and-tls-auth) below.
501
-
For more details, refer to the [note section](#note-section).
501
+
For more details, refer to the [note section](#note-for-both-basic-and-tls-authentication) below.
502
502
503
503
504
504
### TLS based scraping
@@ -521,8 +521,6 @@ Please follow the below steps.
521
521
<certfile>: base64_cert_content
522
522
<keyfile>: base64_key_content
523
523
```
524
-
525
-
---
526
524
527
525
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 - certfile) 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.
528
526
@@ -569,7 +567,6 @@ Please follow the below steps.
569
567
If you want to use both basic and Tls authentication settings in your configmap/CRD, just make sure that the secret **ama-metrics-mtls-secret** includes all the files(keys) under the data section with their corresponding base 64 encoded values, as shown below.
570
568
571
569
```yaml
572
-
573
570
apiVersion: v1
574
571
kind: Secret
575
572
metadata:
@@ -581,10 +578,9 @@ Please follow the below steps.
581
578
keyfile: base64_key_content # used for Tls
582
579
password1: base64-encoded-string # used for basic auth
583
580
password2: base64-encoded-string # used for basic auth
581
+
```
584
582
585
-
```yaml
586
-
587
-
<a name="note-section"></a>
583
+
### Note for both Basic and TLS authentication
588
584
> [!NOTE]
589
585
>
590
586
> The **/etc/prometheus/certs/** path is mandatory, but *password1* can be any string and needs to match the key for the data in the secret created above. This is because the secret **ama-metrics-mtls-secret** is mounted in the path **/etc/prometheus/certs/** within the container.
0 commit comments