Skip to content

Commit

Permalink
Adding host_risk_score_latest to the list of patterns to track for te…
Browse files Browse the repository at this point in the history
…lemetry (#108547)

* Adding host_risk_score_latest to the list of patterns to track for telemetry

* Adding a test

* Removing extra spaces at end of line- should make the linter happy
  • Loading branch information
ajosh0504 committed Aug 13, 2021
1 parent 79eb426 commit c6dc6e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ export const DATA_DATASETS_INDEX_PATTERNS = [

// meow attacks
{ pattern: '*meow*', patternName: 'meow' },

// experimental ml
{ pattern: '*host_risk_score_latest', patternName: 'host_risk_score' },
] as const;

// Get the unique list of index patterns (some are duplicated for documentation purposes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ describe('get_data_telemetry', () => {
{ name: 'metricbeat-1234', docCount: 100, sizeInBytes: 10, isECS: false },
{ name: '.app-search-1234', docCount: 0 },
{ name: 'logs-endpoint.1234', docCount: 0 }, // Matching pattern with a dot in the name
{ name: 'ml_host_risk_score_latest', docCount: 0 },
{ name: 'ml_host_risk_score', docCount: 0 }, // This should not match
// New Indexing strategy: everything can be inferred from the constant_keyword values
{
name: '.ds-logs-nginx.access-default-000001',
Expand Down Expand Up @@ -165,6 +167,11 @@ describe('get_data_telemetry', () => {
index_count: 1,
doc_count: 0,
},
{
pattern_name: 'host_risk_score',
index_count: 1,
doc_count: 0,
},
{
data_stream: { dataset: 'nginx.access', type: 'logs' },
shipper: 'filebeat',
Expand Down

0 comments on commit c6dc6e2

Please sign in to comment.