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

优化配置

parent 8be96778
......@@ -5,4 +5,5 @@ logstash.log
.idea
.vscode
.github
\ No newline at end of file
.github
.elasticsearch/data/
\ No newline at end of file
......@@ -42,7 +42,7 @@ function addIndexTemplate() {
}
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"
if contain "$resp" 'success'; then
green "config upload succeed"
......@@ -51,16 +51,6 @@ function uploadConfig() {
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() {
resp=$(curl -sIL -m 5 -w "%{http_code}" -o /dev/null -XGET "$kibana_host/api/features" --header 'kbn-xsrf: true')
if [ "$resp" == 200 ]; then
......@@ -97,7 +87,6 @@ green "======================================="
addILMPolicy
addIndexTemplate
uploadConfig
# uploadIndexPattern
green ""
green "========================="
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