Ad Widget

Collapse

Sending tags to Opsgenie via Webhook

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jb4293
    Junior Member
    • Jul 2015
    • 2

    #1

    Sending tags to Opsgenie via Webhook

    We do issue routing with Opsgenie using tags. How do you send custom tags using the Opsgenie Webhook?

    With the old integration, you could specify a flag with tags to send.

    Thanks
  • jb4293
    Junior Member
    • Jul 2015
    • 2

    #2
    I figured it out!

    Code:
    if ((params.eventvalue == 1) && (params.eventupdate == 0)) {
    fields.message = params.subject;
    fields.alias = params.eventid;
    fields.description = params.message;
    fields.details = {"Zabbix server": params.zbxurl ,"Problem": params.zbxurl+"/tr_events.php?triggerid="+params.triggerid+"&event id="+params.eventid};
    fields.source = "Zabbix";
    fields.priority = severity;
    I tried adding
    Code:
    fields.tags = "xxx"
    but, Opsgenie expects the tags field to be an array, not a string.
    Code:
    fields.tags = ["xxx"]
    makes it work perfectly. Hopefully that will save someone else some time someday.

    Comment

    Working...