X-Pack (alpha) support.
This commit is contained in:
parent
9da3ffb312
commit
a519ed63ea
14
README.md
14
README.md
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
[](https://gitter.im/deviantony/fig-elk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://gitter.im/deviantony/fig-elk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
|
|
||||||
|
**WARNING: Experimental support of the X-Pack version of the Elastic stack.**
|
||||||
|
|
||||||
|
It is *NOT* recommended to use this in production.
|
||||||
|
|
||||||
Run the latest version of the ELK (Elasticseach, Logstash, Kibana) stack with Docker and Docker-compose.
|
Run the latest version of the ELK (Elasticseach, Logstash, Kibana) stack with Docker and Docker-compose.
|
||||||
|
|
||||||
It will give you the ability to analyze any data set by using the searching/aggregation capabilities of Elasticseach and the visualization power of Kibana.
|
It will give you the ability to analyze any data set by using the searching/aggregation capabilities of Elasticseach and the visualization power of Kibana.
|
||||||
|
@ -50,18 +54,16 @@ Now that the stack is running, you'll want to inject logs in it. The shipped log
|
||||||
$ nc localhost 5000 < /path/to/logfile.log
|
$ nc localhost 5000 < /path/to/logfile.log
|
||||||
```
|
```
|
||||||
|
|
||||||
And then access Kibana UI by hitting [http://localhost:5601](http://localhost:5601) with a web browser.
|
And then access Kibana UI by hitting [http://localhost:5601](http://localhost:5601) with a web browser and use the following credentials to login:
|
||||||
|
|
||||||
|
* user: *elastic*
|
||||||
|
* password: *pass-elastic*
|
||||||
|
|
||||||
*NOTE*: You'll need to inject data into logstash before being able to create a logstash index in Kibana. Then all you should have to do is to
|
*NOTE*: You'll need to inject data into logstash before being able to create a logstash index in Kibana. Then all you should have to do is to
|
||||||
hit the create button.
|
hit the create button.
|
||||||
|
|
||||||
See: https://www.elastic.co/guide/en/kibana/current/setup.html#connect
|
See: https://www.elastic.co/guide/en/kibana/current/setup.html#connect
|
||||||
|
|
||||||
You can also access:
|
|
||||||
* Sense: [http://localhost:5601/app/sense](http://localhost:5601/app/sense)
|
|
||||||
|
|
||||||
*NOTE*: In order to use Sense, you'll need to query the IP address associated to your *network device* instead of localhost.
|
|
||||||
|
|
||||||
By default, the stack exposes the following ports:
|
By default, the stack exposes the following ports:
|
||||||
* 5000: Logstash TCP input.
|
* 5000: Logstash TCP input.
|
||||||
* 9200: Elasticsearch HTTP
|
* 9200: Elasticsearch HTTP
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
elasticsearch:
|
elasticsearch:
|
||||||
image: elasticsearch:latest
|
build: elasticsearch/
|
||||||
command: elasticsearch -Des.network.host=0.0.0.0
|
|
||||||
ports:
|
ports:
|
||||||
- "9200:9200"
|
- "9200:9200"
|
||||||
- "9300:9300"
|
- "9300:9300"
|
||||||
logstash:
|
logstash:
|
||||||
image: logstash:latest
|
image: logstash:5
|
||||||
command: logstash -f /etc/logstash/conf.d/logstash.conf
|
command: logstash -f /etc/logstash/conf.d/logstash.conf
|
||||||
volumes:
|
volumes:
|
||||||
- ./logstash/config:/etc/logstash/conf.d
|
- ./logstash/config:/etc/logstash/conf.d
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
FROM elasticsearch:5
|
||||||
|
|
||||||
|
ENV ES_JAVA_OPTS="-Des.path.conf=/etc/elasticsearch"
|
||||||
|
|
||||||
|
RUN elasticsearch-plugin install x-pack
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y netcat
|
||||||
|
|
||||||
|
COPY entrypoint.sh /tmp/entrypoint.sh
|
||||||
|
RUN chmod +x /tmp/entrypoint.sh
|
||||||
|
|
||||||
|
CMD ["/tmp/entrypoint.sh"]
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
echo "Starting Elasticsearch"
|
||||||
|
gosu elasticsearch elasticsearch -E es.network.host=0.0.0.0 -E es.discovery.zen.minimum_master_nodes=1 &
|
||||||
|
|
||||||
|
echo "Waiting for Elasticsearch to boot..."
|
||||||
|
while true; do
|
||||||
|
nc -q 1 localhost 9200 2>/dev/null && break
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "Elasticsearch ready. Creating x-pack users..."
|
||||||
|
|
||||||
|
/usr/share/elasticsearch/bin/x-pack/users useradd elastic -r admin -p 'pass-elastic'
|
||||||
|
/usr/share/elasticsearch/bin/x-pack/users useradd kibana -r kibana4_server -p 'pass-kibana'
|
||||||
|
/usr/share/elasticsearch/bin/x-pack/users useradd logstash -r logstash -p 'pass-logstash'
|
||||||
|
|
||||||
|
while true; do sleep 1000; done
|
||||||
|
|
||||||
|
exit 0
|
|
@ -1,10 +1,10 @@
|
||||||
FROM kibana:latest
|
FROM kibana:5
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y netcat
|
RUN apt-get update && apt-get install -y netcat bzip2
|
||||||
|
|
||||||
COPY entrypoint.sh /tmp/entrypoint.sh
|
COPY entrypoint.sh /tmp/entrypoint.sh
|
||||||
RUN chmod +x /tmp/entrypoint.sh
|
RUN chmod +x /tmp/entrypoint.sh
|
||||||
|
|
||||||
RUN kibana plugin --install elastic/sense
|
RUN kibana-plugin install x-pack
|
||||||
|
|
||||||
CMD ["/tmp/entrypoint.sh"]
|
CMD ["/tmp/entrypoint.sh"]
|
||||||
|
|
|
@ -74,3 +74,10 @@ bundled_plugin_ids:
|
||||||
- plugins/table_vis/index
|
- plugins/table_vis/index
|
||||||
- plugins/vis_types/index
|
- plugins/vis_types/index
|
||||||
- plugins/visualize/index
|
- plugins/visualize/index
|
||||||
|
|
||||||
|
|
||||||
|
xpack.security.encryptionKey: "my-secret-key"
|
||||||
|
elasticsearch.username: "kibana"
|
||||||
|
elasticsearch.password: "pass-kibana"
|
||||||
|
xpack.security.skipSslCheck: true
|
||||||
|
xpack.security.useUnsafeSessions: true
|
||||||
|
|
|
@ -9,5 +9,7 @@ input {
|
||||||
output {
|
output {
|
||||||
elasticsearch {
|
elasticsearch {
|
||||||
hosts => "elasticsearch:9200"
|
hosts => "elasticsearch:9200"
|
||||||
|
user => "logstash"
|
||||||
|
password => "pass-logstash"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue