Skip to content

Commit

Permalink
Add XPACK_SECURITY_ENABLED and KIBANA_INDEX options to Kibana container.
Browse files Browse the repository at this point in the history
  • Loading branch information
manuasir committed Jun 3, 2019
1 parent f66f986 commit 22ad436
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions kibana/config/kibana_settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,22 @@ WAZUH_MAJOR=3
##############################################################################
if [ "$ELASTICSEARCH_KIBANA_IP" != "" ]; then
sed -i 's|http://elasticsearch:9200|'$ELASTICSEARCH_KIBANA_IP'|g' /usr/share/kibana/config/kibana.yml
fi

# If KIBANA_INDEX was set, then change the default index in kibana.yml configuration file. If there was an index, then delete it and recreate.
if [ "$KIBANA_INDEX" != "" ]; then
if grep -q 'kibana.index' /usr/share/kibana/config/kibana.yml; then
sed -i '/kibana.index/d' /usr/share/kibana/config/kibana.yml
fi
echo "kibana.index: $KIBANA_INDEX" >> /usr/share/kibana/config/kibana.yml
fi

# If XPACK_SECURITY_ENABLED was set, then change the xpack.security.enabled option from true (default) to false.
if [ "$XPACK_SECURITY_ENABLED" != "" ]; then
if grep -q 'xpack.security.enabled' /usr/share/kibana/config/kibana.yml; then
sed -i '/xpack.security.enabled/d' /usr/share/kibana/config/kibana.yml
fi
echo "xpack.security.enabled: $XPACK_SECURITY_ENABLED" >> /usr/share/kibana/config/kibana.yml
fi

if [ "$KIBANA_IP" != "" ]; then
Expand Down

0 comments on commit 22ad436

Please sign in to comment.