Skip to content

Commit

Permalink
[8.x] [Synthetics] Improve synthetics alerting (#186585) (#194671)
Browse files Browse the repository at this point in the history
# 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-->
  • Loading branch information
shahzad31 authored Oct 2, 2024
1 parent bbec3c4 commit 757e919
Show file tree
Hide file tree
Showing 99 changed files with 6,110 additions and 1,352 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@
"@kbn/observability-onboarding-plugin": "link:x-pack/plugins/observability_solution/observability_onboarding",
"@kbn/observability-plugin": "link:x-pack/plugins/observability_solution/observability",
"@kbn/observability-shared-plugin": "link:x-pack/plugins/observability_solution/observability_shared",
"@kbn/observability-synthetics-test-data": "link:x-pack/packages/observability/synthetics_test_data",
"@kbn/observability-utils": "link:x-pack/packages/observability/observability_utils",
"@kbn/oidc-provider-plugin": "link:x-pack/test/security_api_integration/plugins/oidc_provider",
"@kbn/open-telemetry-instrumented-plugin": "link:test/common/plugins/otel_metrics",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,15 @@ const ObservabilityUptimeAlertOptional = rt.partial({
value: schemaStringArray,
})
),
'location.id': schemaString,
'location.name': schemaString,
'location.id': schemaStringArray,
'location.name': schemaStringArray,
'monitor.id': schemaString,
'monitor.name': schemaString,
'monitor.state.id': schemaString,
'monitor.tags': schemaStringArray,
'monitor.type': schemaString,
'observer.geo.name': schemaString,
'observer.geo.name': schemaStringArray,
'observer.name': schemaStringArray,
'tls.server.hash.sha256': schemaString,
'tls.server.x509.issuer.common_name': schemaString,
'tls.server.x509.not_after': schemaDate,
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -1306,6 +1306,8 @@
"@kbn/observability-plugin/*": ["x-pack/plugins/observability_solution/observability/*"],
"@kbn/observability-shared-plugin": ["x-pack/plugins/observability_solution/observability_shared"],
"@kbn/observability-shared-plugin/*": ["x-pack/plugins/observability_solution/observability_shared/*"],
"@kbn/observability-synthetics-test-data": ["x-pack/packages/observability/synthetics_test_data"],
"@kbn/observability-synthetics-test-data/*": ["x-pack/packages/observability/synthetics_test_data/*"],
"@kbn/observability-utils": ["x-pack/packages/observability/observability_utils"],
"@kbn/observability-utils/*": ["x-pack/packages/observability/observability_utils/*"],
"@kbn/oidc-provider-plugin": ["x-pack/test/security_api_integration/plugins/oidc_provider"],
Expand Down
3 changes: 3 additions & 0 deletions x-pack/packages/observability/synthetics_test_data/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @kbn/observability-synthetics-test-data

Provides utilities to generate synthetics test data
8 changes: 8 additions & 0 deletions x-pack/packages/observability/synthetics_test_data/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

export { makeUpSummary, makeDownSummary } from './src/make_summaries';
12 changes: 12 additions & 0 deletions x-pack/packages/observability/synthetics_test_data/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

module.exports = {
preset: '@kbn/test',
rootDir: '../../../..',
roots: ['<rootDir>/x-pack/packages/observability/synthetics_test_data'],
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "shared-common",
"id": "@kbn/observability-synthetics-test-data",
"owner": "@elastic/obs-ux-management-team",
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "@kbn/observability-synthetics-test-data",
"descriptio": "Utils to generate observability synthetics test data",
"author": "UX Management",
"private": true,
"version": "1.0.0",
"license": "Elastic License 2.0"
}
Loading

0 comments on commit 757e919

Please sign in to comment.