Создать index pattern через API kibana
Зарегистрировать новый index pattern через Kibana REST API
curl -X POST http://kibana:5601/api/saved_objects/index-pattern -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '{"attributes":{"title":"logs-*","timeFieldName":"@timestamp"}}'
more kibana
all 15 commands →
Экспортировать объекты
curl -X POST http://kibana:5601/api/saved_objects/_export -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '{"type":["dashboard","visualization"],"includeReferencesDeep":true}' -o export.ndjson
Импортировать объекты
curl -X POST http://kibana:5601/api/saved_objects/_import?overwrite=true -H 'kbn-xsrf: true' -F file=@export.ndjson
Здоровье Kibana
curl -s http://kibana:5601/api/status | jq '{status: .status.overall.level, version: .version.number}'
Список index patterns
curl -s http://kibana:5601/api/saved_objects/_find?type=index-pattern | jq '.saved_objects[].attributes.title'
Запрос в Dev Tools Console
GET logs-*/_search
{
"query": {"match": {"level": "error"}},
"size": 10
}