"contexts" is not accepted for pagerduty integration configuration

We are using Elastic/Kibana 5.6.3 and I am configuring a watcher with PagerDuty action which is configured like that:

    "notify-pagerduty": {
         "throttle_period_in_millis": 1800000,
            "pagerduty": {
               "description": "Service has reported error {{ctx.payload.hits.total}} times during last 30 mins",
               "attach_payload": true,
               "account": "pagerduty_v2",
               "context": [
                  {
                     "type": "link",
                     "href": "https://link.to.kibana.filter",
                    "text": "View the incident in Kibana"
                  }
               ]
            }
         }

which is in line with the example provided in X-Pack: PagerDuty Action. The content of the "context" field is getting ignored by PagerDuty. Their documentation claims that the name of that array field must be "contexts" (plural), see PagerDuty API v2: Send an event. That is the case for both API v1 and API v2. When I try renaming the field into "contexts" in the watcher configuration, I get an error message "Watcher: [parse_exception] could not parse pager duty event template. unexpected field [contexts]".

Please correct your parser and user documentation.

Hey,

this indeed looks like a bug on the alerting side of things. I am investigating. Thank you so much for the report!

--Alex

Confirmed, that this is a bug in the pagerduty action. I am working on a fix and trying to get it in as soon as possible!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.