kibana welcome

This commit is contained in:
AlfonsoRBJ
2019-03-19 14:35:44 +01:00
parent 7e2549a85a
commit c1a33b7185
2 changed files with 22 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ ARG XPACK_DEVTOOLS="true"
ARG XPACK_MONITORING="true"
ARG XPACK_APM="true"
ARG CHANGE_WELLCOME="false"
COPY --chown=kibana:kibana ./config/wazuh_app_config.sh ./
@@ -66,4 +67,10 @@ RUN ./xpack_config.sh
RUN /usr/local/bin/kibana-docker --optimize
COPY --chown=kibana:kibana ./config/welcome_wazuh.sh ./
RUN chmod +x ./welcome_wazuh.sh
RUN ./welcome_wazuh.sh
ENTRYPOINT /entrypoint.sh

View File

@@ -0,0 +1,15 @@
#!/bin/bash
if [[ $CHANGE_WELLCOME == "true" ]]
then
kibana_path="/usr/share/kibana"
# Set Wazuh app as the default landing page
echo "Set Wazuh app as the default landing page"
echo "server.defaultRoute: /app/wazuh" >> /etc/kibana/kibana.yml
# Redirect Kibana welcome screen to Discover
echo "Redirect Kibana welcome screen to Discover"
sed -i "s:'/app/kibana#/home':'/app/kibana#/discover':g" $kibana_path/src/ui/public/chrome/directives/global_nav/global_nav.html
sed -i "s:'/app/kibana#/home':'/app/kibana#/discover':g" $kibana_path/src/ui/public/chrome/directives/header_global_nav/header_global_nav.js
fi