Skip to content
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

[ML] [AIOps] Log Rate Analysis: Shows top N results when no docs in baseline or deviation #171924

Merged
merged 20 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 142 additions & 0 deletions x-pack/plugins/aiops/common/__mocks__/artificial_logs/top_terms.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
/*
* 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 { SignificantItem } from '@kbn/ml-agg-utils';

// Named topTerms since all these items are of type `keyword`.
export const topTerms: SignificantItem[] = [
{
bg_count: 0,
doc_count: 5102,
fieldName: 'version',
fieldValue: 'v1.0.0',
key: 'version:v1.0.0',
normalizedScore: 0,
pValue: 1,
score: 0,
total_bg_count: 0,
total_doc_count: 0,
type: 'keyword',
},
{
bg_count: 0,
doc_count: 2272,
fieldName: 'response_code',
fieldValue: '500',
key: 'response_code:500',
normalizedScore: 0,
pValue: 1,
score: 0,
total_bg_count: 0,
total_doc_count: 0,
type: 'keyword',
},
{
bg_count: 0,
doc_count: 2197,
fieldName: 'url',
fieldValue: 'home.php',
key: 'url:home.php',
normalizedScore: 0,
pValue: 1,
score: 0,
total_bg_count: 0,
total_doc_count: 0,
type: 'keyword',
},
{
bg_count: 0,
doc_count: 1981,
fieldName: 'user',
fieldValue: 'Peter',
key: 'user:Peter',
normalizedScore: 0,
pValue: 1,
score: 0,
total_bg_count: 0,
total_doc_count: 0,
type: 'keyword',
},
{
bg_count: 0,
doc_count: 1773,
fieldName: 'user',
fieldValue: 'Paul',
key: 'user:Paul',
normalizedScore: 0,
pValue: 1,
score: 0,
total_bg_count: 0,
total_doc_count: 0,
type: 'keyword',
},
{
bg_count: 0,
doc_count: 1574,
fieldName: 'url',
fieldValue: 'login.php',
key: 'url:login.php',
normalizedScore: 0,
pValue: 1,
score: 0,
total_bg_count: 0,
total_doc_count: 0,
type: 'keyword',
},
{
bg_count: 0,
doc_count: 1569,
fieldName: 'response_code',
fieldValue: '404',
key: 'response_code:404',
normalizedScore: 0,
pValue: 1,
score: 0,
total_bg_count: 0,
total_doc_count: 0,
type: 'keyword',
},
{
bg_count: 0,
doc_count: 1348,
fieldName: 'user',
fieldValue: 'Mary',
key: 'user:Mary',
normalizedScore: 0,
pValue: 1,
score: 0,
total_bg_count: 0,
total_doc_count: 0,
type: 'keyword',
},
{
bg_count: 0,
doc_count: 1331,
fieldName: 'url',
fieldValue: 'user.php',
key: 'url:user.php',
normalizedScore: 0,
pValue: 1,
score: 0,
total_bg_count: 0,
total_doc_count: 0,
type: 'keyword',
},
{
bg_count: 0,
doc_count: 1261,
fieldName: 'response_code',
fieldValue: '200',
key: 'response_code:200',
normalizedScore: 0,
pValue: 1,
score: 0,
total_bg_count: 0,
total_doc_count: 0,
type: 'keyword',
},
];
Loading
Loading