File tree Expand file tree Collapse file tree 4 files changed +48
-17
lines changed
data_stream/status_change_logs
elasticsearch/ingest_pipeline Expand file tree Collapse file tree 4 files changed +48
-17
lines changed Original file line number Diff line number Diff line change 11# newer versions go on top
22- version : " 2.6.7"
33 changes :
4- - description : Adds health_status field to status change logs data stream
4+ - description : Adds processor for health_status field to status change logs data stream
55 type : enhancement
66 link : https://github.com/elastic/integrations/pull/15852
77- version : " 2.6.6"
Original file line number Diff line number Diff line change 1+ ---
2+ description : Pipeline for Elastic Agent status change logs.
3+ processors :
4+ - script :
5+ description : Derive health_status from status field
6+ if : ctx.status != null
7+ lang : painless
8+ source : |
9+ String status = ctx.status;
10+ String healthStatus;
11+
12+ switch (status) {
13+ case 'online':
14+ healthStatus = 'healthy';
15+ break;
16+ case 'error':
17+ case 'degraded':
18+ healthStatus = 'unhealthy';
19+ break;
20+ case 'updating':
21+ case 'enrolling':
22+ case 'unenrolling':
23+ healthStatus = 'updating';
24+ break;
25+ default:
26+ healthStatus = status;
27+ }
28+
29+ ctx.health_status = healthStatus;
30+ ignore_failure : true
Original file line number Diff line number Diff line change 11{
2- "@timestamp" : 1576280412771 ,
3- "data_stream" : {
4- "type" : " logs" ,
5- "dataset" : " elastic_agent.status_change" ,
6- "namespace" : " default"
7- },
8- "agent" : {
9- "id" : " f2b3c4d5-e6f7-8a9b-b0c1-d2e3f4g5h6i7"
10- },
11- "status" : " HEALTHY" ,
12- "policy_id" : " test-policy" ,
13- "agentless" : false ,
14- "space_id" : " default" ,
15- "hostname" : " test-host"
16- }
2+ "@timestamp" : 1576280412771 ,
3+ "data_stream" : {
4+ "type" : " logs" ,
5+ "dataset" : " elastic_agent.status_change" ,
6+ "namespace" : " default"
7+ },
8+ "agent" : {
9+ "id" : " f2b3c4d5-e6f7-8a9b-b0c1-d2e3f4g5h6i7"
10+ },
11+ "status" : " online" ,
12+ "health_status" : " healthy" ,
13+ "policy_id" : " test-policy" ,
14+ "agentless" : false ,
15+ "space_id" : " default" ,
16+ "hostname" : " test-host"
17+ }
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ format_version: 3.5.0
77categories : ["elastic_stack"]
88conditions :
99 kibana :
10- version : " ^9.2.2 || ^9.3 .0"
10+ version : " ^8.15.0 || ^9.0 .0"
1111 elastic :
1212 subscription : basic
1313owner :
You can’t perform that action at this time.
0 commit comments