Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docker-elk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
Hiep Nguyen
docker-elk
Commits
38389783
Unverified
Commit
38389783
authored
Jan 02, 2018
by
Antoine Cotten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create index pattern via Kibana API
Closes #216
parent
36f983b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
.travis.yml
.travis.yml
+1
-1
README.md
README.md
+16
-5
No files found.
.travis.yml
View file @
38389783
...
...
@@ -32,4 +32,4 @@ script:
-
docker-compose exec -T elasticsearch bin/init_sg.sh
-
docker-compose logs
-
curl --retry 10 --retry-delay 5 -D- http://localhost:9200/ -u kibanaserver:kibanaserver
-
curl --retry 10 --retry-delay 5 -
I http://localhost:5601/
-
curl --retry 10 --retry-delay 5 -
D- http://localhost:5601/api/status
README.md
View file @
38389783
...
...
@@ -133,16 +133,27 @@ about the index pattern configuration.
#### On the command line
Run this command to create a Kibana index pattern
:
Authenticate against Kibana
:
```
console
$
curl
-XPUT
-D-
'http://localhost:9200/.kibana/doc/index-pattern:docker-elk'
\
$
curl
-XPOST
-D-
'http://localhost:5601/api/v1/auth/login'
\
-c
/tmp/sg_cookies
\
-H
'Content-Type: application/json'
\
-
u
kibanaserver:kibanaserver
\
-d
'{"
type": "index-pattern", "index-pattern": {"title": "logstash-*", "timeFieldName": "@timestamp"}
}'
-
H
'kbn-version: 6.1.0'
\
-d
'{"
username":"kibanaserver","password":"kibanaserver"
}'
```
This will automatically be marked as the default index pattern as soon as the Kibana UI is opened for the first time.
Create an index pattern via the Kibana API:
```
console
$
curl
-XPOST
-D-
'http://localhost:5601/api/saved_objects/index-pattern'
\
-b
/tmp/sg_cookies
\
-H
'Content-Type: application/json'
\
-H
'kbn-version: 6.1.0'
\
-d
'{"attributes":{"title":"logstash-*","timeFieldName":"@timestamp"}}'
```
The created pattern will automatically be marked as the default index pattern as soon as the Kibana UI is opened for the first time.
## Configuration
...
...
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