diff --git a/docs/index.asciidoc b/docs/index.asciidoc index 03f42edfc..b68b6f604 100644 --- a/docs/index.asciidoc +++ b/docs/index.asciidoc @@ -59,13 +59,16 @@ include::static/life-of-an-event.asciidoc[] include::static/setting-up-logstash.asciidoc[] -include::static/docker.asciidoc[] - - include::static/settings-file.asciidoc[] -include::static/command-line-flags.asciidoc[] +include::static/running-logstash-command-line.asciidoc[] + + +include::static/running-logstash.asciidoc[] + + +include::static/docker.asciidoc[] include::static/logging.asciidoc[] diff --git a/docs/static/getting-started-with-logstash.asciidoc b/docs/static/getting-started-with-logstash.asciidoc index bc9d056e9..205d7279f 100644 --- a/docs/static/getting-started-with-logstash.asciidoc +++ b/docs/static/getting-started-with-logstash.asciidoc @@ -163,7 +163,8 @@ the data to a destination. image::static/images/basic_logstash_pipeline.png[] -To test your Logstash installation, run the most basic Logstash pipeline: +To test your Logstash installation, run the most basic Logstash pipeline. For +example: ["source","sh",subs="attributes"] -------------------------------------------------- @@ -171,6 +172,9 @@ cd logstash-{logstash_version} bin/logstash -e 'input { stdin { } } output { stdout {} }' -------------------------------------------------- +NOTE: The location of the `bin` directory varies by platform. See <> +to find the location of `bin\logstash` on your system. + The `-e` flag enables you to specify a configuration directly from the command line. Specifying configurations at the command line lets you quickly test configurations without having to edit a file between iterations. The pipeline in the example takes input from the standard input, `stdin`, and moves that input to the standard output, diff --git a/docs/static/command-line-flags.asciidoc b/docs/static/running-logstash-command-line.asciidoc similarity index 85% rename from docs/static/command-line-flags.asciidoc rename to docs/static/running-logstash-command-line.asciidoc index 4a896bbdf..814fca4c1 100644 --- a/docs/static/command-line-flags.asciidoc +++ b/docs/static/running-logstash-command-line.asciidoc @@ -1,16 +1,41 @@ +[[running-logstash-command-line]] +=== Running Logstash from the Command Line + +To run Logstash from the command line, use the following command: + +[source,shell] +---- +bin/logstash [options] +---- + +Where `options` are <> flags that you can +specify to control Logstash execution. The location of the `bin` directory +varies by platform. See <> to find the location of `bin\logstash` on +your system. + +The following example runs Logstash and loads the Logstash config defined in +the `mypipeline.conf` file: + +[source,shell] +---- +bin/logstash -f mypipeline.conf +---- + +Specifying command line options is useful when you are testing Logstash. +However, in a production environment, we recommend that you use the Logstash +<> to control Logstash execution. Using +the settings file makes it easier for you to specify multiple options, and it +provides you with a single, versionable file that you can use to start up +Logstash consistently for each run. + +Any flags that you set at the command line override the corresponding settings +in the Logstash <>. + [[command-line-flags]] -=== Command-Line Flags +==== Command-Line Flags Logstash has the following flags. You can use the `--help` flag to display this information. -Instead of specifying options at the command line, we recommend that you control Logstash execution -by specifying options in the Logstash <>. Using a settings file -makes it easier for you to specify mutliple options, and it provides you with a single, versionable -file that you can use to start up Logstash consistently for each run. - -Any flags that you set at the command line override the corresponding settings in the Logstash -<>. - *`--node.name NAME`*:: Specify the name of this Logstash instance. If no value is given it will default to the current hostname. diff --git a/docs/static/running-logstash.asciidoc b/docs/static/running-logstash.asciidoc new file mode 100644 index 000000000..a7a1e70d8 --- /dev/null +++ b/docs/static/running-logstash.asciidoc @@ -0,0 +1,53 @@ +[[running-logstash]] +=== Running Logstash as a Service on Debian or RPM + +Logstash is not started automatically after installation. How to start and stop Logstash depends on whether your system +uses systemd, upstart, or SysV. + +Here are some common operating systems and versions, and the corresponding +startup styles they use. This list is intended to be informative, not exhaustive. + +|======================================================================= +| Distribution | Service System | +| Ubuntu 16.04 and newer | <> | +| Ubuntu 12.04 through 15.10 | <> | +| Debian 8 "jessie" and newer | <> | +| Debian 7 "wheezy" and older | <> | +| CentOS (and RHEL) 7 and newer | <> | +| CentOS (and RHEL) 6 | <> | +|======================================================================= + +[[running-logstash-systemd]] +==== Running Logstash by Using Systemd + +Distributions like Debian Jessie, Ubuntu 15.10+, and many of the SUSE derivatives use systemd and the +`systemctl` command to start and stop services. Logstash places the systemd unit files in `/etc/systemd/system` for both deb and rpm. After installing the package, you can start up Logstash with: + +[source,sh] +-------------------------------------------- +sudo systemctl start logstash.service +------------------------------------------- + +[[running-logstash-upstart]] +==== Running Logstash by Using Upstart + +For systems that use upstart, you can start Logstash with: + +[source,sh] +-------------------------------------------- +sudo initctl start logstash +------------------------------------------- + +The auto-generated configuration file for upstart systems is `/etc/init/logstash.conf`. + +[[running-logstash-sysv]] +==== Running Logstash by Using SysV + +For systems that use SysV, you can start Logstash with: + +[source,sh] +-------------------------------------------- +sudo /etc/init.d/logstash start +------------------------------------------- + +The auto-generated configuration file for SysV systems is `/etc/init.d/logstash`. diff --git a/docs/static/setting-up-logstash.asciidoc b/docs/static/setting-up-logstash.asciidoc index 80484ba18..89b3be76a 100644 --- a/docs/static/setting-up-logstash.asciidoc +++ b/docs/static/setting-up-logstash.asciidoc @@ -7,10 +7,10 @@ This section includes additional information on how to set up and run Logstash, * <> * <> +* <> +* <> * <> * <> -* <> -* <> * <> * <> * <> @@ -177,59 +177,3 @@ The settings files are already defined in the Logstash installation. Logstash in the file and change the values for specific settings. Note that the `startup.options` file is not read at startup. If you want to change the Logstash startup script (for example, to change the Logstash user or read from a different configuration path), you must re-run the `system-install` script (as root) to pass in the new settings. - -[[running-logstash]] -=== Running Logstash as a Service on Debian or RPM - -Logstash is not started automatically after installation. How to start and stop Logstash depends on whether your system -uses systemd, upstart, or SysV. - -Here are some common operating systems and versions, and the corresponding -startup styles they use. This list is intended to be informative, not exhaustive. - -|======================================================================= -| Distribution | Service System | -| Ubuntu 16.04 and newer | <> | -| Ubuntu 12.04 through 15.10 | <> | -| Debian 8 "jessie" and newer | <> | -| Debian 7 "wheezy" and older | <> | -| CentOS (and RHEL) 7 and newer | <> | -| CentOS (and RHEL) 6 | <> | -|======================================================================= - -For info about shutting down Logstash safely, see <>. - -[[running-logstash-systemd]] -==== Running Logstash by Using Systemd - -Distributions like Debian Jessie, Ubuntu 15.10+, and many of the SUSE derivatives use systemd and the -`systemctl` command to start and stop services. Logstash places the systemd unit files in `/etc/systemd/system` for both deb and rpm. After installing the package, you can start up Logstash with: - -[source,sh] --------------------------------------------- -sudo systemctl start logstash.service -------------------------------------------- - -[[running-logstash-upstart]] -==== Running Logstash by Using Upstart - -For systems that use upstart, you can start Logstash with: - -[source,sh] --------------------------------------------- -sudo initctl start logstash -------------------------------------------- - -The auto-generated configuration file for upstart systems is `/etc/init/logstash.conf`. - -[[running-logstash-sysv]] -==== Running Logstash by Using SysV - -For systems that use SysV, you can start Logstash with: - -[source,sh] --------------------------------------------- -sudo /etc/init.d/logstash start -------------------------------------------- - -The auto-generated configuration file for SysV systems is `/etc/init.d/logstash`. diff --git a/docs/static/settings-file.asciidoc b/docs/static/settings-file.asciidoc index 0da11b4eb..a09ab1a9b 100644 --- a/docs/static/settings-file.asciidoc +++ b/docs/static/settings-file.asciidoc @@ -7,9 +7,9 @@ Most of the settings in the `logstash.yml` file are also available as <>). You can specify settings in hierarchical form or use flat keys. For example, to use +hierarchical form to set the pipeline batch size and batch delay, you specify: [source,yaml] -------------------------------------------------------------------------------------