Hi there,
I am running prometheus community in k8s using helm, and have my alert rules and alertmanager files as values I pass to helm during upgrade. As such, I am having difficulty using the examples listed here, particularly the following error;
"{\"message\":\"Request body is not processable. Please check the errors.\",\"errors\":{\"priority\":\"should be one of [ P1, P2, │
│ 3, P4, P5 []\"},\"took\":0.001,\"requestId\":\"ca7xxx3a0\"}"
I have tried escaping the curly brackets, using square brackets, single quotes, double quotes and many other syntax variations however I can't seem to get past this hurdle. What would be really useful is to be able to see how OpsGenie is receiving the payload, so I can get more feedback to my changes.
Is there a way to see what the 'priority' key is being set to?
I have tried using the requests API but it doesn't give me the .Alert payload.
My alerts have this configured;
labels:
severity: info
And the alertmanager config at the mo is;
priority: '{{ range .Alerts }}{{ if eq .Labels.severity "critical" }}P1{{ else }}P2{{- end -}}'
I've also tried setting the label key as 'priority' instead of 'severity', and this label is available in the alertmanager TSDB, but OpsGenie is still not seeing it.
Thanks!
Swapna