Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 2 additions & 3 deletions docs/static/advanced-pipeline.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,8 @@ filebeat:
fields:
type: syslog
output:
elasticsearch:
enabled: true
hosts: ["http://localhost:5043"]
logstash:
hosts: ["localhost:5043"]
tls:
certificate: /path/to/ssl-certificate.crt <2>
certificate_key: /path/to/ssl-certificate.key
Expand Down
6 changes: 6 additions & 0 deletions docs/static/command-line-flags.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ Logstash has the following flags. You can use the `--help` flag to display this
--reload-interval RELOAD_INTERVAL
Specifies how often Logstash checks the config files for changes. The default is every 3 seconds.

--http-host WEB_API_HTTP_HOST
Web API binding host (default: "127.0.0.1")

--http-port WEB_API_HTTP_PORT
Web API http port (default: 9600)

-h, --help
Print help
----------------------------------
178 changes: 178 additions & 0 deletions docs/static/configuration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,184 @@ output {
}
----------------------------------

[[environment-variables]]
=== Using Environment Variables in Configuration
==== Overview

* You can set environment variable references into Logstash plugins configuration using `${var}` or `$var`.
* Each reference will be replaced by environment variable value at Logstash startup.
* The replacement is case-sensitive.
* References to undefined variables raise a Logstash configuration error.
* A default value can be given by using the form `${var:default value}`.
* You can add environment variable references in any plugin option type : string, number, boolean, array or hash.
* Environment variables are immutable. If you update the environment variable, you'll have to restart Logstash to pick the updated value.

==== Examples

[cols="a,a,a"]
|==================================
|Logstash config source |Environment |Logstash config result

|
[source,ruby]
----
input {
tcp {
port => "$TCP_PORT"
}
}
----

|
[source,shell]
----
export TCP_PORT=12345
----
|
[source,ruby]
----
input {
tcp {
port => 12345
}
}
----
|
[source,ruby]
----
input {
tcp {
port => "${TCP_PORT}"
}
}
----

|
[source,shell]
----
export TCP_PORT=12345
----
|
[source,ruby]
----
input {
tcp {
port => 12345
}
}
----
|
[source,ruby]
----
input {
tcp {
port => "${TCP_PORT}"
}
}
----

|
No TCP_PORT defined
|
Raise a logstash configuration error
|
[source,ruby]
----
input {
tcp {
port => "${TCP_PORT:54321}"
}
}
----

|
No TCP_PORT defined
|
[source,ruby]
----
input {
tcp {
port => 54321
}
}
----
|
[source,ruby]
----
input {
tcp {
port => "${TCP_PORT:54321}"
}
}
----

|
[source,shell]
----
export TCP_PORT=12345
----
|
[source,ruby]
----
input {
tcp {
port => 12345
}
}
----
|
[source,ruby]
----
filter {
mutate {
add_tag => [ "tag1", "${ENV_TAG}" ]
}
}
----

|
[source,shell]
----
export ENV_TAG="tag2"
----
|
[source,ruby]
----
filter {
mutate {
add_tag => [ "tag1", "tag2" ]
}
}
----
|
[source,ruby]
----
filter {
mutate {
add_field => {
"my_path" => "${HOME}/file.log"
}
}
}
----
|
[source,shell]
----
export HOME="/path"
----
|
[source,ruby]
----
filter {
mutate {
add_field => {
"my_path" => "/path/file.log"
}
}
}
----
|==================================

[[config-examples]]
=== Logstash Configuration Examples
The following examples illustrate how you can configure Logstash to filter events, process Apache logs and syslog messages, and use conditionals to control what events are processed by a filter or output.
Expand Down
4 changes: 2 additions & 2 deletions docs/static/contributing-patch.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,13 @@ require "logstash/outputs/zeromq"
require "logstash/devutils/rspec/spec_helper"

