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
863848e8
Commit
863848e8
authored
Jul 06, 2021
by
段孔乐
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release-1.0.1' into 'main'
modify install script See merge request
!3
parents
0cc85c53
9a206581
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
2 deletions
+26
-2
README.md
README.md
+4
-0
init-kibana.sh
init-kibana.sh
+15
-1
start.sh
start.sh
+7
-1
No files found.
README.md
View file @
863848e8
...
@@ -26,6 +26,10 @@ Filebeat 负责数据采集
...
@@ -26,6 +26,10 @@ Filebeat 负责数据采集
bash start-and-init.sh
bash start-and-init.sh
###默认地址
http://localhost:15601/app/discover
###日志查看
###日志查看
docker-compose logs --tail=100 elasticsearch
docker-compose logs --tail=100 elasticsearch
...
...
init-kibana.sh
View file @
863848e8
...
@@ -60,11 +60,25 @@ function notHealth() {
...
@@ -60,11 +60,25 @@ function notHealth() {
fi
fi
}
}
function
checkELKRunning
(){
if
[
"
$(
docker ps |
grep
-c
'docker-elk'
)
"
-lt
1
]
;
then
red
"==============="
red
"ELK not running"
red
"==============="
exit
1
fi
}
checkELKRunning
start
=
$(
date
+%s
)
start
=
$(
date
+%s
)
while
notHealth
;
do
while
notHealth
;
do
end
=
$(
date
+%s
)
end
=
$(
date
+%s
)
take
=
$((
end
-
start
))
take
=
$((
100
-
(
end
-
start
)
))
red
"Kibana not ready yet, waiting... time:
$take
"
red
"Kibana not ready yet, waiting... time:
$take
"
if
[
"
$take
"
-lt
0
]
;
then
red
"time out, please check ELK status"
exit
1
fi
sleep
1s
sleep
1s
done
done
green
"======================================="
green
"======================================="
...
...
start.sh
View file @
863848e8
...
@@ -23,10 +23,16 @@ function checkAllPort() {
...
@@ -23,10 +23,16 @@ function checkAllPort() {
}
}
function
start
(){
function
start
(){
docker-compose up
-d
if
docker-compose up
-d
;
then
green
"==============="
green
"==============="
green
"start succeed"
green
"start succeed"
green
"==============="
green
"==============="
else
red
"==============="
red
"start failed"
red
"==============="
exit
1
fi
}
}
function
checkPS
(){
function
checkPS
(){
...
...
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