Kibana advanced settings is giving me a headache
@@ -490,7 +490,12 @@ fi
sleep 1
echo "Installing Kibana advanced settings"
-curl -X POST "https://localhost:5601/api/kibana/settings" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -F file=@./templates/redelk_kibana_settings.json >> $LOGFILE 2>&1
+# API thing not working with json file
+# curl -X POST "http://localhost:5601/api/kibana/settings" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -F file=@./templates/redelk_kibana_settings.json >> $LOGFILE 2>&1
+# Quick fix:
+# Begin quick fix for Kibana advanced settings
+echo "Setting Kibana advanced settings"
+curl -XPUT 'http://localhost:5601/api/saved_objects/config/7.8.0' -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '{"attributes":{"buildNum":31997,"dateFormat:dow":"Monday","defaultIndex":"redirtraffic","discover:sampleSize":5000,"savedObjects:listingLimit":5000,"savedObjects:perPage":50,"siem:defaultIndex":["apm-*-transaction*","auditbeat-*","endgame-*","filebeat-*","packetbeat-*","winlogbeat-*","rtops-*","redirtraffic-*"],"siem:enableNewsFeed":false,"theme:darkMode":true,"shortDots:enable": true,"telemetry:enabled": false,"telemetry:optIn": false}}' >> $LOGFILE 2>&1
ERROR=$?
if [ $ERROR -ne 0 ]; then
echoerror "Could not install Kibana advanced settings (Error Code: $ERROR)."
@@ -571,11 +576,7 @@ if [ ${WHATTOINSTALL} = "full" ]; then
fi
echo "Modifying elasticsearch config file to allow external access from docker interface"
-<<<<<<< HEAD
sed -E -i.bak "s/#bootstrap.memory_lock: true/bootstrap.memory_lock: true/g" /etc/elasticsearch/elasticsearch.yml && echo 'discovery.type: "single-node"' >> /etc/elasticsearch/elasticsearch.yml
-=======
- sed -E -i.bak "s/#bootstrap.memory_lock: true/bootstrap.memory_lock: true/g" /etc/elasticsearch/elasticsearch.yml >> $LOGFILE 2>&1 && echo 'discovery.type: "single-node"' >> /etc/elasticsearch/elasticsearch.yml >> $LOGFILE 2>&1
->>>>>>> 47da580dd4e9aa922a45809bc315eb13a08f3134
ERROR=$?
if [ $ERROR -ne 0 ]; then
echoerror "Error with modifying elasticsearch config file to allow external access from docker interface (Error Code: $ERROR)."
