You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+56-24Lines changed: 56 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,33 @@
2
2
3
3
This is a highly configurable logstash (1.4.2) image running elasticsearch (1.1.1) and Kibana 3 (3.0.1).
4
4
5
-
## Optional first step, build image from source
5
+
## Optional, build and run the image from source
6
6
7
-
If you prefer to build from source rather than use the [pblittle/docker-logstash][1] trusted build published to the public Docker Registry, execute the following from the project root:
7
+
If you prefer to build from source rather than use the [pblittle/docker-logstash][1] trusted build published to the public Docker Registry, execute the following:
### First, prepare your Logstash configuration file
19
+
20
+
The logstash configuration file used in this container is downloaded from the internet using `wget`. The configuration file location is determined by the value of the `LOGSTASH_CONFIG_FILE` environment variable, which is set using the `-e` flag when executing `docker run`.
21
+
22
+
By default, unless `LOGSTASH_CONFIG_FILE` is overridden, an [example configuration file][2] for an embedded Elasticsearch will be downloaded, moved to `/opt/logstash.conf`, and used by logstash in your container.
23
+
24
+
I have created three reference config files that can be used for testing:
If you want to link to another container running elasticsearch rather than the embedded server, set the `ES_CONTAINER` environment variable to your existing elasticsearch container name.
In addition to the link, if you want your elasticsearch node's `bind_host` and `port` automatically detected, you will need to set the`ES_HOST` and `ES_PORT`placeholders in your`elasticsearch` definition in your logstash config file. For example:
71
+
To have you the linked elasticsearch container's `bind_host` and `port` automatically detected, you will need to create an`ES_HOST` and `ES_PORT`placeholder in the`elasticsearch` definition in your logstash config file. For example:
43
72
44
73
output {
45
74
elasticsearch {
@@ -48,22 +77,25 @@ In addition to the link, if you want your elasticsearch node's `bind_host` and `
48
77
}
49
78
}
50
79
51
-
### Use an external Elasticsearch server
80
+
I have created an [example linked config file](https://gist.githubusercontent.com/pblittle/0b937485fa4a322ea9eb/raw/logstash_linked.conf) which includes the `ES_HOST` and `ES_PORT` placeholders described above.
81
+
82
+
Verify the logstash installation by visiting:
52
83
53
-
If you are using an external elasticsearch server rather than an embedded or linked server, simply set the `ES_HOST` and `ES_PORT` environment variables.
If you are using an external elasticsearch server rather than the embedded server or a linked container, simply provide a configuration file with the Elasticsearch endpoints already configured:
60
89
61
-
Without any environment changes, an [example configuration file][2] will be created for you. You can override the example config by setting the `LOGSTASH_CONFIG_URL` environment variable to a file accessible via `wget`.
0 commit comments