Skip to content

Commit

Permalink
improve synthetics alerting
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Jun 27, 2024
1 parent 54bbea4 commit 49a2a8f
Show file tree
Hide file tree
Showing 76 changed files with 3,601 additions and 964 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ x-pack/plugins/observability_solution/observability_logs_explorer @elastic/obs-u
x-pack/plugins/observability_solution/observability_onboarding @elastic/obs-ux-logs-team @elastic/obs-ux-onboarding-team
x-pack/plugins/observability_solution/observability @elastic/obs-ux-management-team
x-pack/plugins/observability_solution/observability_shared @elastic/observability-ui
x-pack/packages/observability/synthetics_test_data @elastic/obs-ux-infra_services-team
x-pack/test/security_api_integration/plugins/oidc_provider @elastic/kibana-security
test/common/plugins/otel_metrics @elastic/obs-ux-infra_services-team
packages/kbn-openapi-bundler @elastic/security-detection-rule-management
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,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/oidc-provider-plugin": "link:x-pack/test/security_api_integration/plugins/oidc_provider",
"@kbn/open-telemetry-instrumented-plugin": "link:test/common/plugins/otel_metrics",
"@kbn/openapi-common": "link:packages/kbn-openapi-common",
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,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/oidc-provider-plugin": ["x-pack/test/security_api_integration/plugins/oidc_provider"],
"@kbn/oidc-provider-plugin/*": ["x-pack/test/security_api_integration/plugins/oidc_provider/*"],
"@kbn/open-telemetry-instrumented-plugin": ["test/common/plugins/otel_metrics"],
Expand Down
21 changes: 21 additions & 0 deletions x-pack/packages/kbn-slo-schema/src/rest_specs/indicators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,27 @@ type KQLCustomIndicator = t.OutputOf<typeof kqlCustomIndicatorSchema>;
type KqlWithFiltersSchema = t.TypeOf<typeof kqlWithFiltersSchema>;
type QuerySchema = t.TypeOf<typeof querySchema>;
type FiltersSchema = t.TypeOf<typeof filtersSchema>;

const filters: FiltersSchema = [
{
meta: {
alias: null,
disabled: false,
field: 'log.file.path.keyword',
index: 'logging-*:service-puppetserver*-id',
key: 'log.file.path.keyword',
negate: false,
params: { query: '/hostfs/var/log/puppetlabs/puppetserver/puppetserver-access.log.json' },
type: 'phrase',
},
query: {
match_phrase: {
'log.file.path.keyword':
'/hostfs/var/log/puppetlabs/puppetserver/puppetserver-access.log.json',
},
},
},
];
type GroupingsSchema = t.TypeOf<typeof groupingsSchema>;

export type {
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-infra_services-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 Infra Service",
"private": true,
"version": "1.0.0",
"license": "Elastic License 2.0"
}
Loading

0 comments on commit 49a2a8f

Please sign in to comment.