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.