Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
docker-elk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
段孔乐
docker-elk
Commits
e72314e2
Commit
e72314e2
authored
Apr 29, 2022
by
段孔乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化配置
parent
8be96778
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
14 deletions
+4
-14
.gitignore
.gitignore
+3
-2
init-kibana.sh
init-kibana.sh
+1
-12
No files found.
.gitignore
View file @
e72314e2
...
...
@@ -5,4 +5,5 @@ logstash.log
.idea
.vscode
.github
\ No newline at end of file
.github
.elasticsearch/data/
\ No newline at end of file
init-kibana.sh
View file @
e72314e2
...
...
@@ -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."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment