Skip to content

Commit

Permalink
[AO][SERVERLESS] Fix Custom Threshold rule tests for Serverless (#166942
Browse files Browse the repository at this point in the history
)

## Summary

Fixes #165569
Fixes #166617
Fixes #166618
Fixes #166619
Fixes #166620
  • Loading branch information
fkanout authored Sep 29, 2023
1 parent 5b0ec2e commit 4c1ca7e
Show file tree
Hide file tree
Showing 23 changed files with 553 additions and 296 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"_meta": {
"documentation": "https://www.elastic.co/guide/en/ecs/current/ecs-base.html",
"ecs_version": "8.0.0"
},
"template": {
"mappings": {
"properties": {
"@timestamp": {
"type": "date"
},
"labels": {
"type": "object"
},
"message": {
"type": "match_only_text"
},
"tags": {
"ignore_above": 1024,
"type": "keyword"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"_meta": {
"documentation": "https://www.elastic.co/guide/en/ecs/current/ecs-event.html",
"ecs_version": "8.0.0"
},
"template": {
"mappings": {
"properties": {
"event": {
"properties": {
"dataset": {
"ignore_above": 1024,
"type": "keyword"
},
"module": {
"ignore_above": 1024,
"type": "keyword"
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
{
"_meta": {
"documentation": "https://www.elastic.co/guide/en/ecs/current/ecs-host.html",
"ecs_version": "8.0.0"
},
"template": {
"mappings": {
"properties": {
"host": {
"properties": {
"architecture": {
"ignore_above": 1024,
"type": "keyword"
},
"cpu": {
"properties": {
"usage": {
"scaling_factor": 1000,
"type": "scaled_float"
}
}
},
"disk": {
"properties": {
"read": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"write": {
"properties": {
"bytes": {
"type": "long"
}
}
}
}
},
"domain": {
"ignore_above": 1024,
"type": "keyword"
},
"geo": {
"properties": {
"city_name": {
"ignore_above": 1024,
"type": "keyword"
},
"continent_code": {
"ignore_above": 1024,
"type": "keyword"
},
"continent_name": {
"ignore_above": 1024,
"type": "keyword"
},
"country_iso_code": {
"ignore_above": 1024,
"type": "keyword"
},
"country_name": {
"ignore_above": 1024,
"type": "keyword"
},
"location": {
"type": "geo_point"
},
"name": {
"ignore_above": 1024,
"type": "keyword"
},
"postal_code": {
"ignore_above": 1024,
"type": "keyword"
},
"region_iso_code": {
"ignore_above": 1024,
"type": "keyword"
},
"region_name": {
"ignore_above": 1024,
"type": "keyword"
},
"timezone": {
"ignore_above": 1024,
"type": "keyword"
}
}
},
"hostname": {
"ignore_above": 1024,
"type": "keyword"
},
"id": {
"ignore_above": 1024,
"type": "keyword"
},
"ip": {
"type": "ip"
},
"mac": {
"ignore_above": 1024,
"type": "keyword"
},
"name": {
"ignore_above": 1024,
"type": "keyword"
},
"network": {
"properties": {
"egress": {
"properties": {
"bytes": {
"type": "long"
},
"packets": {
"type": "long"
}
}
},
"ingress": {
"properties": {
"bytes": {
"type": "long"
},
"packets": {
"type": "long"
}
}
}
}
},
"os": {
"properties": {
"family": {
"ignore_above": 1024,
"type": "keyword"
},
"full": {
"fields": {
"text": {
"type": "match_only_text"
}
},
"ignore_above": 1024,
"type": "keyword"
},
"kernel": {
"ignore_above": 1024,
"type": "keyword"
},
"name": {
"fields": {
"text": {
"type": "match_only_text"
}
},
"ignore_above": 1024,
"type": "keyword"
},
"platform": {
"ignore_above": 1024,
"type": "keyword"
},
"type": {
"ignore_above": 1024,
"type": "keyword"
},
"version": {
"ignore_above": 1024,
"type": "keyword"
}
}
},
"type": {
"ignore_above": 1024,
"type": "keyword"
},
"uptime": {
"type": "long"
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"_meta": {
"ecs_version": "8.0.0"
},
"template": {
"mappings": {
"properties": {
"metricset": {
"properties": {
"interval": {
"type": "long"
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"_meta": {
"ecs_version": "8.0.0"
},
"template": {
"mappings": {
"properties": {
"system": {
"properties": {
"cpu": {
"properties": {
"cores": {
"type": "integer"
},
"system": {
"properties": {
"pct": {
"type": "float"
}
}
},
"total": {
"properties": {
"norm": {
"properties": {
"pct": {
"type": "float"
}
}
}
}
},
"user": {
"properties": {
"pct": {
"type": "float"
}
}
}
}
},
"network": {
"properties": {
"in": {
"properties": {
"bytes": {
"type": "long"
}
}
},
"name": {
"ignore_above": 1024,
"type": "keyword"
},
"out": {
"properties": {
"bytes": {
"type": "long"
}
}
}
}
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"_meta": {
"description": "Sample composable template that includes all ECS fields",
"ecs_version": "8.0.0"
},
"composed_of": [
"ecs_8.0.0_base",
"ecs_8.0.0_event",
"ecs_8.0.0_host",
"ecs_8.0.0_metricset",
"ecs_8.0.0_system"
],
"index_patterns": [
"kbn-data-forge-fake_hosts"
],
"priority": 1,
"template": {
"mappings": {
"_meta": {
"version": "1.6.0"
},
"date_detection": false,
"dynamic_templates": [
{
"strings_as_keyword": {
"mapping": {
"fields": {
"text": {
"norms": false,
"type": "text"
}
},
"ignore_above": 1024,
"type": "keyword"
},
"match_mapping_type": "string"
}
}
]
},
"settings": {
"index": {
"codec": "best_compression",
"mapping": {
"total_fields": {
"limit": 2000
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import lodash from 'lodash';
import type { Moment } from 'moment';

export { template } from './template';
export { indexTemplate } from './index_template_def';

const createGroupIndex = (index: number) => Math.floor(index / 1000) * 1000;

Expand Down
Loading

0 comments on commit 4c1ca7e

Please sign in to comment.