-
Notifications
You must be signed in to change notification settings - Fork 557
[Logstash] Add CEL native data collection, and dashboards for Pipeline and Pipeline Details #8098
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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 675d778
Add CEL plugin data collection
robbavey a13ff6b
Add CEL node data collection
robbavey f2584d1
Add dashboards for pipelines and plugins
robbavey 55b7bb1
Update existing dashboards to include pipeline and plugin references
robbavey 780f665
Tweaks and fixes
robbavey e5d96f0
Tidy and use time series indices
robbavey f801aa7
Tidying, adding readme text
robbavey 48bd0e8
Bump required kibana to 8.10.1
robbavey f2c8d43
Rename stream.yml.hbs to cel.yml.hbs
robbavey 0d6b939
Simlify mapping into events field in CEL scripts
robbavey 596f0d8
Tidy code by using dot notation
robbavey 7909f7e
Tidy up Dashboard
robbavey 8cb394b
Clean up 'with' functions
robbavey 3e71129
Set fields that already exist in ECS to `external: ECS`
robbavey ad027b3
Make control group field types consistent
robbavey a4ba6b4
Remove unnecessary drop_empty() commands
robbavey 400ab49
Simplify auth
robbavey 4fa4eac
Futher tidying after code review comments
robbavey ffd380c
Style changes to cel scripts
robbavey 7c2e47e
Remove logstash monitoring pipeline from node view
robbavey d47de67
Polish dashboards
robbavey 637eda9
Additional polish to dashboards
robbavey 2e934fc
Fix typo in nav panel, and fix flow metric to show correct plugin typ…
robbavey 559a8ee
remove duplicate fields
robbavey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
6 changes: 6 additions & 0 deletions
6
packages/logstash/data_stream/node_cel/_dev/test/system/test-default-config.yml
This file contains hidden or 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,6 @@ | ||
| type: cel | ||
| dataset: logstash.node | ||
| vars: | ||
| url: | ||
| - "http://{{Hostname}}:9600" | ||
| data_stream: ~ |
54 changes: 54 additions & 0 deletions
54
packages/logstash/data_stream/node_cel/agent/stream/cel.yml.hbs
This file contains hidden or 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,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] | ||
| }) |
This file contains hidden or 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,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 | ||
| 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. | ||
9 changes: 9 additions & 0 deletions
9
packages/logstash/data_stream/node_cel/fields/base-fields.yml
This file contains hidden or 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 |
This file contains hidden or 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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.