feat(logs): make it so rule logs-setup isn't necessary
This commit is contained in:
parent
3ef811b334
commit
8dd0a74046
9 changed files with 49 additions and 11 deletions
16
logs/kibana/bootstrap.sh
Executable file
16
logs/kibana/bootstrap.sh
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
kibana_setup() {
|
||||
set -xe
|
||||
until curl -s -f "localhost:5601/api/status"; do
|
||||
sleep 2
|
||||
done
|
||||
|
||||
curl -v -X POST "localhost:5601/api/saved_objects/index-pattern/docker-logs" \
|
||||
-H "kbn-xsrf: true" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '@/setup/docker-logs.json'
|
||||
exit 0
|
||||
}
|
||||
kibana_setup &
|
||||
exec /usr/local/bin/kibana-docker >/dev/null
|
||||
1
logs/kibana/docker-logs.json
Normal file
1
logs/kibana/docker-logs.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"attributes":{"title":"docker-*","timeFieldName":"@timestamp"}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue