kibana 添加 index patterns api

添加index patterns;  test 是索引收集的日志处理后的列表

while read line;do
curl --user elastic:xxxxx -X POST IP:5601/api/saved_objects/index-pattern/${line} -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '{ "attributes": { "title": "'"${line}-*"'" }}'
done < test

删除index patterns
curl -X DELETE "10.0.0.51:5601/api/saved_objects/index-pattern/twitter" -H 'kbn-xsrf: true'

原文地址:https://www.cnblogs.com/sqbk/p/15205222.html