Comments (2)
@Analect Great questions! I'll update the README with the answers below as they're bound to interest others faced with the same problems.
Elasticsearch's home directory in the image is /usr/share/elasticsearch
, plugins live in the plugins
subdirectory and the plugin
tool resides in bin
.
The most straightforward way to install a plugin is to extend the base image by creating a Dockerfile like this:
FROM sebp/elk
ENV ES_HOME /usr/share/elasticsearch
WORKDIR ${ES_HOME}
RUN bin/plugin -i elasticsearch/elasticsearch-mapper-attachments/2.6.0
Then build the new image as you usually would (e.g. docker build -t analect/elk-and-plugins .
) and run it (e.g. docker run ... analect/elk-and-plugins
).
You could also install a plugin manually by downloading its binary package (e.g. the 'hidden' http://download.elasticsearch.org/elasticsearch/elasticsearch-mapper-attachments/elasticsearch-mapper-attachments-2.6.0.zip, not the source at https://github.com/elastic/elasticsearch-mapper-attachments/releases) and unzip-/untargz-ing it in the /usr/share/elasticsearch/plugins
directory, but it's more of a hassle than just using plugin -install
.
In the same way, create a Dockerfile like this to install a Logstash plugin:
FROM sebp/elk
# ... other stuff, e.g. install Elasticsearch plugins ...
## the LOGSTASH_HOME env var is created in sebp/elk, no need to redefine it
#ENV LOGSTASH_HOME /opt/logstash
WORKDIR ${LOGSTASH_HOME}
RUN bin/plugin install logstash-output-kafka
If you want to start Elasticsearch's web interface, then you need to override the start.sh
script from the base sebp/elk
image to start the logstash-web
service.
To do that:
-
Grab the original
start.sh
script, and add this line in it (say just afterservice logstash start
):service logstash-web start
-
Create a new
Dockerfile
next to the amendedstart.sh
script, and put this in:FROM sebp/elk # ... other stuff, e.g. install Elasticsearch and Logstash plugins ... ADD ./start.sh /usr/local/bin/start.sh EXPOSE 9292
-
Build the image as usual.
-
Start the image with port 9292 published (i.e.
docker run ... -p 9292:9292 ...
).
As for leveraging logstash-forwarder, I'm not quite sure what you're looking for, so for the time being I can refer you to the Logstash book for an end-to-end description of setting up and using Logstash, and to the Logstash Reference for the details. If you're after something in particular, let me know and I'll see if I can point you to a specific write-up.
from elk-docker.
@spujadas
Thanks for the comprehensive instructions. Much appreciated.
from elk-docker.
Related Issues (20)
- Can't get Elk started HOT 7
- cannot add login page to kibana HOT 1
- How to use environment variable in 30-output.conf file HOT 2
- ELK fails to start on MAC M1 HOT 8
- Setting up APM question HOT 4
- Question: user authentication for https HOT 1
- Error in Security section HOT 1
- Issues installing on TrueNAS Scale HOT 1
- Update ELK to latest version (currently 8.3.3) HOT 4
- Issues running on AWS Fargate HOT 2
- Add sample docker-compose.yml with persistance + traefik configuration HOT 1
- example using image never starts as elasticsearch doesn't start HOT 1
- Kibana refuses connection, nothing in logs HOT 2
- filebeat x509 certificate signed by unknown authority when calling api endpoint HOT 1
- Kibana enrollement token
- Update ELK to 8.9.0 HOT 1
- Kibana 8.11.1 Security Update (ESA-2023-25) HOT 1
- want to move data from this running stack to another machine (arm64-amd64) how to
- how to disable the features that require a licence.
- Please update to 8.13.2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elk-docker.