Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Alerting] document requirements for developing new action types #69164

Merged
merged 3 commits into from
Jul 3, 2020

Conversation

pmuellr
Copy link
Member

@pmuellr pmuellr commented Jun 15, 2020

resolves #67864

Adding this to the actions README.md, it should be published as asciidocs at GA.

Checklist

Delete any items that are not applicable to this PR.

@pmuellr pmuellr added Feature:Alerting v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.9.0 labels Jun 15, 2020
@pmuellr
Copy link
Member Author

pmuellr commented Jun 16, 2020

Ready for review.

The originating issue #67864 mentions some items that I didn't add, as I wasn't sure what to add for them:

  • usability by a generic alert
  • integrations with the connectors list

I wasn't sure if "usability by a generic alert" was a sort of general "make it easy to use" point. Eg, don't make your config/secrets/params so complex that creating/editing these actions ends up being more complicated than it needs to. Perhaps mentioning to move as many things to config and keeping params smaller, to make reusing a connector easier (less things to fill in). Some of this stuff seems kinda basic, but perhaps worth mentioning ...

For integrations with the connectors list, I'm not aware of anything special an action has to do here, beyond setting licensing stuff.

@pmuellr pmuellr marked this pull request as ready for review June 16, 2020 16:21
@pmuellr pmuellr requested a review from a team as a code owner June 16, 2020 16:21
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)


## user interface

In order to make this action usable in the Kibana UI, you will need to provide all the UI editing aspects of the action. The existing action type user interfaces are defined in [`x-pack/plugins/triggers_actions_ui/public/application/components/builtin_action_types`](../triggers_actions_ui/public/application/components/builtin_action_types).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably it makes sense to add the proper link to the UI docs which describe how to create new action type. https://github.com/elastic/kibana/tree/master/x-pack/plugins/triggers_actions_ui#create-and-register-new-action-type-ui

Copy link
Contributor

@YulNaumenko YulNaumenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mikecote mikecote self-requested a review June 17, 2020 17:46
Copy link
Contributor

@mikecote mikecote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 few notes that could also be included.


## plugin location

Currently actions that are licensed as "basic" **MUST** be implemented in the actions plugin, other actions can be implemented in any other plugin that pre-reqs the actions plugin.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth a mention that if the action type isn't specific to their plugin (ex: blacklist IPs in SIEM, create a monitor in uptime, etc) that it should live within the actions plugin.

The last thing we'd want, for example, is the snapshot_restore plugin defining an IFTTT action type that users can't use when disabling the snapshot_restore plugin.


# Developing New Action Types

When creating a new action type, your plugin will eventually call `server.plugins.actions.setup.registerType()` to register the type with the actions plugin, but there are some additional things to think about about and implement.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth mentioning something along the lines of getting early structure / design feedback to avoid surprises in the PR.

@pmuellr pmuellr force-pushed the actions/readme-dev-requirements branch from 5418266 to 64dde1c Compare June 30, 2020 14:28
@pmuellr pmuellr merged commit 5226ea2 into elastic:master Jul 3, 2020
pmuellr added a commit to pmuellr/kibana that referenced this pull request Jul 3, 2020
…stic#69164)

* [Alerting] document requirements for developing new action types

resolves elastic#67864

Adding this to the actions README.md, it should be published as asciidocs at GA.
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 3, 2020
* master: (32 commits)
  [Ingest Pipelines] Load from json (elastic#70297)
  [Rum Dashbaord] Rum selected service view (elastic#70579)
  [Uptime] Prevent duplicate requests on load for index status (elastic#70585)
  [ML] Changing shared module setup function parameters (elastic#70589)
  [Ingest Manager] Add ability to sort to agent configs and package configs (elastic#70676)
  [Alerting] document requirements for developing new action types (elastic#69164)
  Fixed adding an extra space character on selecting alert variable in action text fields (elastic#70028)
  [Maps] show vector tile labels on top (elastic#69444)
  chore(NA): upgrade to lodash@4 (elastic#69868)
  Add Snapshot Restore README with quick-testing steps. (elastic#70494)
  [EPM] Use higher priority than default templates (elastic#70640)
  [Maps] Fix cannot select Solid fill-color when removing fields (elastic#70621)
  [kbn/optimizer] only build specified themes (elastic#70389)
  Fix saved query modal overlay (elastic#68826)
  Update component templates list to render empty prompt inside of content container. Show detail panel when deep-linked, even if there are no component templates. (elastic#70633)
  [Security Solution] Renames the `Investigate in Resolver` Timeline action (elastic#70634)
  fix 400 error on initial signals search (elastic#70618)
  [Maps] fix unable to edit heatmap metric (elastic#70606)
  Update network idle timeout (elastic#70629)
  [APM] Disable flaky useFetcher test (elastic#70638)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jul 3, 2020
* master: (199 commits)
  [Telemetry] Add documentation about Application Usage (elastic#70624)
  [Ingest Manager] Improve agent unenrollment with unenroll action (elastic#70031)
  Handle timeouts on creating templates (elastic#70635)
  [Lens] Add ability to set colors for y-axis series (elastic#70311)
  [Uptime] Use elastic charts donut (elastic#70364)
  [Ingest Manager] Update registry URL to point to snapshot registry (elastic#70687)
  [Composable template] Create / Edit wizard (elastic#70220)
  [APM] Optimize services overview (elastic#69648)
  [Ingest Pipelines] Load from json (elastic#70297)
  [Rum Dashbaord] Rum selected service view (elastic#70579)
  [Uptime] Prevent duplicate requests on load for index status (elastic#70585)
  [ML] Changing shared module setup function parameters (elastic#70589)
  [Ingest Manager] Add ability to sort to agent configs and package configs (elastic#70676)
  [Alerting] document requirements for developing new action types (elastic#69164)
  Fixed adding an extra space character on selecting alert variable in action text fields (elastic#70028)
  [Maps] show vector tile labels on top (elastic#69444)
  chore(NA): upgrade to lodash@4 (elastic#69868)
  Add Snapshot Restore README with quick-testing steps. (elastic#70494)
  [EPM] Use higher priority than default templates (elastic#70640)
  [Maps] Fix cannot select Solid fill-color when removing fields (elastic#70621)
  ...
pmuellr added a commit that referenced this pull request Jul 3, 2020
) (#70684)

* [Alerting] document requirements for developing new action types

resolves #67864

Adding this to the actions README.md, it should be published as asciidocs at GA.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported Feature:Alerting release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document requirements for developing a generic action type
4 participants