MySQL慢查询日志ES索引模板
生活随笔
收集整理的這篇文章主要介紹了
MySQL慢查询日志ES索引模板
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
{"template": "mysql-slow-log-*","settings": {"index": {"refresh_interval": "5s"}},"mappings": {"mysql-slow-log": {"numeric_detection": true, //開啟數值類型設置"properties": {"@timestamp": {"type": "date","format": "strict_date_optional_time||epoch_millis"},"@version": {"type": "string"},"Query_time": {"type": "double" //設置該字段為double類型的
},"Row_sent": {"type": "string"},"Rows_examined": {"type": "string"},"clientip": {"type": "string"},"envCode": {"type": "string"},"host": {"type": "string"},"id": {"type": "string"},"lock_time": {"type": "string"},"message": {"type": "string"},"mysqlType": {"type": "string","norms": {"enabled": false},"fielddata": {"format": "disabled"},"fields": { //產生.raw聚合"raw": {"type": "string","index": "not_analyzed","ignore_above": 256}}},"nsCode": {"type": "string"},"path": {"type": "string"},"sql": {"type": "string","index": "not_analyzed" //在創建索引的時候,該字段不分詞
},"tags": {"type": "string"},"timestamp": {"type": "string"},"type": {"type": "string"},"user": {"type": "string"}}}}
}
?
轉載于:https://www.cnblogs.com/crysmile/p/7071766.html
總結
以上是生活随笔為你收集整理的MySQL慢查询日志ES索引模板的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 高性能索引
- 下一篇: 51nod 1421 最大MOD值