Skip to content

Commit a3f6da3

Browse files
committed
Allow users to specify --pipeline.id from the CLI
This will allow users to override the pipeline id from the default, "main", to something else while running pipelines via either the -e or -f options. Fixes elastic#8868
1 parent 75da214 commit a3f6da3

File tree

5 files changed

+18
-0
lines changed

5 files changed

+18
-0
lines changed

config/logstash.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
#
3030
# ------------ Pipeline Settings --------------
3131
#
32+
# The ID of the pipeline.
33+
#
34+
# pipeline.id: main
35+
#
3236
# Set the number of workers that will, in parallel, execute the filters+outputs
3337
# stage of the pipeline.
3438
#

docs/static/running-logstash-command-line.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ With this command, Logstash concatenates three config files, `/tmp/one`, `/tmp/t
8484
that setting will be used. The `-M` flag is only used in conjunction with the `--modules`
8585
flag. It will be ignored if the `--modules` flag is absent.
8686

87+
*`--pipeline.id ID`*::
88+
Sets the ID of pipeline. The default is `main`.
89+
8790
*`-w, --pipeline.workers COUNT`*::
8891
Sets the number of pipeline workers to run. This option sets the number of workers that will,
8992
in parallel, execute the filter and output stages of the pipeline. If you find that events are

docs/static/settings-file.asciidoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ The `logstash.yml` file includes the following settings:
7777
| The directory that Logstash and its plugins use for any persistent needs.
7878
|`LOGSTASH_HOME/data`
7979

80+
| `pipeline.id`
81+
| The ID of the pipeline.
82+
| `main`
83+
8084
| `pipeline.workers`
8185
| The number of workers that will, in parallel, execute the filter and output stages of the pipeline.
8286
If you find that events are backing up, or that the

logstash-core/lib/logstash/runner.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ class LogStash::Runner < Clamp::StrictCommand
8585
:attribute_name => "cloud.auth"
8686

8787
# Pipeline settings
88+
option ["--pipeline.id"], "ID",
89+
I18n.t("logstash.runner.flag.pipeline-id"),
90+
:attribute_name => "pipeline.id",
91+
:default => LogStash::SETTINGS.get_default("pipeline.id")
92+
8893
option ["-w", "--pipeline.workers"], "COUNT",
8994
I18n.t("logstash.runner.flag.pipeline-workers"),
9095
:attribute_name => "pipeline.workers",

logstash-core/locales/en.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ en:
262262
Check configuration for valid syntax and then exit.
263263
http_host: Web API binding host
264264
http_port: Web API http port
265+
pipeline-id: |+
266+
Sets the ID of the pipeline.
265267
pipeline-workers: |+
266268
Sets the number of pipeline workers to run.
267269
experimental-java-execution: |+

0 commit comments

Comments
 (0)