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

[Actions] Add preconfigured actions to our telemetry data #112514

Merged

Conversation

chrisronline
Copy link
Contributor

@chrisronline chrisronline commented Sep 17, 2021

Resolves #111730

See the hack listed in the issue:

(hack: set runAt: new Date() here to constantly calculate telemetry, it will be easier to evaluate the result after the following steps)

In this setup, there are two preconfigured email actions, the preconfigured alert history index config, and one server log action manually added.

Shared config:

xpack.actions.preconfiguredAlertHistoryEsIndex: true
xpack.actions.preconfigured:
  cloud_email:
    name: 'Cloud Stack Monitoring Email'
    actionTypeId: .email
    config:
      from: monitoring@elastic.co
      host: smtp.gmail.com
      port: 465
      secure: true
    secrets:
      user: chris.roberson@elastic.co
      password: #######
  dev_email:
    name: 'Local Monitoring Email'
    actionTypeId: .email
    config:
      from: monitoring@elastic.co
      host: 0.0.0.0
      port: 1025

Shared actions:
Screen Shot 2021-09-20 at 9 19 58 AM

Master telemetry:

{
  "actions": {
    "count_total": 1,
    "count_by_type": {
      "server_log": 1
    },
    "count_active_total": 1,
    "count_active_by_type": {
      "server_log": 1
    },
    "count_active_alert_history_connectors": 0,
    "alert_history_connector_enabled": true
  }
}

PR telemetry:

{
  "actions": {
    "count_total": 4,
    "count_by_type": {
      "server_log": 1,
      "index": 1,
      "email": 2
    },
    "count_active_total": 3,
    "count_active_by_type": {
      "server_log": 1,
      "email": 1,
      "index": 1
    },
    "count_active_alert_history_connectors": 1,
    "alert_history_connector_enabled": true
  }
}

@chrisronline chrisronline changed the title Add preconfigured action telemetry [Actions] Add preconfigured actions to our telemetry data Sep 20, 2021
@chrisronline chrisronline added Feature:Actions/Framework Issues related to the Actions Framework Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.16.0 v8.0.0 release_note:skip Skip the PR/issue when compiling release notes labels Sep 20, 2021
@chrisronline chrisronline marked this pull request as ready for review September 20, 2021 13:45
@chrisronline chrisronline requested a review from a team as a code owner September 20, 2021 13:45
@elasticmachine
Copy link
Contributor

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

@ymao1
Copy link
Contributor

ymao1 commented Sep 22, 2021

I created a rule with 3 connectors: 1 preconfigured server log, 1 preconfigured alert history and 1 non-preconfigured server log. It looks like it's only counting one instance of the server log when I think it should be two?

{
  actions: {
    count_total: 7,
    count_by_type: {
      server_log: 1,
      index: 2,
      servicenow: 1,
      pagerduty: 1,
      slack: 1
  },
  count_active_total: 3,
  count_active_by_type: {
    server_log: 1,
    index: 1
  },
  count_active_alert_history_connectors: 1,
  alert_history_connector_enabled: true
}

count_total and count_active_total look correct but under count_by_type and count_active_by_type, I think server_log should be 2 in both cases.

@chrisronline
Copy link
Contributor Author

@ymao1 Great find, fixed in 553b2f0

Copy link
Contributor

@ymao1 ymao1 left a comment

Choose a reason for hiding this comment

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

LGTM! Works as expected.

@chrisronline
Copy link
Contributor Author

@elasticmachine merge upstream

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

@chrisronline
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@chrisronline chrisronline merged commit 0d3fa76 into elastic:master Sep 27, 2021
@chrisronline chrisronline deleted the actions/preconfigured_telemetry branch September 27, 2021 15:17
chrisronline added a commit to chrisronline/kibana that referenced this pull request Sep 27, 2021
…2514)

* Add preconfigured action telemetry

* Revert this change

* Treat the preconfigured action ids the same as the non preconfigured ones

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
chrisronline added a commit that referenced this pull request Sep 27, 2021
…113132)

* Add preconfigured action telemetry

* Revert this change

* Treat the preconfigured action ids the same as the non preconfigured ones

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Actions/Framework Issues related to the Actions Framework 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.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Connector telemetry doesn't count pre-configured connectors
5 participants