describe LogStash::Outputs::ZeroMQ do
let(:output) { described_class.new("mode" => "server", "topology" => "pushpull" }
let(:output) { described_class.new("mode" => "server", "topology" => "pushpull") }
let(:tracer) { double("logger") }

context "when in server mode" do
it "a ‘bound’ info line is logged" do
allow(tracer).to receive(:debug)
output.logger = logger
output.logger = tracer
expect(tracer).to receive(:info).with("0mq: bound", {:address=>"tcp://127.0.0.1:2120"})
output.register
output.do_close
Expand Down
4 changes: 3 additions & 1 deletion docs/static/getting-started-with-logstash.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ bin/logstash -e 'input { stdin { } } output { stdout {} }'
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.
This pipeline takes input from the standard input, `stdin`, and moves that input to the standard output, `stdout`, in a
structured format. Type hello world at the command prompt to see Logstash respond:
structured format.

Once "Logstash startup completed" is displayed, type hello world at the command prompt to see Logstash respond:

[source,shell]
hello world
Expand Down
8 changes: 4 additions & 4 deletions docs/static/include/pluginbody.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ Gem::Specification.new do |s|
s.version = '0.1.0'
s.licenses = ['Apache License (2.0)']
s.summary = "This {plugintype} does x, y, z in Logstash"
s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
s.authors = ["Elastic"]
s.email = '[email protected]'
s.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
Expand Down Expand Up @@ -1051,7 +1051,7 @@ environment, and `0.1.0` with the correct version number from the gemspec file.
[source,sh]
[subs="attributes"]
----------------------------------
bin/plugin install /my/logstash/plugins/logstash-{plugintype}-{pluginname}/logstash-{plugintype}-{pluginname}-0.1.0.gem
bin/logstash-plugin install /my/logstash/plugins/logstash-{plugintype}-{pluginname}/logstash-{plugintype}-{pluginname}-0.1.0.gem
----------------------------------
+
* After running this, you should see feedback from Logstash that it was
Expand All @@ -1072,7 +1072,7 @@ currently available:

[source,sh]
----------------------------------
bin/plugin list
bin/logstash-plugin list
----------------------------------
Depending on what you have installed, you might see a short or long list of
plugins: inputs, codecs, filters and outputs.
Expand Down Expand Up @@ -1275,7 +1275,7 @@ by running:
[source,sh]
[subs="attributes"]
----------------------------------
bin/plugin install logstash-{plugintype}-mypluginname
bin/logstash-plugin install logstash-{plugintype}-mypluginname
----------------------------------

==== Contributing your source code to https://github.com/logstash-plugins[logstash-plugins]
Expand Down
30 changes: 30 additions & 0 deletions docs/static/logstash-docs-home.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[[logstash-docs-home]]
== Logstash Documentation
Pretty self-explanatory, really

=== Downloads and Releases
* http://www.elasticsearch.org/overview/logstash/download/[Download Logstash 1.4.2]
* http://www.elasticsearch.org/blog/apt-and-yum-repositories/[package repositories]
* http://www.elasticsearch.org/blog/logstash-1-4-2/[release notes]
* https://github.com/elasticsearch/logstash/blob/master/CHANGELOG[view changelog]
* https://github.com/elasticsearch/puppet-logstash[Puppet Module]

=== Plugins
* http://elasticsearch.org/#[contrib plugins]
* http://elasticsearch.org/#[writing your own plugins]
* http://elasticsearch.org/#[Inputs] / http://elasticsearch.org/#[Filters] / http://elasticsearch.org/#[Outputs]
* http://elasticsearch.org/#[Codecs]
* http://elasticsearch.org/#[(more)]

=== HOWTOs, References, Information
* http://elasticsearch.org/#[Getting Started with Logstash]
* http://elasticsearch.org/#[Configuration file overview]
* http://elasticsearch.org/#[Command-line flags]
* http://elasticsearch.org/#[The life of an event in Logstash]
* http://elasticsearch.org/#[Using conditional logic]
* http://elasticsearch.org/#[Glossary]
* http://elasticsearch.org/#[(more)]

=== About / Videos / Blogs
* http://elasticsearch.org/#[Videos]
* http://elasticsearch.org/#[Blogs]
5 changes: 3 additions & 2 deletions docs/static/maintainer-guide.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ reviewing and merging patches.

==== Patch Requirements

A patch is a minimal and accurate answer to exactly one identified and agreed upon problem. It must conform to the code
style guidelines and must include RSpec tests that verify the fitness of the solution.
A patch is a minimal and accurate answer to exactly one identified and agreed upon problem. It must conform to the
https://github.com/elastic/logstash/blob/master/STYLE.md[code style guidelines] and must include RSpec tests that verify
the fitness of the solution.

A patch will be automatically tested by a CI system that will report on the Pull Request status.

Expand Down
11 changes: 2 additions & 9 deletions docs/static/monitoring-apis.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ about Logstash:
* <<root-resource-api>>
* <<stats-info-api>>
* <<hot-threads-api>>

//NOTE: Need to add this to the doc after Alpha 1: * <<plugins-api>>
* <<plugins-api>>

[float]
[[monitoring-common-options]]
Expand Down Expand Up @@ -40,18 +39,13 @@ being consumed by a monitoring tool, rather than intended for human
consumption. The default for the `human` flag is
`false`.


/////
COMMENTED OUT because this API was moved to Alpha 2. Feel free to add review
comments, tho, if you notice inaccuracies.

[[plugins-api]]
=== Plugins API

experimental[]

The plugins API gets information about all Logstash plugins that are currently installed.
This API basically returns the output of running the `bin/plugins list --verbose` command.
This API basically returns the output of running the `bin/logstash-plugin list --verbose` command.

[source,js]
--------------------------------------------------
Expand All @@ -77,7 +71,6 @@ Example response:
....
]
--------------------------------------------------
/////

[[root-resource-api]]
=== Root Resource API
Expand Down
Loading