Refactoring to new Elastic Stack versions.

This commit is contained in:
Miguelangel Freitas
2017-11-19 22:42:36 -05:00
parent 845398d7c7
commit 97a042cfcd
7 changed files with 46 additions and 30 deletions
+6 -4
View File
@@ -1,7 +1,9 @@
FROM kibana:5.5.2
FROM docker.elastic.co/kibana/kibana:5.6.4
RUN apt-get update && apt-get install -y curl
USER root
COPY ./config/kibana.yml /opt/kibana/config/kibana.yml
COPY ./config/kibana.yml /usr/share/kibana/config/kibana.yml
COPY config/wait-for-it.sh /
COPY config/wait-for-it.sh /wait-for-it.sh
RUN chmod 755 /wait-for-it.sh
+7
View File
@@ -90,3 +90,10 @@ logging.quiet: true
# Set the interval in milliseconds to sample system and process performance
# metrics. Minimum is 100ms. Defaults to 10000.
# ops.interval: 10000
xpack.security.enabled: false
xpack.grokdebugger.enabled: false
xpack.graph.enabled: false
xpack.ml.enabled: false
xpack.monitoring.enabled: false
xpack.reporting.enabled: false
+6 -8
View File
@@ -5,15 +5,13 @@ set -e
host="$1"
shift
cmd="kibana"
WAZUH_KIBANA_PLUGIN_URL=${WAZUH_KIBANA_PLUGIN_URL:-https://packages.wazuh.com/wazuhapp/wazuhapp-2.1.0_5.5.2.zip}
WAZUH_KIBANA_PLUGIN_URL=${WAZUH_KIBANA_PLUGIN_URL:-https://packages.wazuh.com/wazuhapp/wazuhapp-2.1.1_5.6.4.zip}
until curl -XGET $host:9200; do
>&2 echo "Elastic is unavailable - sleeping"
sleep 1
sleep 5
done
sleep 30
>&2 echo "Elastic is up - executing command"
if /usr/share/kibana/bin/kibana-plugin list | grep wazuh; then
@@ -26,9 +24,7 @@ sleep 30
echo "Configuring defaultIndex to wazuh-alerts-*"
curl -s -XPUT http://$host:9200/.kibana/config/5.5.2 -H 'Content-Type: application/json' -d '{"defaultIndex" : "wazuh-alerts-*"}' > /dev/null
sleep 30
curl -s -XPUT http://$host:9200/.kibana/config/5.6.4 -H 'Content-Type: application/json' -d '{"defaultIndex" : "wazuh-alerts-*"}' > /dev/null
echo "Setting API credentials into Wazuh APP"
@@ -38,7 +34,7 @@ if [ "x$CONFIG_CODE" = "x404" ]; then
{
"api_user": "foo",
"api_password": "YmFy",
"url": "http://wazuh",
"url": "https://wazuh",
"api_port": "55000",
"insecure": "true",
"component": "API",
@@ -55,4 +51,6 @@ else
echo "Wazuh APP already configured"
fi
sleep 5
exec $cmd