Alerting from Kibana to Opsgenie

Lubomír Kostal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 7, 2024

 

 

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}}" }


Snímek obrazovky 2024-08-07 091018.png

1 answer

1 vote
Mubeen Mohammed
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 8, 2024

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events