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

[Logs UI] Create ML module for log analysis #42872

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ describe('ML - data recognizer', () => {
'apm_transaction',
'auditbeat_process_docker_ecs',
'auditbeat_process_hosts_ecs',
'logs_ui_analysis',
'metricbeat_system_ecs',
'nginx_ecs',
'sample_data_ecommerce',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"icon": "loggingApp"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"id": "logs_ui_analysis",
"title": "Log Analysis",
"description": "Detect anomalies in log entries via the Logs UI",
"type": "Logs",
"logoFile": "logo.json",
"jobs": [
{
"id": "log-entry-rate",
"file": "log_entry_rate.json"
}
],
"datafeeds": [
{
"id": "datafeed-log-entry-rate",
"file": "datafeed_log_entry_rate.json",
"job_id": "log-entry-rate"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"job_id": "JOB_ID",
"indexes": ["INDEX_PATTERN_NAME"],
"aggregations": {
"buckets": {
"date_histogram": {
"field": "@timestamp",
"fixed_interval": "900000ms"
},
"aggregations": {
"doc_count_per_minute": {
"bucket_script": {
"buckets_path": {
"doc_count": "_count"
},
"script": {
"lang": "painless",
"params": {
"bucket_span_in_ms": 900000
},
"source": "60 * 1000 * params.doc_count / params.bucket_span_in_ms"
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"job_type": "anomaly_detector",
"description": "Detect anomalies in the log entry ingestion rate",
"groups": ["logs-ui"],
"analysis_config": {
"bucket_span": "15m",
"summary_count_field_name": "doc_count_per_minute",
"detectors": [
{
"detector_description": "count",
"function": "count",
"detector_index": 0
}
],
"influencers": []
},
"analysis_limits": {
"model_memory_limit": "10mb"
},
"data_description": {
"time_field": "@timestamp",
"time_format": "epoch_ms"
},
"model_plot_config": {
"enabled": true
},
"custom_settings": {
"created_by": "ml-module-logs-ui-analysis"
}
}