18 lines
652 B
Bash
18 lines
652 B
Bash
#!/usr/bin/env sh
|
|
|
|
if [ -n "$ELASTICSEARCH_PASSWORD_FILE" ]; then
|
|
ELASTICSEARCH_PASSWORD=$(cat "$ELASTICSEARCH_PASSWORD_FILE");
|
|
export ELASTICSEARCH_PASSWORD;
|
|
fi
|
|
|
|
# Initialize kibana stuff related to metric and filebeat
|
|
filebeat setup --dashboards --index-management -e \
|
|
-E output.elasticsearch.hosts=["$ELASTICSEARCH_HOSTS"] \
|
|
-E output.elasticsearch.username="$ELASTICSEARCH_USERNAME" \
|
|
-E output.elasticsearch.password="$ELASTICSEARCH_PASSWORD" \
|
|
-E output.elasticsearch.ssl.verification_mode=none \
|
|
-E setup.kibana.host="$KIBANA_HOSTS" \
|
|
-E setup.kibana.ssl.verification_mode=none \
|
|
-c /usr/share/filebeat/filebeat.yml
|
|
|
|
exec "$@" |