forked from elastic/package-registry
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce datasources in package to configure inputs and streams
In elastic/beats#15940 datasources, inputs and streams are introduced into the agent config. To make it possible to configure these in the UI and through the API, some changes to the manifest definitions of a package and datasets are needed. **Package definition** **Further changes** * Rename `agent/input` to `agent/stream` as a stream is configured there.
- Loading branch information
Showing
18 changed files
with
145 additions
and
64 deletions.
There are no files selected for viewing
12 changes: 0 additions & 12 deletions
12
dev/package-examples/nginx-1.2.0/dataset/access/agent/input/input.yml
This file was deleted.
Oops, something went wrong.
8 changes: 5 additions & 3 deletions
8
....2.0/dataset/error/agent/config/input.yml → ....0/dataset/access/agent/stream/stream.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
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
23 changes: 23 additions & 0 deletions
23
dev/package-examples/nginx-1.2.0/dataset/error/agent/stream/stream.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,23 @@ | ||
|
||
# The selected input has to be passed to the stream config when processed. | ||
|
||
{{#if input == log}} | ||
input: log | ||
|
||
{{#each paths}} | ||
paths: "{{this}}" | ||
{{/each}} | ||
exclude_files: [".gz$"] | ||
|
||
processors: | ||
- add_locale: ~ | ||
{{/if}} | ||
|
||
|
||
# This is an example stream config on how multiple inputs could be supported | ||
|
||
{{#if input == syslog}} | ||
input: syslog | ||
|
||
# TODO: would need some more config options | ||
{{/if}} |
32 changes: 24 additions & 8 deletions
32
dev/package-examples/nginx-1.2.0/dataset/error/manifest.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 |
---|---|---|
@@ -1,11 +1,27 @@ | ||
title: Nginx Error Logs | ||
type: logs | ||
ingest_pipeline: pipeline | ||
vars: | ||
- name: paths | ||
default: | ||
- /var/log/nginx/error.log* | ||
os.darwin: | ||
- /usr/local/var/log/nginx/error.log* | ||
os.windows: | ||
- c:/programdata/nginx/logs/error.log* | ||
|
||
|
||
# This is an example that multiple inputs are supported by one dataset | ||
inputs: | ||
- type: log | ||
vars: | ||
- name: paths | ||
required: true | ||
default: | ||
- /var/log/nginx/error.log* | ||
os.darwin: | ||
- /usr/local/var/log/nginx/error.log* | ||
os.windows: | ||
- c:/programdata/nginx/logs/error.log* | ||
|
||
- type: syslog | ||
vars: | ||
# Are udp and tcp syslog input two different inputs? | ||
- name: protocol.udp.host | ||
required: true | ||
default: | ||
- "localhost:9000" | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
.../dataset/stubstatus/agent/input/input.yml → ...ataset/stubstatus/agent/stream/stream.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
type: metric/nginx | ||
input: metrics/nginx | ||
metricsets: ["stubstatus"] | ||
period: {{period}} | ||
enabled: true | ||
|
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
4 changes: 0 additions & 4 deletions
4
dev/package-examples/system-0.9.0/dataset/cpu/agent/input/input.yml
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
dev/package-examples/system-0.9.0/dataset/cpu/agent/stream/stream.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,6 @@ | ||
input: metrics/system | ||
enabled: false # default true | ||
metricset: cpu | ||
period: 10s | ||
dataset: system.cpu | ||
metrics: ["percentages", "normalized_percentages"] |
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 |
---|---|---|
|
@@ -5,4 +5,5 @@ release: beta | |
# Needs to describe the type of this input | ||
type: metrics | ||
|
||
|
||
inputs: | ||
- type: metrics/system |
4 changes: 0 additions & 4 deletions
4
dev/package-examples/system-0.9.0/dataset/load/agent/input/input.yml
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
dev/package-examples/system-0.9.0/dataset/load/agent/stream/stream.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,4 @@ | ||
inputy: metric/system | ||
enabled: true | ||
metricsets: | ||
- load |
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 |
---|---|---|
|
@@ -5,4 +5,5 @@ release: beta | |
# Needs to describe the type of this input | ||
type: metrics | ||
|
||
|
||
inputs: | ||
- type: system/metrics |
4 changes: 0 additions & 4 deletions
4
dev/package-examples/system-0.9.0/dataset/memory/agent/input/input.yml
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
dev/package-examples/system-0.9.0/dataset/memory/agent/stream.yml/stream.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,4 @@ | ||
input: metric/system | ||
enabled: true | ||
metricsets: | ||
- memory |
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 |
---|---|---|
|
@@ -5,4 +5,6 @@ release: beta | |
# Needs to describe the type of this input | ||
type: metrics | ||
|
||
inputs: | ||
- type: system/metrics | ||
|
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