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

Add descriptions to alert types #81850

Merged
merged 22 commits into from
Nov 3, 2020

Conversation

mikecote
Copy link
Contributor

@mikecote mikecote commented Oct 27, 2020

Part of #75548

In this PR, I'm adding a description to each alert type that is registered in the UI as well as making it required in TypeScript for any new alert type that gets created.

There's a few upcoming features that will start taking advantage of these:

Note to codeowners

I gave it my best guess at how to describe each alert type. I'd like to have the description (and code) reviewed either to make sure the description accurate or to get feedback on a better suggestion. So far, starting every description with "Alert when" seems right. I will get @gchaps to help review these after your feedback.

Note for docs

From a technical perspective, the AlertTypeModel in the UI now requires via TypeScript a description property.

@mikecote mikecote 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.11.0 labels Oct 27, 2020
@mikecote mikecote self-assigned this Oct 27, 2020
@mikecote mikecote marked this pull request as ready for review October 28, 2020 15:22
@mikecote mikecote requested review from a team as code owners October 28, 2020 15:22
@mikecote mikecote requested a review from a team October 28, 2020 15:22
@mikecote mikecote requested a review from a team as a code owner October 28, 2020 15:22
@elasticmachine
Copy link
Contributor

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

@mikecote mikecote added this to In Review in Make it Action Oct 28, 2020
@@ -32,4 +32,7 @@ export const MonitorStatusTranslations = {
name: i18n.translate('xpack.uptime.alerts.monitorStatus.clientName', {
defaultMessage: 'Uptime monitor status',
}),
description: i18n.translate('xpack.uptime.alerts.monitorStatus.description', {
defaultMessage: 'Alert when the status of an Uptime monitor is down.',
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this need a better copy, uptime monitor status alert also incorporate availability alert
image

so may be something like monitor is down or availability crosses set threshold?

help needed here @paulb-elastic @drewpost

Choose a reason for hiding this comment

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

Alert when your synthetic monitor is down or its availability breaches an availability threshold

cc @shahzad31

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the feedback! I went ahead and updated the description for this Uptime alert here: 3c83b62.

@botelastic botelastic bot added Team:APM All issues that need APM UI Team support Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability labels Oct 28, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

Copy link
Contributor

@chrisronline chrisronline left a comment

Choose a reason for hiding this comment

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

LGTM for stack monitoring!

Copy link
Contributor

@formgeist formgeist left a comment

Choose a reason for hiding this comment

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

Suggested some minor changes to the APM alert descriptions.

@mikecote
Copy link
Contributor Author

mikecote commented Nov 2, 2020

@chrisronline @phillipb @formgeist thanks for making sure my descriptions were accurate. I got the descriptions reviewed by @gchaps and we slightly modified them. I could use another review 👍 for awareness.

@mikecote
Copy link
Contributor Author

mikecote commented Nov 3, 2020

@shahzad31

thanks for making sure my descriptions were accurate. I got the descriptions reviewed by @gchaps and we slightly modified them. I could use another review 👍 for awareness.

Same for Uptime now, I just finished updating the copy 👍

Copy link
Contributor

@phillipb phillipb left a comment

Choose a reason for hiding this comment

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

👍

description: i18n.translate(
'xpack.monitoring.alerts.elasticsearchVersionMismatch.description',
{
defaultMessage: 'Alert when the cluster has mutliple versions of Elasticsearch.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo here with mutliple

},
[ALERT_LOGSTASH_VERSION_MISMATCH]: {
label: i18n.translate('xpack.monitoring.alerts.logstashVersionMismatch.label', {
defaultMessage: 'Logstash version mismatch',
}),
description: i18n.translate('xpack.monitoring.alerts.logstashVersionMismatch.description', {
defaultMessage: 'Alert when the cluster has mutliple versions of Logstash.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo here with mutliple

Copy link
Contributor

@formgeist formgeist left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@chrisronline chrisronline 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 merged commit eb43158 into elastic:master Nov 3, 2020
mikecote added a commit to mikecote/kibana that referenced this pull request Nov 3, 2020
* Initial attempt at adding descriptions to alert types

* Fix typecheck failures

* Fix i18n check

* Fix failing jest test

* Fix i18n check again

* Apply changes for Uptime

* Update x-pack/plugins/apm/public/components/alerting/register_apm_alerts.ts

Co-authored-by: Casper Hübertz <casper@formgeist.com>

* Update x-pack/plugins/apm/public/components/alerting/register_apm_alerts.ts

Co-authored-by: Casper Hübertz <casper@formgeist.com>

* Fix jest test

* Update geo threshold description

* Update description of some alert types based on feedback from Gail

* Update description of some alert types based on feedback from Gail

* Fix i18n

* Fix i18n

* Fix ESLint

* Update some copy

* Update uptime alert description

* Fix typos

Co-authored-by: Casper Hübertz <casper@formgeist.com>
@mikecote mikecote moved this from In Review to Done (Ordered by most recent) in Make it Action Nov 3, 2020
mikecote added a commit that referenced this pull request Nov 3, 2020
* Initial attempt at adding descriptions to alert types

* Fix typecheck failures

* Fix i18n check

* Fix failing jest test

* Fix i18n check again

* Apply changes for Uptime

* Update x-pack/plugins/apm/public/components/alerting/register_apm_alerts.ts

Co-authored-by: Casper Hübertz <casper@formgeist.com>

* Update x-pack/plugins/apm/public/components/alerting/register_apm_alerts.ts

Co-authored-by: Casper Hübertz <casper@formgeist.com>

* Fix jest test

* Update geo threshold description

* Update description of some alert types based on feedback from Gail

* Update description of some alert types based on feedback from Gail

* Fix i18n

* Fix i18n

* Fix ESLint

* Update some copy

* Update uptime alert description

* Fix typos

Co-authored-by: Casper Hübertz <casper@formgeist.com>

Co-authored-by: Casper Hübertz <casper@formgeist.com>
@kibanamachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps


Test Failures

X-Pack API Integration Tests.x-pack/test/api_integration/apis/management/rollup/rollup·js.apis management rollup jobs Index patterns should return the date, numeric and keyword fields when an index pattern matches indices

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 1 times on tracked branches: https://dryrun

[00:00:00]       │
[00:00:00]         └-: apis
[00:00:00]           └-> "before all" hook
[00:04:06]           └-: management
[00:04:06]             └-> "before all" hook
[00:04:21]             └-: rollup
[00:04:21]               └-> "before all" hook
[00:04:21]               └-: jobs
[00:04:21]                 └-> "before all" hook
[00:04:21]                 └-: Index patterns
[00:04:21]                   └-> "before all" hook
[00:04:21]                   └-> should return the date, numeric and keyword fields when an index pattern matches indices
[00:04:21]                     └-> "before each" hook: global before each
[00:04:21]                     │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1604945402359657185] [xjljltdp-1604949928576] creating index, cause [api], templates [], shards [1]/[1]
[00:04:21]                     └- ✖ fail: apis management rollup jobs Index patterns should return the date, numeric and keyword fields when an index pattern matches indices
[00:04:21]                     │       Error: expected { doesMatchIndices: true,
[00:04:21]                     │   doesMatchRollupIndices: false,
[00:04:21]                     │   dateFields: [ 'testCreatedField' ],
[00:04:21]                     │   numericFields: [ '_doc_count', 'testTotalField' ],
[00:04:21]                     │   keywordFields: [ 'testTagField' ] } to sort of equal { dateFields: [ 'testCreatedField' ],
[00:04:21]                     │   keywordFields: [ 'testTagField' ],
[00:04:21]                     │   numericFields: [ 'testTotalField' ],
[00:04:21]                     │   doesMatchIndices: true,
[00:04:21]                     │   doesMatchRollupIndices: false }
[00:04:21]                     │       + expected - actual
[00:04:21]                     │ 
[00:04:21]                     │          "keywordFields": [
[00:04:21]                     │            "testTagField"
[00:04:21]                     │          ]
[00:04:21]                     │          "numericFields": [
[00:04:21]                     │       -    "_doc_count"
[00:04:21]                     │            "testTotalField"
[00:04:21]                     │          ]
[00:04:21]                     │        }
[00:04:21]                     │       
[00:04:21]                     │       at Assertion.assert (/dev/shm/workspace/parallel/23/kibana/packages/kbn-expect/expect.js:100:11)
[00:04:21]                     │       at Assertion.eql (/dev/shm/workspace/parallel/23/kibana/packages/kbn-expect/expect.js:244:8)
[00:04:21]                     │       at Context.it (test/api_integration/apis/management/rollup/rollup.js:48:25)
[00:04:21]                     │ 
[00:04:21]                     │ 

Stack Trace

{ Error: expected { doesMatchIndices: true,
  doesMatchRollupIndices: false,
  dateFields: [ 'testCreatedField' ],
  numericFields: [ '_doc_count', 'testTotalField' ],
  keywordFields: [ 'testTagField' ] } to sort of equal { dateFields: [ 'testCreatedField' ],
  keywordFields: [ 'testTagField' ],
  numericFields: [ 'testTotalField' ],
  doesMatchIndices: true,
  doesMatchRollupIndices: false }
    at Assertion.assert (/dev/shm/workspace/parallel/23/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.eql (/dev/shm/workspace/parallel/23/kibana/packages/kbn-expect/expect.js:244:8)
    at Context.it (test/api_integration/apis/management/rollup/rollup.js:48:25)
  actual:
   '{\n  "dateFields": [\n    "testCreatedField"\n  ]\n  "doesMatchIndices": true\n  "doesMatchRollupIndices": false\n  "keywordFields": [\n    "testTagField"\n  ]\n  "numericFields": [\n    "_doc_count"\n    "testTotalField"\n  ]\n}',
  expected:
   '{\n  "dateFields": [\n    "testCreatedField"\n  ]\n  "doesMatchIndices": true\n  "doesMatchRollupIndices": false\n  "keywordFields": [\n    "testTagField"\n  ]\n  "numericFields": [\n    "testTotalField"\n  ]\n}',
  showDiff: true }

X-Pack API Integration Tests.x-pack/test/api_integration/apis/management/rollup/rollup·js.apis management rollup jobs Index patterns should return the date, numeric and keyword fields when an index pattern matches indices

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches

[00:00:00]       │
[00:00:00]         └-: apis
[00:00:00]           └-> "before all" hook
[00:04:09]           └-: management
[00:04:09]             └-> "before all" hook
[00:04:24]             └-: rollup
[00:04:24]               └-> "before all" hook
[00:04:24]               └-: jobs
[00:04:24]                 └-> "before all" hook
[00:04:24]                 └-: Index patterns
[00:04:24]                   └-> "before all" hook
[00:04:24]                   └-> should return the date, numeric and keyword fields when an index pattern matches indices
[00:04:24]                     └-> "before each" hook: global before each
[00:04:24]                     │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1604945402359657185] [vhaklzeyzxr-1604948594464] creating index, cause [api], templates [], shards [1]/[1]
[00:04:24]                     └- ✖ fail: apis management rollup jobs Index patterns should return the date, numeric and keyword fields when an index pattern matches indices
[00:04:24]                     │       Error: expected { doesMatchIndices: true,
[00:04:24]                     │   doesMatchRollupIndices: false,
[00:04:24]                     │   dateFields: [ 'testCreatedField' ],
[00:04:24]                     │   numericFields: [ '_doc_count', 'testTotalField' ],
[00:04:24]                     │   keywordFields: [ 'testTagField' ] } to sort of equal { dateFields: [ 'testCreatedField' ],
[00:04:24]                     │   keywordFields: [ 'testTagField' ],
[00:04:24]                     │   numericFields: [ 'testTotalField' ],
[00:04:24]                     │   doesMatchIndices: true,
[00:04:24]                     │   doesMatchRollupIndices: false }
[00:04:24]                     │       + expected - actual
[00:04:24]                     │ 
[00:04:24]                     │          "keywordFields": [
[00:04:24]                     │            "testTagField"
[00:04:24]                     │          ]
[00:04:24]                     │          "numericFields": [
[00:04:24]                     │       -    "_doc_count"
[00:04:24]                     │            "testTotalField"
[00:04:24]                     │          ]
[00:04:24]                     │        }
[00:04:24]                     │       
[00:04:24]                     │       at Assertion.assert (/dev/shm/workspace/parallel/23/kibana/packages/kbn-expect/expect.js:100:11)
[00:04:24]                     │       at Assertion.eql (/dev/shm/workspace/parallel/23/kibana/packages/kbn-expect/expect.js:244:8)
[00:04:24]                     │       at Context.it (test/api_integration/apis/management/rollup/rollup.js:48:25)
[00:04:24]                     │ 
[00:04:24]                     │ 

Stack Trace

{ Error: expected { doesMatchIndices: true,
  doesMatchRollupIndices: false,
  dateFields: [ 'testCreatedField' ],
  numericFields: [ '_doc_count', 'testTotalField' ],
  keywordFields: [ 'testTagField' ] } to sort of equal { dateFields: [ 'testCreatedField' ],
  keywordFields: [ 'testTagField' ],
  numericFields: [ 'testTotalField' ],
  doesMatchIndices: true,
  doesMatchRollupIndices: false }
    at Assertion.assert (/dev/shm/workspace/parallel/23/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.eql (/dev/shm/workspace/parallel/23/kibana/packages/kbn-expect/expect.js:244:8)
    at Context.it (test/api_integration/apis/management/rollup/rollup.js:48:25)
  actual:
   '{\n  "dateFields": [\n    "testCreatedField"\n  ]\n  "doesMatchIndices": true\n  "doesMatchRollupIndices": false\n  "keywordFields": [\n    "testTagField"\n  ]\n  "numericFields": [\n    "_doc_count"\n    "testTotalField"\n  ]\n}',
  expected:
   '{\n  "dateFields": [\n    "testCreatedField"\n  ]\n  "doesMatchIndices": true\n  "doesMatchRollupIndices": false\n  "keywordFields": [\n    "testTagField"\n  ]\n  "numericFields": [\n    "testTotalField"\n  ]\n}',
  showDiff: true }

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
monitoring 964.5KB 965.0KB +467.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
apm 47.3KB 48.2KB +884.0B
infra 172.7KB 173.2KB +572.0B
monitoring 33.1KB 35.5KB +2.4KB
triggersActionsUi 131.9KB 132.4KB +510.0B
uptime 23.9KB 24.7KB +834.0B
total +5.1KB

Saved Objects .kibana field count

Every field in each saved object type adds overhead to Elasticsearch. Kibana needs to keep the total field count below Elasticsearch's default limit of 1000 fields. Only specify field mappings for the fields you wish to search on or query. See https://www.elastic.co/guide/en/kibana/master/development-plugin-saved-objects.html#_mappings

id before after diff
_doc_count - 1 +1

History

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting release_note:skip Skip the PR/issue when compiling release notes Team:APM All issues that need APM UI Team support Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.11.0 v8.0.0
Projects
No open projects
Make it Action
  
Done (Ordered by most recent)
Development

Successfully merging this pull request may close these issues.

None yet