Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
add3b53
Add CEL pipeline data collection
robbavey Oct 3, 2023
675d778
Add CEL plugin data collection
robbavey Oct 3, 2023
a13ff6b
Add CEL node data collection
robbavey Oct 3, 2023
f2584d1
Add dashboards for pipelines and plugins
robbavey Oct 3, 2023
55b7bb1
Update existing dashboards to include pipeline and plugin references
robbavey Oct 3, 2023
780f665
Tweaks and fixes
robbavey Oct 3, 2023
e5d96f0
Tidy and use time series indices
robbavey Oct 4, 2023
f801aa7
Tidying, adding readme text
robbavey Oct 4, 2023
48bd0e8
Bump required kibana to 8.10.1
robbavey Oct 5, 2023
f2c8d43
Rename stream.yml.hbs to cel.yml.hbs
robbavey Oct 5, 2023
0d6b939
Simlify mapping into events field in CEL scripts
robbavey Oct 5, 2023
596f0d8
Tidy code by using dot notation
robbavey Oct 5, 2023
7909f7e
Tidy up Dashboard
robbavey Oct 5, 2023
8cb394b
Clean up 'with' functions
robbavey Oct 5, 2023
3e71129
Set fields that already exist in ECS to `external: ECS`
robbavey Oct 5, 2023
ad027b3
Make control group field types consistent
robbavey Oct 5, 2023
a4ba6b4
Remove unnecessary drop_empty() commands
robbavey Oct 5, 2023
400ab49
Simplify auth
robbavey Oct 5, 2023
4fa4eac
Futher tidying after code review comments
robbavey Oct 5, 2023
ffd380c
Style changes to cel scripts
robbavey Oct 6, 2023
7c2e47e
Remove logstash monitoring pipeline from node view
robbavey Oct 6, 2023
d47de67
Polish dashboards
robbavey Oct 6, 2023
637eda9
Additional polish to dashboards
robbavey Oct 7, 2023
2e934fc
Fix typo in nav panel, and fix flow metric to show correct plugin typ…
robbavey Oct 9, 2023
559a8ee
remove duplicate fields
robbavey Oct 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions packages/logstash/_dev/build/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ The `logstash` package collects metrics and logs of Logstash.

The `logstash` package works with Logstash 8.5.0 and later

## Technical Preview note

This Logstash package also includes a technical preview of Logstash data collection and dashboards
native to elastic agent. The technical preview includes enhanced data collection, and a number of dashboards, which include additional insight into running pipelines.

Note that this feature is not intended for use with the Stack Monitoring UI inside Kibana,
and is included as a technical preview. Existing implementations wishing to continue using the Stack Monitoring UI should uncheck the technical preview option, and continue to use `Metrics (Stack Monitoring)`. Those users who wish to use the technical preview should uncheck `Metrics (Stack Monitoring)` and check `Metrics (Technical Preview)`


## Logs

Logstash package supports the plain text format and the JSON format. Also, two types of
Expand Down Expand Up @@ -79,3 +88,45 @@ Logstash metric related data streams works with Logstash 7.3.0 and later.
### Node

{{event "node"}}


## Metrics (Technical Preview)

This Logstash package also includes a technical preview of Logstash data collection and dashboards
native to elastic agent. The technical preview includes enhanced data collection, and a number of dashboards, which include additional insight into running pipelines.

Note that this feature is not intended for use with the Stack Monitoring UI inside Kibana,
and is included as a technical preview. Existing implementations wishing to continue using the Stack Monitoring UI should uncheck the technical preview option, and continue to use `Metrics (Stack Monitoring)`. Those users who wish to use the technical preview should uncheck `Metrics (Stack Monitoring)` and check `Metrics (Technical Preview)`

### Fields and Sample Event

#### Node

This is the `node` dataset, which drives the Node dashboard pages.

#### Example

{{fields "node_cel"}}

{{event "node_cel"}}

#### Pipeline

This is the `pipeline` dataset, which drives the Pipeline dashboard pages.

#### Example

{{fields "pipeline"}}

{{event "pipeline"}}

#### Plugin

This is the `plugin` dataset, which drives the Pipeline detail dashboard pages. Note that this dataset may produce many documents for logstash instances using a large number of pipelines and/or plugins within those pipelines. For those instances, we recommend reviewing the
pipeline collection period, and setting it to an appropriate value.

#### Example

{{fields "plugins"}}

{{event "plugins"}}
5 changes: 5 additions & 0 deletions packages/logstash/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "2.3.4"
changes:
- description: Introduce Logstash pipelines plugin retrieval and dashboards
type: enhancement
link: https://github.com/elastic/integrations/pull/7704
- version: "2.3.3"
changes:
- description: Introduce Logstash node dashboards into integration package
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: cel
dataset: logstash.node
vars:
url:
- "http://{{Hostname}}:9600"
data_stream: ~
54 changes: 54 additions & 0 deletions packages/logstash/data_stream/node_cel/agent/stream/cel.yml.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
config_version: "2"
interval: {{period}}
resource.url: "{{url}}/_node/stats?graph=true"
{{#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}}

redact:
fields: ~

program: |
get(state.url)
.as(resp, bytes(resp.Body)
.decode_json().as(body,
{"logstash":{"node":{"stats":{
"events":body.events,
"jvm":{
"uptime_in_millis":body.jvm.uptime_in_millis,
"mem":body.jvm['mem'].drop("pools"),
"threads":body.jvm.threads
},
"queue":body.queue,
"reloads":body.reloads,
"process":body.process,
"os":{
"cpu":body.process.cpu,
"cgroup":has(body.os.group) ? body.os.cgroup : {},
},
"logstash":{
"ephemeral_id":body.ephemeral_id,
"host":body.host,
"http_address":body.http_address,
"name":body.name,
"pipeline":body.pipeline,
"pipelines":body.pipelines.map(pipeline, pipeline != '.monitoring-logstash', [pipeline]).flatten(),
"snapshot":body.snapshot,
"status":body.status,
"uuid":body.id,
"version":body.version,
}
}}
}})
)
.as(eve, {
"events":[eve]
})
74 changes: 74 additions & 0 deletions packages/logstash/data_stream/node_cel/fields/agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
- name: cloud
type: group
fields:
- name: account.id
external: ecs
- name: availability_zone
external: ecs
- name: instance.id
external: ecs
- name: instance.name
external: ecs
- name: machine.type
external: ecs
- name: provider
external: ecs
- name: region
external: ecs
- name: project.id
external: ecs
- name: image.id
type: keyword
description: Image ID for the cloud instance.
- name: container
type: group
fields:
- name: id
external: ecs
- name: image.name
external: ecs
- name: labels
external: ecs
- name: name
external: ecs
- name: host
type: group
fields:
- name: architecture
external: ecs
- name: domain
external: ecs
- name: hostname
external: ecs
- name: id
external: ecs
- name: ip
external: ecs
- name: mac
external: ecs
- name: name
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field is already declared in ecs.yml.

external: ecs
- name: os.family
external: ecs
- name: os.kernel
external: ecs
- name: os.name
external: ecs
- name: os.platform
external: ecs
- name: os.version
external: ecs
- name: type
external: ecs
- name: containerized
type: boolean
description: >
If the host is a container.
- name: os.build
type: keyword
description: >
OS build information.
- name: os.codename
type: keyword
description: >
OS codename, if any.
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 packages/logstash/data_stream/node_cel/fields/ecs.yml
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
Loading