Is there a way to get the currentDate as an extra property or as a label so that it can be used as part of my alias in the opsgenie integration?
I tried to add it as an extra property to the opsgenie_configs in our alertmanager configuration like below:
receivers:
- name: opsgenie
opsgenie_configs:
- api_key: MY_API_KEY
extra_properties:
- key: currentDate
value: '{{`{{ now.Format "YYYY-MM-DD" }}`}}"
message: >
{{ "{{" }}`{{`{{ .GroupLabels.alertName }}: ({{ .GroupLabels.cluster }} {{ .CommonAnnotations.description }}`}}`{{ "}}" }}
and then tried to use this currentDate as part of the alias in the opsgenie prometheus integration.
{{extraProperties.cluster}}/{{extraProperties.currentDate}}The output of alias is just test-cluster/
I don't see the currentDate available in the extraProperties. What is the correct way to do this?