Skip to content

Commit

Permalink
[logstash] align mappings with metricbeat (#3993)
Browse files Browse the repository at this point in the history
* ecs fields

* node data stream fields

* node_stats data stream fields

* _dev/deploy configuration

* Update packages/logstash/_dev/deploy/docker/config/logstash.yml

Co-authored-by: Mat Schaffer <mat@schaffer.me>

Co-authored-by: Mat Schaffer <mat@schaffer.me>
  • Loading branch information
klacabane and matschaffer committed Aug 17, 2022
1 parent a77c3a0 commit 6422887
Show file tree
Hide file tree
Showing 14 changed files with 273 additions and 132 deletions.
2 changes: 2 additions & 0 deletions packages/logstash/_dev/deploy/docker/config/logstash.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
http.host: "0.0.0.0"
config.reload.automatic: true
7 changes: 7 additions & 0 deletions packages/logstash/_dev/deploy/docker/config/pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- pipeline.id: pipeline-with-persisted-queue
path.config: "/usr/share/logstash/pipeline/persisted-queue.conf"
queue.type: persisted
- pipeline.id: pipeline-with-memory-queue
path.config: "/usr/share/logstash/pipeline/memory-queue.conf"
- pipeline.id: standalone-pipeline
path.config: "/usr/share/logstash/pipeline/standalone-pipeline.conf"
9 changes: 9 additions & 0 deletions packages/logstash/_dev/deploy/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '2.3'
services:
logstash:
image: "docker.elastic.co/logstash/logstash:8.5.0-SNAPSHOT"
volumes:
- "./pipeline:/usr/share/logstash/pipeline"
- "./config:/usr/share/logstash/config"
ports:
- "127.0.0.1:9600:9600"
15 changes: 15 additions & 0 deletions packages/logstash/_dev/deploy/docker/pipeline/memory-queue.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
input {
java_generator {
eps => 10
}
}

output {
elasticsearch {
hosts => ["https://elasticsearch:9200"]
user => "elastic"
password => "changeme"
index => "logstash-memory-queue"
ssl_certificate_verification => "false"
}
}
15 changes: 15 additions & 0 deletions packages/logstash/_dev/deploy/docker/pipeline/persisted-queue.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
input {
java_generator {
eps => 50
}
}

output {
elasticsearch {
hosts => ["https://elasticsearch:9200"]
user => "elastic"
password => "changeme"
index => "logstash-persisted-queue"
ssl_certificate_verification => "false"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input {
java_generator {
eps => 5
}
}

output {
stdout { }
}
8 changes: 8 additions & 0 deletions packages/logstash/data_stream/node/fields/ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@
external: ecs
- name: ecs.version
external: ecs
- name: event.dataset
external: ecs
- name: event.duration
external: ecs
- name: event.module
external: ecs
- name: host.name
external: ecs
64 changes: 34 additions & 30 deletions packages/logstash/data_stream/node/fields/fields.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,49 @@
- name: logstash.node
- name: logstash
type: group
release: ga
fields:
- name: host
- name: elasticsearch.cluster.id
type: keyword
- name: version
type: keyword
- name: id
type: keyword
- name: state.pipeline
- name: node
type: group
fields:
- name: id
- name: jvm
type: group
fields:
- name: version
type: keyword
ignore_above: 1024
- name: host
type: keyword
- name: hash
- name: version
type: keyword
- name: ephemeral_id
- name: id
type: keyword
- name: batch_size
type: long
- name: workers
type: long
- name: representation
- name: state.pipeline
type: group
fields:
- name: hash
- name: id
type: keyword
- name: type
- name: hash
type: keyword
- name: version
- name: ephemeral_id
type: keyword
- name: graph
- name: batch_size
type: long
- name: workers
type: long
- name: representation
type: group
fields:
- name: edges
type: object
- name: vertices
type: object
- name: jvm
type: group
fields:
- name: version
type: keyword
description: JVM version
- name: hash
type: keyword
- name: type
type: keyword
- name: version
type: keyword
- name: graph
type: group
fields:
- name: edges
type: object
- name: vertices
type: object
13 changes: 9 additions & 4 deletions packages/logstash/data_stream/node/fields/package-fields.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
- name: cluster_uuid
type: alias
path: logstash.elasticsearch.cluster.id
- name: timestamp
type: alias
path: '@timestamp'
- name: logstash_stats
type: group
fields:
- name: timestamp
type: alias
path: '@timestamp'
- name: jvm
type: group
fields:
Expand Down Expand Up @@ -37,8 +46,6 @@
- name: version
type: alias
path: logstash.node.stats.logstash.version
- name: pipelines
type: nested
- name: os
type: group
fields:
Expand Down Expand Up @@ -90,5 +97,3 @@
- name: pipeline.hash
type: alias
path: logstash.node.state.pipeline.hash
- name: logstash
type: group
4 changes: 4 additions & 0 deletions packages/logstash/data_stream/node/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
type: metrics
title: Logstash node metrics
release: experimental
elasticsearch:
index_template:
mappings:
dynamic: false
streams:
- input: logstash/metrics
title: Logstash node metrics
Expand Down
16 changes: 11 additions & 5 deletions packages/logstash/data_stream/node_stats/fields/ecs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
- name: '@timestamp'
external: ecs
- name: host.hostname
- name: service.id
external: ecs
- name: process.pid
- name: service.type
external: ecs
- name: service.version
external: ecs
Expand All @@ -11,9 +11,15 @@
description: Address where data about this service was collected from.
- name: service.name
external: ecs
- name: service.id
external: ecs
- name: service.type
- 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: host.name
external: ecs
Loading

0 comments on commit 6422887

Please sign in to comment.