From d03081f3e64b030a2c93ac0e6d6c43331fc3715a Mon Sep 17 00:00:00 2001 From: SG <13872653+mmguero@users.noreply.github.com> Date: Fri, 21 Feb 2020 08:28:29 -0700 Subject: [PATCH] Fixed installation of elastalert kibana plugin, but still broken due to this issue: https://github.com/bitsensor/elastalert-kibana-plugin/issues/141 --- Dockerfiles/kibana.Dockerfile | 69 +++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 32 deletions(-) diff --git a/Dockerfiles/kibana.Dockerfile b/Dockerfiles/kibana.Dockerfile index f56d8d686..1b6023f47 100644 --- a/Dockerfiles/kibana.Dockerfile +++ b/Dockerfiles/kibana.Dockerfile @@ -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: @@ -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"]