# \[RESOLVED\] Error: "Attempted to create unknown action type pagerduty." when trying to update a watcher in Kibana

**URL:** <https://discuss.elastic.co/t/resolved-error-attempted-to-create-unknown-action-type-pagerduty-when-trying-to-update-a-watcher-in-kibana/167433>\
**Category:** Kibana\
**Created:** [February 7, 2019, 11:13am UTC](https://discuss.elastic.co/t/resolved-error-attempted-to-create-unknown-action-type-pagerduty-when-trying-to-update-a-watcher-in-kibana/167433 "2019-02-07T11:13:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vicpav](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@vicpav](https://discuss.elastic.co/u/vicpav)\
**Post date:** [February 7, 2019, 11:13am UTC](https://discuss.elastic.co/t/resolved-error-attempted-to-create-unknown-action-type-pagerduty-when-trying-to-update-a-watcher-in-kibana/167433/1 "2019-02-07T11:13:36Z")

</div>

Elasticsearch cluster has been upgraded from version 6.3.4 to 6.6.0 and it looks like now I cannot update the watchers that have "pageduty" action configured:

- open a watcher editing in Kibana, change something in the Watch JSON and press "Save"
- nothing changes and the editing mode remains open

When checking the browser console, I can see the following error being logged every time I press "Save" button:

```auto
Error: "Attempted to create unknown action type pagerduty."
    createAction https://kibana.server.com/bundles/kibana.bundle.js:2 
    createActionsForWatch https://kibana.server.com/bundles/kibana.bundle.js:2
    createActionsForWatch https://kibana.server.com/bundles/kibana.bundle.js:2
    onWatchSave https://kibana.server.com/bundles/kibana.bundle.js:2
    fn https://kibana.server.com/dlls/vendors.bundle.dll.js line 434 > Function:4
    callback https://kibana.server.com/dlls/vendors.bundle.dll.js:434
    eval https://kibana.server.com/dlls/vendors.bundle.dll.js:434
    apply https://kibana.server.com/dlls/vendors.bundle.dll.js:434 
    ngEventHandler https://kibana.server.com/dlls/vendors.bundle.dll.js:434 
    dispatch https://kibana.server.com/dlls/vendors.bundle.dll.js:149
    handle https://kibana.server.com/dlls/vendors.bundle.dll.js:149 

```

Watcher's action is specified like that:

```auto
...
"actions": {
    "notify-slack": {
      "throttle_period_in_millis": 900000,
      "slack": {...}
    },
    "notify-pagerduty": {
      "throttle_period_in_millis": 1800000,
      "pagerduty": {
        "description": "During last 10 mins encountered {{ctx.payload.hits.total}} errors in XXX",
        "client": "Kibana",
        "client_url": "https://kibana.server.com/goto/4ca19da8257d016047a7aea66b08f5a8",
        "attach_payload": false,
        "account": "api_service",
        "contexts": [
          {
            "type": "link",
            "href": "https://kibana.server.com/goto/4ca19da8257d016047a7aea66b08f5a8",
            "text": "View the incident in Kibana"
          }
        ]
      }
    }
  }
}

```

When I am simulating the watch, it gives the status "OK", but the pagerduty action is missing, even if I force-execute it.

The same issue is observed when I am trying to create a new watcher by copy-pasting the JSON configuration there. However, the saving does work if I use the example template pre-filled into the editor when creating a new watcher.

Any idea what might be wrong? 🤔

---

<div class="post-metadata">

**Author:** ![vicpav](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@vicpav](https://discuss.elastic.co/u/vicpav)\
**Post date:** [February 7, 2019, 11:41am UTC](https://discuss.elastic.co/t/resolved-error-attempted-to-create-unknown-action-type-pagerduty-when-trying-to-update-a-watcher-in-kibana/167433/2 "2019-02-07T11:41:24Z")

</div>

Additional info that might be related. The cluster is deployed into Elastic Cloud and it has the "User setting overrides" specified as:

```auto
xpack.notification.pagerduty:
  account:
    api_service:
      service_api_key: <service-key>
    other_service:
      service_api_key: <service-key>

```

that should be appended to `elasticsearch.yml` file when Elasticsearch nodes are being started and, according to [https://www.elastic.co/guide/en/elastic-stack-overview/6.6/actions-pagerduty.html#configuring-pagerduty](https://www.elastic.co/guide/en/elastic-stack-overview/6.6/actions-pagerduty.html#configuring-pagerduty) it should still be valid.

---

<div class="post-metadata">

**Author:** ![vicpav](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@vicpav](https://discuss.elastic.co/u/vicpav)\
**Post date:** [February 12, 2019, 11:56am UTC](https://discuss.elastic.co/t/resolved-error-attempted-to-create-unknown-action-type-pagerduty-when-trying-to-update-a-watcher-in-kibana/167433/3 "2019-02-12T11:56:59Z")

</div>

Playing a bit with [Get watch](https://www.elastic.co/guide/en/elasticsearch/reference/6.6/watcher-api-get-watch.html) / [Put watch](https://www.elastic.co/guide/en/elasticsearch/reference/6.6/watcher-api-put-watch.html) APIs shows that the watchers can be updated through that interface. It is Kibana who is for some reason rejects "pageduty" as a valid action type.

Updated the ticket accordingly

---

<div class="post-metadata">

**Author:** ![vicpav](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@vicpav](https://discuss.elastic.co/u/vicpav)\
**Post date:** [February 12, 2019, 12:20pm UTC](https://discuss.elastic.co/t/resolved-error-attempted-to-create-unknown-action-type-pagerduty-when-trying-to-update-a-watcher-in-kibana/167433/4 "2019-02-12T12:20:08Z")

</div>

Created the GitHub issue [https://github.com/elastic/kibana/issues/30804](https://github.com/elastic/kibana/issues/30804) for this case

---

<div class="post-metadata">

**Author:** ![vicpav](https://avatars.discourse-cdn.com/v4/letter/v/9de053/32.png) [@vicpav](https://discuss.elastic.co/u/vicpav)\
**Post date:** [February 12, 2019, 8:11pm UTC](https://discuss.elastic.co/t/resolved-error-attempted-to-create-unknown-action-type-pagerduty-when-trying-to-update-a-watcher-in-kibana/167433/5 "2019-02-12T20:11:32Z")

</div>

Confirmed to be a valid bug and got fixed for 7.1 release, see [https://github.com/elastic/kibana/pull/30043](https://github.com/elastic/kibana/pull/30043). Until that, API is the way to go

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 12, 2019, 8:11pm UTC](https://discuss.elastic.co/t/resolved-error-attempted-to-create-unknown-action-type-pagerduty-when-trying-to-update-a-watcher-in-kibana/167433/6 "2019-03-12T20:11:43Z")

</div>

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