I am having a problem with sending alerts from Kibana to Opsgenie, where the tags I attach to the alerts are not being sent. I am using Kibana version 7.17, so I'm using a webhook instead of the integration available in version 8.X.
I am using our F5 connector to call the API at /v2/alerts
, but when the call is made, only the message appears in the alert, and none of the tags I created show up in Opsgenie.
{ "alert_name": "{{alertName}}", "alert_instance_id": "{{alertInstanceId}}", "alert_status": "{{alertState}}", "timestamp": "{{context.date}}", "message": "{{context.message}}" }
Hello @Lubomír Kostal
Thank you for contacting the Atlassian Community!
When sending alerts from Kibana to Opsgenie using a webhook, you'll need to ensure that your payload is correctly formatted to include the tags. The Opsgenie API expects a specific JSON structure, and if the tags are not appearing, it's likely due to a formatting issue in the payload you're sending.
{ "message": "Sample Alert", "description": "This is a sample alert description", "priority": "P3", "tags": ["tag1", "tag2", "tag3"], "details": { "key1": "value1", "key2": "value2" } }
From the above payload you shared it looks like you need to include
"tags": {{#context.tags}}["{{.}}"]{{/context.tags}}
I hope the details provided are helpful.
Regards
Mubeen Mohammed
Cloud Support Engineer
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.