Hello,
I have my alert configuration written like the following:
- name: pod-status
groups:
- name: pod not in expected state
rules:
- alert: microservice_status_alert
expr: kube_pod_container_status_running == 0
for: 2m
labels:
severity: critical
annotations:
description: "microservice {{ $labels.container }} is not running.\nPod: {{ $labels.pod }}.\nInstance: {{ $labels.instance }}
Alert that I received on email looks like this:
Labels
alertname = microservice_restart_alert
cbacid = cbac1
Annotations
description = some microservice has restarted 3 times. Pod-name: some-5cb95695c-cpgvk. Instance: x.x.x.1:<port>
Question:
The new line "\n" given is not getting interpreted in mail received. I want description look like this:
description = some microservice has restarted 3 times
Pod-name: some-5cb95695c-cpgvk.
Instance: x.x.x.1:<port>
The above looks more neat.
Please help with the same.
Thanks,
Guna