Skip to content

Commit de8e0ce

Browse files
authored
Added writeRelabelConfig for RW MI yaml
1 parent a9f68b3 commit de8e0ce

File tree

1 file changed

+45
-31
lines changed

1 file changed

+45
-31
lines changed

articles/azure-monitor/essentials/prometheus-remote-write-managed-identity.md

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -94,38 +94,52 @@ This step isn't required if you're using an AKS identity since it will already h
9494
9595
## https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write
9696
remoteWrite:
97-
- url: 'http://localhost:8081/api/v1/write'
97+
- url: 'http://localhost:8081/api/v1/write'
98+
99+
## Azure Managed Prometheus currently exports some default mixins in Grafana. These mixins are compatible with Azure Monitor agent on ## your Azure Kubernetes Service cluster. However, these mixins aren't compatible with Prometheus metrics scraped by the Kube ## Prometheus stack. In order to make these mixins compatible, uncomment remote write relabel configuration below:
100+
101+
## writeRelabelConfigs:
102+
## - sourceLabels: [metrics_path]
103+
## regex: /metrics/cadvisor
104+
## targetLabel: job
105+
## replacement: cadvisor
106+
## action: replace
107+
## - sourceLabels: [job]
108+
## regex: 'node-exporter'
109+
## targetLabel: job
110+
## replacement: node
111+
## action: replace
98112
containers:
99-
- name: prom-remotewrite
100-
image: <CONTAINER-IMAGE-VERSION>
101-
imagePullPolicy: Always
102-
ports:
103-
- name: rw-port
104-
containerPort: 8081
105-
livenessProbe:
106-
httpGet:
107-
path: /health
108-
port: rw-port
109-
initialDelaySeconds: 10
110-
timeoutSeconds: 10
111-
readinessProbe:
112-
httpGet:
113-
path: /ready
114-
port: rw-port
115-
initialDelaySeconds: 10
116-
timeoutSeconds: 10
117-
env:
118-
- name: INGESTION_URL
119-
value: <INGESTION_URL>
120-
- name: LISTENING_PORT
121-
value: '8081'
122-
- name: IDENTITY_TYPE
123-
value: userAssigned
124-
- name: AZURE_CLIENT_ID
125-
value: <MANAGED-IDENTITY-CLIENT-ID>
126-
# Optional parameter
127-
- name: CLUSTER
128-
value: <CLUSTER-NAME>
113+
- name: prom-remotewrite
114+
image: <CONTAINER-IMAGE-VERSION>
115+
imagePullPolicy: Always
116+
ports:
117+
- name: rw-port
118+
containerPort: 8081
119+
livenessProbe:
120+
httpGet:
121+
path: /health
122+
port: rw-port
123+
initialDelaySeconds: 10
124+
timeoutSeconds: 10
125+
readinessProbe:
126+
httpGet:
127+
path: /ready
128+
port: rw-port
129+
initialDelaySeconds: 10
130+
timeoutSeconds: 10
131+
env:
132+
- name: INGESTION_URL
133+
value: <INGESTION_URL>
134+
- name: LISTENING_PORT
135+
value: '8081'
136+
- name: IDENTITY_TYPE
137+
value: userAssigned
138+
- name: AZURE_CLIENT_ID
139+
value: <MANAGED-IDENTITY-CLIENT-ID>
140+
# Optional parameter
141+
- name: CLUSTER
142+
value: <CLUSTER-NAME>
129143
```
130144
131145

0 commit comments

Comments
 (0)