Skip to content

Commit

Permalink
Fixed installation of elastalert kibana plugin, but still broken due …
Browse files Browse the repository at this point in the history
  • Loading branch information
mmguero committed Feb 21, 2020
1 parent 1b1fb7c commit d03081f
Showing 1 changed file with 37 additions and 32 deletions.
69 changes: 37 additions & 32 deletions Dockerfiles/kibana.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ ADD kibana/supervisord.conf /etc/supervisord.conf
ADD kibana/dashboards /opt/kibana/dashboards
ADD kibana/maps /opt/maps
# ADD https://github.com/bitsensor/elastalert-kibana-plugin/releases/download/1.1.0/elastalert-kibana-plugin-1.1.0-7.5.0.zip /tmp/elastalert-kibana-plugin.zip
ADD https://github.com/gwintzer/kibana-comments-app-plugin/releases/download/7.4.0/kibana-comments-app-plugin-7.4.0-latest.zip /tmp/kibana-comments.zip


# todo: these extra plugins are kind of gutted right now with 7.5.x, need to fix

# ADD https://github.com/prelert/kibana-swimlane-vis/releases/download/v7.5.2/prelert_swimlane_vis-7.5.2.zip /tmp/kibana-swimlane.zip
# ADD https://github.com/gwintzer/kibana-comments-app-plugin/releases/download/7.4.0/kibana-comments-app-plugin-7.4.0-latest.zip /tmp/kibana-comments.zip

# see https://github.com/walterra/kibana-milestones-vis/issues/9
#ADD https://github.com/walterra/kibana-milestones-vis/releases/download/v7.1.1/kibana-milestones-vis-7.1.1.zip /tmp/kibana-milestones.zip
# ADD https://github.com/walterra/kibana-milestones-vis/releases/download/v7.1.1/kibana-milestones-vis-7.1.1.zip /tmp/kibana-milestones.zip

