-
Notifications
You must be signed in to change notification settings - Fork 457
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
5,536 additions
and
2,204 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
packages/logstash/data_stream/health_report/agent/stream/stream.yml.hbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
config_version: "1" | ||
interval: {{period}} | ||
resource.url: "{{url}}/_health_report" | ||
{{#if resource_ssl}} | ||
resource.ssl: | ||
{{resource_ssl}} | ||
{{/if}} | ||
|
||
{{#if username}} | ||
auth.basic.user: {{escape_string username}} | ||
{{/if}} | ||
{{#if password}} | ||
auth.basic.password: {{escape_string password}} | ||
{{/if}} | ||
{{#if condition}} | ||
condition: {{ condition }} | ||
{{/if}} | ||
|
||
redact: | ||
fields: ~ | ||
|
||
program: | | ||
get(state.url) | ||
.as(resp, bytes(resp.Body) | ||
.decode_json().as(body, | ||
[ | ||
[{ | ||
"logstash.node": { | ||
"name":body.name, | ||
"address":body.http_address, | ||
"uuid":body.id, | ||
"version":body.version, | ||
"status":body.status, | ||
"symptom":body.symptom, | ||
}, | ||
}], | ||
body.indicators.pipelines.indicators.as(pipelines, // pipelines = body.indicators.pipelines.indicators | ||
pipelines.map(pipeline_name, pipelines[pipeline_name].as(pipeline, { // pipeline = pipelines[pipeline_name] | ||
"logstash": { | ||
"node": { | ||
"name": body.name, | ||
"version": body.version, | ||
"address": body.http_address, | ||
"uuid": body.id | ||
}, | ||
"pipeline": { | ||
"id":pipeline_name, | ||
"status":pipeline.status, | ||
"symptom":pipeline.symptom, | ||
"state":pipeline.details.status.state, | ||
"flow": pipeline.details.flow, | ||
"diagnosis": has(pipeline.diagnosis) ? pipeline.diagnosis[0] : {}, | ||
"impacts": has(pipeline.impacts) ? pipeline.impacts[0] : {}, | ||
} | ||
} | ||
} | ||
)) | ||
) | ||
].as(entries, { | ||
"events": entries.flatten() | ||
}) | ||
) | ||
) |
9 changes: 9 additions & 0 deletions
9
packages/logstash/data_stream/health_report/fields/base-fields.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- name: data_stream.type | ||
external: ecs | ||
- name: data_stream.dataset | ||
external: ecs | ||
- name: data_stream.namespace | ||
external: ecs | ||
- name: service.hostname | ||
type: keyword | ||
description: Hostname of the service |
24 changes: 24 additions & 0 deletions
24
packages/logstash/data_stream/health_report/fields/ecs.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
- name: '@timestamp' | ||
external: ecs | ||
- name: service.id | ||
external: ecs | ||
- name: service.type | ||
external: ecs | ||
- name: service.version | ||
external: ecs | ||
- name: service.address | ||
external: ecs | ||
- name: service.name | ||
external: ecs | ||
- name: process.pid | ||
external: ecs | ||
- name: ecs.version | ||
external: ecs | ||
- name: event.dataset | ||
external: ecs | ||
- name: event.duration | ||
external: ecs | ||
- name: event.module | ||
external: ecs | ||
- name: error.message | ||
external: ecs |
90 changes: 90 additions & 0 deletions
90
packages/logstash/data_stream/health_report/fields/fields.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
- name: logstash | ||
type: group | ||
fields: | ||
- name: node | ||
type: group | ||
fields: | ||
- name: name | ||
type: keyword | ||
- name: version | ||
type: keyword | ||
- name: address | ||
type: keyword | ||
- name: symptom | ||
type: keyword | ||
multi_fields: | ||
- name: text | ||
type: match_only_text | ||
- name: uuid | ||
type: keyword | ||
- name: status | ||
type: keyword | ||
- name: pipeline | ||
type: group | ||
fields: | ||
- name: id | ||
type: keyword | ||
- name: status | ||
type: keyword | ||
- name: state | ||
type: keyword | ||
- name: symptom | ||
type: keyword | ||
multi_fields: | ||
- name: text | ||
type: match_only_text | ||
- name: diagnosis | ||
type: group | ||
fields: | ||
- name: id | ||
type: keyword | ||
- name: cause | ||
type: keyword | ||
multi_fields: | ||
- name: text | ||
type: match_only_text | ||
- name: action | ||
type: keyword | ||
multi_fields: | ||
- name: text | ||
type: match_only_text | ||
- name: help_url | ||
type: keyword | ||
format: url | ||
multi_fields: | ||
- name: text | ||
type: match_only_text | ||
- name: impacts | ||
type: group | ||
fields: | ||
- name: id | ||
type: keyword | ||
- name: severity | ||
type: short | ||
- name: description | ||
type: keyword | ||
multi_fields: | ||
- name: text | ||
type: match_only_text | ||
- name: impact_areas | ||
type: keyword | ||
- name: flow | ||
type: group | ||
fields: | ||
- name: worker_utilization | ||
type: group | ||
fields: | ||
- name: current | ||
type: float | ||
- name: last_1_hour | ||
type: float | ||
- name: last_5_minutes | ||
type: float | ||
- name: last_15_minutes | ||
type: float | ||
- name: lifetime | ||
type: float | ||
- name: last_1_minute | ||
type: float | ||
- name: last_24_hours | ||
type: float |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
title: "Health Report" | ||
type: metrics | ||
dataset: logstash.health_report | ||
release: beta | ||
elasticsearch: | ||
index_template: | ||
mappings: | ||
dynamic: false | ||
streams: | ||
- input: cel | ||
title: "Collect Health Report" | ||
description: "Health Report for Logstash instance" | ||
vars: | ||
- name: period | ||
type: text | ||
title: Period | ||
multi: false | ||
required: true | ||
show_user: true | ||
default: 30s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.