forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Security Solution][Detection Engine] adds EBT telemetry for rule pre…
…view (elastic#194326) ## Summary - adds basic EBT telemetry for rule preview ### To test Use Discover Data View in staging to see reported events: https://telemetry-v2-staging.elastic.dev/s/securitysolution/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-28h,to:now))&_a=(columns:!(properties.ruleType,properties.loggedRequestsEnabled),filters:!(),index:security-solution-ebt-kibana-browser,interval:auto,query:(language:kuery,query:'event_type%20:%20%22Preview%20rule%22'),sort:!(!(timestamp,desc))) Note, there is a few hours delay from event reported locally to be stored on staging host
- Loading branch information
Showing
9 changed files
with
83 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
x-pack/plugins/security_solution/public/common/lib/telemetry/events/preview_rule/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
import type { TelemetryEvent } from '../../types'; | ||
import { TelemetryEventTypes } from '../../constants'; | ||
|
||
export const previewRuleEvent: TelemetryEvent = { | ||
eventType: TelemetryEventTypes.PreviewRule, | ||
schema: { | ||
ruleType: { | ||
type: 'keyword', | ||
_meta: { | ||
description: 'Rule type', | ||
optional: false, | ||
}, | ||
}, | ||
loggedRequestsEnabled: { | ||
type: 'boolean', | ||
_meta: { | ||
description: 'shows if preview executed with enabled logged requests', | ||
optional: false, | ||
}, | ||
}, | ||
}, | ||
}; |
20 changes: 20 additions & 0 deletions
20
x-pack/plugins/security_solution/public/common/lib/telemetry/events/preview_rule/types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* 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. | ||
*/ | ||
import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; | ||
|
||
import type { RootSchema } from '@kbn/core/public'; | ||
import type { TelemetryEventTypes } from '../../constants'; | ||
|
||
export interface PreviewRuleParams { | ||
ruleType: Type; | ||
loggedRequestsEnabled: boolean; | ||
} | ||
|
||
export interface PreviewRuleTelemetryEvent { | ||
eventType: TelemetryEventTypes.PreviewRule; | ||
schema: RootSchema<PreviewRuleParams>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...rity_solution/scripts/telemetry/saved_objects/security_solution_ebt_kibana_browser.ndjson
Large diffs are not rendered by default.
Oops, something went wrong.