# TODO: commented out because it's not optimizing in 6.6+ correctly
# put these back in here and below in the build section:
Expand All @@ -72,36 +73,40 @@ RUN chmod 755 /data/*.sh /data/*.py && \
chown -R kibana:kibana /opt/kibana/dashboards /opt/maps /opt/kibana/config/kibana*.yml && \
chmod 400 /opt/maps/* && \
mkdir -p /var/log/supervisor && \
(echo -e "*/2 * * * * su -c /data/kibana-create-moloch-sessions-index.sh kibana >/dev/null 2>&1\n0 * * * * su -c /data/kibana_index_refresh.py kibana >/dev/null 2>&1\n" | crontab -)
## && \ cd /tmp && \
## echo "Installing ElastAlert plugin..." && \
## unzip elastalert-kibana-plugin.zip kibana/elastalert-kibana-plugin/package.json && \
## sed -i "s/7\.5\.0/7\.6\.0/g" kibana/elastalert-kibana-plugin/package.json && \
## zip elastalert-kibana-plugin.zip kibana/elastalert-kibana-plugin/package.json && \
## /usr/share/kibana/bin/kibana-plugin install file:///tmp/elastalert-kibana-plugin.zip --allow-root && \
## rm -f /tmp/elastalert-kibana-plugin.zip && \
## echo "Installing Swimlanes visualization..." && \
## unzip kibana-swimlane.zip kibana/prelert_swimlane_vis/package.json && \
## sed -i "s/7\.5\.1/7\.6\.0/g" kibana/prelert_swimlane_vis/package.json && \
## zip kibana-swimlane.zip kibana/prelert_swimlane_vis/package.json && \
## /usr/share/kibana/bin/kibana-plugin install file:///tmp/kibana-swimlane.zip --allow-root && \
## bash -c "find /usr/share/kibana/plugins/prelert_swimlane_vis/ -type f -exec chmod 644 '{}' \;" && \
## rm -f /tmp/kibana-swimlane.zip
## && \
## echo "Installing Comments visualization..." && \
## unzip kibana-comments.zip kibana/kibana-comments-app-plugin/package.json && \
## sed -i "s/7\.4\.0/7\.6\.0/g" kibana/kibana-comments-app-plugin/package.json && \
## zip kibana-comments.zip kibana/kibana-comments-app-plugin/package.json && \
## /usr/share/kibana/bin/kibana-plugin install file:///tmp/kibana-comments.zip --allow-root && \
## rm -rf /tmp/kibana-comments.zip /tmp/kibana && \
## https://github.com/walterra/kibana-milestones-vis/issues/9
## && \
## echo "Installing Milestones visualization..." && \
## unzip kibana-milestones.zip kibana/kibana-milestones-vis/package.json && \
## sed -i "s/7\.1\.1/7\.6\.0/g" kibana/kibana-milestones-vis/package.json && \
## zip kibana-milestones.zip kibana/kibana-milestones-vis/package.json && \
## /usr/share/kibana/bin/kibana-plugin install file:///tmp/kibana-milestones.zip --allow-root && \
## rm -rf /tmp/kibana-milestones.zip /tmp/kibana
(echo -e "*/2 * * * * su -c /data/kibana-create-moloch-sessions-index.sh kibana >/dev/null 2>&1\n0 * * * * su -c /data/kibana_index_refresh.py kibana >/dev/null 2>&1\n" | crontab -) && \
# cd /tmp && \
# echo "Installing ElastAlert plugin..." && \
# unzip elastalert-kibana-plugin.zip kibana/elastalert-kibana-plugin/package.json && \
# sed -i "s/7\.5\.0/7\.6\.0/g" kibana/elastalert-kibana-plugin/package.json && \
# zip elastalert-kibana-plugin.zip kibana/elastalert-kibana-plugin/package.json && \
# cd /usr/share/kibana/plugins && \
# /usr/share/kibana/bin/kibana-plugin install file:///tmp/elastalert-kibana-plugin.zip --allow-root && \
# rm -rf /tmp/elastalert-kibana-plugin.zip /tmp/kibana && \
cd /tmp && \
echo "Installing Comments visualization..." && \
unzip kibana-comments.zip kibana/kibana-comments-app-plugin/package.json && \
sed -i "s/7\.4\.0/7\.6\.0/g" kibana/kibana-comments-app-plugin/package.json && \
zip kibana-comments.zip kibana/kibana-comments-app-plugin/package.json && \
cd /usr/share/kibana/plugins && \
/usr/share/kibana/bin/kibana-plugin install file:///tmp/kibana-comments.zip --allow-root && \
rm -rf /tmp/kibana-comments.zip /tmp/kibana
# && \ cd /tmp && \
# echo "Installing Swimlanes visualization..." && \
# unzip kibana-swimlane.zip kibana/prelert_swimlane_vis/package.json && \
# sed -i "s/7\.5\.2/7\.6\.0/g" kibana/prelert_swimlane_vis/package.json && \
# zip kibana-swimlane.zip kibana/prelert_swimlane_vis/package.json && \
# cd /usr/share/kibana/plugins && \
# /usr/share/kibana/bin/kibana-plugin install file:///tmp/kibana-swimlane.zip --allow-root && \
# bash -c "find /usr/share/kibana/plugins/prelert_swimlane_vis/ -type f -exec chmod 644 '{}' \;" && \
# rm -rf /tmp/kibana-swimlane.zip /tmp/kibana && \
# cd /tmp && \
# echo "Installing Milestones visualization..." && \
# unzip kibana-milestones.zip kibana/kibana-milestones-vis/package.json && \
# sed -i "s/7\.1\.1/7\.6\.0/g" kibana/kibana-milestones-vis/package.json && \
# zip kibana-milestones.zip kibana/kibana-milestones-vis/package.json && \
# cd /usr/share/kibana/plugins && \
# /usr/share/kibana/bin/kibana-plugin install file:///tmp/kibana-milestones.zip --allow-root && \
# rm -rf /tmp/kibana-milestones.zip /tmp/kibana

CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf", "-u", "root", "-n"]

Expand Down

0 comments on commit d03081f

Please sign in to comment.