Skip to content

Commit 330435a

Browse files
committed
fixed yaml
1 parent ec5b9e3 commit 330435a

File tree

1 file changed

+39
-44
lines changed

1 file changed

+39
-44
lines changed

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

Lines changed: 39 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This article applies to the following cluster configurations:
2424
## Prerequisites
2525

2626
- You must have self-managed Prometheus running on your AKS cluster. For example, see [Using Azure Kubernetes Service with Grafana and Prometheus](https://techcommunity.microsoft.com/t5/apps-on-azure-blog/using-azure-kubernetes-service-with-grafana-and-prometheus/ba-p/3020459).
27-
- You used Kube-Prometheus Stack when you setup Prometheus on your AKS cluster.
27+
- You used [Kube-Prometheus Stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack) when you setup Prometheus on your AKS cluster.
2828

2929

3030
## Create Azure Monitor workspace
@@ -107,51 +107,46 @@ This step isn't required if you're using an AKS identity since it will already h
107107
This YAML assumes you're using 8081 as your listening port. Modify that value if you use a different port.
108108
109109
```yml
110-
prometheus:
111-
prometheusSpec:
112-
externalLabels:
113-
cluster: <AKS-CLUSTER-NAME>
114-
115-
remoteWrite:
116-
- url: "http://localhost:8081/api/v1/write"
117-
118-
containers:
119-
- name: prom-remotewrite
120-
Image <CONTAINER-IMAGE-VERSION>
121-
imagePullPolicy: Always
122-
123-
ports:
124-
- name: rw-port
125-
containerPort: 8081
126-
livenessProbe:
127-
httpGet:
128-
path: /health
129-
port: rw-port
130-
readinessProbe:
131-
httpGet:
132-
path: /ready
133-
port: rw-port
134-
resources:
135-
limits:
136-
cpu: 500mc
137-
memory: 200Mi
138-
requests:
139-
cpu: 350mc
140-
memory: 150Mi
141-
env:
142-
- name: INGESTION_URL
143-
value: “<INGESTION-URL>"
144-
- name: LISTENING_PORT
145-
value: "8081"
146-
- name: IDENTITY_TYPE
147-
value: "userAssigned"
148-
- name: AZURE_CLIENT_ID
149-
value: "<MANAGED-IDENTITY-CLIENT-ID>"
150-
# Optional parameters
151-
- name: CLUSTER
152-
value: “<CLUSTER-NAME>”
110+
prometheus:
111+
prometheusSpec:
112+
externalLabels:
113+
cluster: <AKS-CLUSTER-NAME>
114+
115+
## https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write
116+
##
117+
remoteWrite:
118+
- url: "http://localhost:8081/api/v1/write"
119+
120+
containers:
121+
- name: prom-remotewrite
122+
image: <CONTAINER-IMAGE-VERSION>
123+
imagePullPolicy: Always
124+
ports:
125+
- name: rw-port
126+
containerPort: 8081
127+
livenessProbe:
128+
httpGet:
129+
path: /health
130+
port: rw-port
131+
readinessProbe:
132+
httpGet:
133+
path: /ready
134+
port: rw-port
135+
env:
136+
- name: INGESTION_URL
137+
value: "<INGESTION_URL>"
138+
- name: LISTENING_PORT
139+
value: "8081"
140+
- name: IDENTITY_TYPE
141+
value: "userAssigned"
142+
- name: AZURE_CLIENT_ID
143+
value: "<MANAGED-IDENTITY-CLIENT-ID>"
144+
# Optional parameters
145+
- name: CLUSTER
146+
value: "<CLUSTER-NAME>"
153147
```
154148
149+
155150
2. Open Azure Cloud Shell and upload the YAML file.
156151
3. Use helm to apply the YAML file to update your Prometheus configuration with the following CLI commands.
157152

0 commit comments

Comments
 (0)