-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Synthetics] Improve synthetics alerting #186585
Conversation
/ci |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
/ci |
1 similar comment
/ci |
bd7d959
to
49a2a8f
Compare
/ci |
/ci |
/ci |
/ci |
💔 Build Failed
Failed CI Steps
Test Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
async chunk count
ESLint disabled line counts
Total ESLint disabled count
History
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking a lot better and pretty close IMO.
In terms of smoke testing, I:
- ran TLS rules that should not fail
- ran TLS rules that should alert
- ran MS rules that check location
- ran MS rules that check project
- ran MS rules that check monitor name
- ran MS rules that check tags
- changed the value of the failure threshold
- changed the number of locations required to be down
I did see this error logged in my Kibana
Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
Arguments:
[0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: now-2m, _f: undefined, _strict: undefined, _locale: [object Object]
Error:
at Function.createFromInputFallback (kibana/node_modules/moment/moment.js:324:25)
at configFromString (kibana/node_modules/moment/moment.js:2613:19)
at configFromInput (kibana/node_modules/moment/moment.js:3056:13)
at prepareConfig (kibana/node_modules/moment/moment.js:3039:13)
at createFromConfig (kibana/node_modules/moment/moment.js:3006:44)
at createLocalOrUTC (kibana/node_modules/moment/moment.js:3100:16)
at createLocal (kibana/node_modules/moment/moment.js:3104:16)
at cloneWithOffset (kibana/node_modules/moment/moment.js:3353:20)
at Moment.diff (kibana/node_modules/moment/moment.js:3917:16)
at StatusRuleExecutor.getRange (status_rule_executor.ts:223:60)
at StatusRuleExecutor.getDownChecks (status_rule_executor.ts:136:24)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Object.executor (monitor_status_rule.ts:77:60)
at rule_type_runner.ts:212:28
at TaskRunnerTimer.runWithTimer (task_runner_timer.ts:50:20)
at RuleTypeRunner.run (rule_type_runner.ts:187:57)
at TaskRunner.runRule (task_runner.ts:355:9)
at TaskRunner.run (task_runner.ts:645:9)
at TaskManagerRunner.run (task_runner.ts:389:22)
...tion/synthetics/public/apps/synthetics/components/alerts/common/field_popover_expression.tsx
Outdated
Show resolved
Hide resolved
isClearable | ||
fullWidth | ||
isLoading={isLoading} | ||
onChange={(selected: Array<EuiComboBoxOptionOption<string>>) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be nice to have this handler tested.
...ution/synthetics/public/apps/synthetics/components/alerts/common/for_the_last_expression.tsx
Show resolved
Hide resolved
import React, { useState, ReactNode } from 'react'; | ||
import { EuiExpression, EuiPopover } from '@elastic/eui'; | ||
|
||
type ExpressionColor = 'subdued' | 'primary' | 'success' | 'accent' | 'warning' | 'danger'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type ExpressionColor = 'subdued' | 'primary' | 'success' | 'accent' | 'warning' | 'danger'; |
As noted before, I think you can simply import this type from EUI.
...ins/observability_solution/synthetics/public/apps/synthetics/components/alerts/query_bar.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11129829761 |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
## Summary Fixes elastic#175298 Improve synthetics alerting !! User will be able to create custom synthetics status alert by defining three kind of criteria ### Monitor is down over last consective checks with threshold <img width="639" alt="image" src="https://github.com/elastic/kibana/assets/3505601/390da238-f7f2-4eb0-9606-3279b3199fdf"> ### From Locations threshold Will be considered down only when from defined number of locations <img width="618" alt="image" src="https://github.com/elastic/kibana/assets/3505601/24741a10-0880-4247-9048-8ce03df25bf5"> ### Over time with checks threshold just like uptime custom status alert <img width="631" alt="image" src="https://github.com/elastic/kibana/assets/3505601/64e1c808-8d4b-4dd0-b794-eb7f4e5d1e6b"> --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Dominique Clarke <[email protected]> Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Maryam Saeidi <[email protected]> Co-authored-by: Justin Kambic <[email protected]> (cherry picked from commit 82d0b00) # Conflicts: # .github/CODEOWNERS # x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/alerts/query_bar.tsx
# Backport This will backport the following commits from `main` to `8.x`: - [[Synthetics] Improve synthetics alerting (#186585)](#186585) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Shahzad","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-01T16:48:39Z","message":"[Synthetics] Improve synthetics alerting (#186585)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/175298\r\n\r\nImprove synthetics alerting !!\r\n\r\nUser will be able to create custom synthetics status alert by defining\r\nthree kind of criteria\r\n\r\n### Monitor is down over last consective checks with threshold\r\n\r\n<img width=\"639\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/3505601/390da238-f7f2-4eb0-9606-3279b3199fdf\">\r\n\r\n### From Locations threshold\r\n\r\nWill be considered down only when from defined number of locations\r\n\r\n<img width=\"618\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/3505601/24741a10-0880-4247-9048-8ce03df25bf5\">\r\n\r\n\r\n### Over time with checks threshold just like uptime custom status alert\r\n\r\n<img width=\"631\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/3505601/64e1c808-8d4b-4dd0-b794-eb7f4e5d1e6b\">\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Dominique Clarke <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>\r\nCo-authored-by: Maryam Saeidi <[email protected]>\r\nCo-authored-by: Justin Kambic <[email protected]>","sha":"82d0b008cdc4f9bcfe3bc858b15d6d30e91fed89","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","v9.0.0","release_note:feature","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-management"],"number":186585,"url":"https://github.com/elastic/kibana/pull/186585","mergeCommit":{"message":"[Synthetics] Improve synthetics alerting (#186585)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/175298\r\n\r\nImprove synthetics alerting !!\r\n\r\nUser will be able to create custom synthetics status alert by defining\r\nthree kind of criteria\r\n\r\n### Monitor is down over last consective checks with threshold\r\n\r\n<img width=\"639\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/3505601/390da238-f7f2-4eb0-9606-3279b3199fdf\">\r\n\r\n### From Locations threshold\r\n\r\nWill be considered down only when from defined number of locations\r\n\r\n<img width=\"618\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/3505601/24741a10-0880-4247-9048-8ce03df25bf5\">\r\n\r\n\r\n### Over time with checks threshold just like uptime custom status alert\r\n\r\n<img width=\"631\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/3505601/64e1c808-8d4b-4dd0-b794-eb7f4e5d1e6b\">\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Dominique Clarke <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>\r\nCo-authored-by: Maryam Saeidi <[email protected]>\r\nCo-authored-by: Justin Kambic <[email protected]>","sha":"82d0b008cdc4f9bcfe3bc858b15d6d30e91fed89"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/186585","number":186585,"mergeCommit":{"message":"[Synthetics] Improve synthetics alerting (#186585)\n\n## Summary\r\n\r\nFixes https://github.com/elastic/kibana/issues/175298\r\n\r\nImprove synthetics alerting !!\r\n\r\nUser will be able to create custom synthetics status alert by defining\r\nthree kind of criteria\r\n\r\n### Monitor is down over last consective checks with threshold\r\n\r\n<img width=\"639\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/3505601/390da238-f7f2-4eb0-9606-3279b3199fdf\">\r\n\r\n### From Locations threshold\r\n\r\nWill be considered down only when from defined number of locations\r\n\r\n<img width=\"618\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/3505601/24741a10-0880-4247-9048-8ce03df25bf5\">\r\n\r\n\r\n### Over time with checks threshold just like uptime custom status alert\r\n\r\n<img width=\"631\" alt=\"image\"\r\nsrc=\"https://github.com/elastic/kibana/assets/3505601/64e1c808-8d4b-4dd0-b794-eb7f4e5d1e6b\">\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Dominique Clarke <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>\r\nCo-authored-by: Maryam Saeidi <[email protected]>\r\nCo-authored-by: Justin Kambic <[email protected]>","sha":"82d0b008cdc4f9bcfe3bc858b15d6d30e91fed89"}}]}] BACKPORT-->
Summary
Fixes #175298
Improve synthetics alerting !!
We have improved synthetics alerting to allow users to create custom rules, users will be able to limit rules scope by filtering monitors by Monitor name, tags, type or location. This will allow users to send alerts to different teams for different monitors by defining respective action connectors in each rule.
User will be able to create custom synthetics status alert by defining two kind of criteria
First kind of threshold is Monitor is down over last consecutive checks with threshold from x locations. This will allow users to let’s say define a threshold, Monitor abc is down 3 times from the last 5 checks from 1 location. Users can also change the location threshold to specify from how many locations the threshold should be met.
The other threshold specifies a time window for checks, example being Monitor is down 3 times in the last 10 minutes from 2 locations.
By default if only 1 location threshold is selected, users can choose either to get an alert per location or get a summary message for all locations. If the user chooses multiple locations threshold then a summary message is always sent.
Monitor is down over last consective checks with threshold
with Locations threshold
user can also select location threshold to say only when down from x locations
Over time with checks threshold just like uptime custom status alert