Skip to content

Commit

Permalink
Update with more cluster and node fields
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdover committed Dec 8, 2022
1 parent 7c5ce88 commit 264bc06
Show file tree
Hide file tree
Showing 5 changed files with 2,976 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,31 @@ auth.basic:

request:
method: "GET"
url: {{hosts.[0]}}/_nodes/stats/ingest?filter_path=nodes.*.ingest
url: {{hosts.[0]}}/_nodes/stats/ingest
# timeout:

response:
split:
type: map
target: body.nodes
key_field: node_id
keep_parent: true
split:
type: map
target: body.ingest.pipelines
target: body.nodes.ingest.pipelines
keep_parent: true
key_field: pipeline_id

processors:
- decode_json_fields:
fields: ["message"]
- drop_event:
when:
and:
- equals:
message.ingest.pipelines.count: 0
- equals:
message.ingest.pipelines.failed: 0
- equals:
message.ingest.pipelines.time_in_millis: 0
- decode_json_fields:
fields:
- message
- drop_event:
when:
and:
- equals:
message.nodes.ingest.pipelines.count: 0
- equals:
message.nodes.ingest.pipelines.failed: 0
- equals:
message.nodes.ingest.pipelines.time_in_millis: 0
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,33 @@
description: Pipeline for parsing pipeline ingest stats
processors:
- set:
ignore_empty_value: true
field: "event.original"
copy_from: "message"
- set:
field: "elasticsearch.ingest.pipeline.name"
copy_from: "message.ingest.pipelines.pipeline_id"
field: "elasticsearch.cluster.name"
copy_from: "message.cluster_name"
- set:
field: "elasticsearch.node.id"
copy_from: "message.node_id"
copy_from: "message.nodes.node_id"
- set:
field: "elasticsearch.node.name"
copy_from: "message.nodes.name"
- set:
field: "elasticsearch.node.roles"
copy_from: "message.nodes.roles"
- set:
field: "elasticsearch.ingest.pipeline.name"
copy_from: "message.nodes.ingest.pipelines.pipeline_id"
- set:
field: "elasticsearch.ingest.pipeline.total.count"
copy_from: "message.ingest.pipelines.count"
copy_from: "message.nodes.ingest.pipelines.count"
- set:
field: "elasticsearch.ingest.pipeline.total.failed"
copy_from: "message.ingest.pipelines.failed"
copy_from: "message.nodes.ingest.pipelines.failed"
- set:
field: "elasticsearch.ingest.pipeline.total.total_cpu_time"
copy_from: "message.ingest.pipelines.time_in_millis"
copy_from: "message.nodes.ingest.pipelines.time_in_millis"
- script:
lang: painless
source: |
Map pipeline = ctx['message']['ingest']['pipelines'];
Map pipeline = ctx['message']['nodes']['ingest']['pipelines'];
long self_cpu_time = pipeline['time_in_millis'];
long count_processors = 0;
def processors = new ArrayList();
Expand Down
6 changes: 0 additions & 6 deletions packages/elasticsearch/data_stream/ingest/fields/fields.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
- name: elasticsearch.node
type: group
fields:
- name: id
type: keyword

- name: elasticsearch.ingest.pipeline
type: group
fields:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
- name: elasticsearch
type: group
fields:
- name: cluster.name
type: keyword
description: |
Elasticsearch cluster name
- name: node
type: group
fields:
- name: id
type: keyword
description: |
Node ID
- name: name
type: keyword
description: |
Node name
- name: roles
type: keyword
description: |
Node roles
Loading

0 comments on commit 264bc06

Please sign in to comment.