Commit e72314e2 authored by 段孔乐's avatar 段孔乐

优化配置

parent 8be96778
...@@ -5,4 +5,5 @@ logstash.log ...@@ -5,4 +5,5 @@ logstash.log
.idea .idea
.vscode .vscode
.github .github
\ No newline at end of file .elasticsearch/data/
\ No newline at end of file
...@@ -42,7 +42,7 @@ function addIndexTemplate() { ...@@ -42,7 +42,7 @@ function addIndexTemplate() {
} }
function uploadConfig() { function uploadConfig() {
resp=$(curl -s -XPOST "$kibana_host/api/saved_objects/_import?overwrite=true" --form "file=@kibana/config.ndjson" --header 'kbn-xsrf: true') resp=$(curl -s -XPOST "$kibana_host/api/saved_objects/_import?overwrite=true" --form "file=@kibana/export.ndjson" --header 'kbn-xsrf: true')
echo "$resp" echo "$resp"
if contain "$resp" 'success'; then if contain "$resp" 'success'; then
green "config upload succeed" green "config upload succeed"
...@@ -51,16 +51,6 @@ function uploadConfig() { ...@@ -51,16 +51,6 @@ function uploadConfig() {
fi fi
} }
function uploadIndexPattern() {
resp=$(curl -s -XPOST "$kibana_host/api/saved_objects/_import?overwrite=true" --form "file=@kibana/index-patterns.ndjson" --header 'kbn-xsrf: true')
echo "$resp"
if contain "$resp" 'success'; then
green "index-patterns upload succeed"
else
red "index-patterns upload failed"
fi
}
function notHealth() { function notHealth() {
resp=$(curl -sIL -m 5 -w "%{http_code}" -o /dev/null -XGET "$kibana_host/api/features" --header 'kbn-xsrf: true') resp=$(curl -sIL -m 5 -w "%{http_code}" -o /dev/null -XGET "$kibana_host/api/features" --header 'kbn-xsrf: true')
if [ "$resp" == 200 ]; then if [ "$resp" == 200 ]; then
...@@ -97,7 +87,6 @@ green "=======================================" ...@@ -97,7 +87,6 @@ green "======================================="
addILMPolicy addILMPolicy
addIndexTemplate addIndexTemplate
uploadConfig uploadConfig
# uploadIndexPattern
green "" green ""
green "=========================" green "========================="
green "Initialization completed." green "Initialization completed."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment