简体   繁体   English

kibana logstash表基于日志级别的行颜色

[英]kibana logstash table row color based on log level

This seems all too simple but I haven't been able to find anything on the internet about it. 这似乎太简单了,但我无法在互联网上找到任何关于它的东西。

I'm setting up Kibana to visualise our logs (log4j). 我正在设置Kibana来可视化我们的日志(log4j)。 I would like WARN and ERROR (loglevel field in ElasticSearch) to be in another colour in the table view of entries returned from a query. 我希望WARN和ERROR(ElasticSearch中的loglevel字段)在查询返回的条目的表视图中使用另一种颜色。 Is this possible? 这可能吗?

Thanks, Steve 谢谢,史蒂夫

I created simple, dirty patch for kibana-3.1.1. 我为kibana-3.1.1创建了简单,脏的补丁。 Text color becomes red when JSON data has "level" field and its value is "error" 当JSON数据具有“级别”字段且其值为“错误”时,文本颜色变为红色

Patch: https://github.com/mamewotoko/kibana/commit/b96078a950f26d1036f747fc73091e5577a8d9eb 补丁: https://github.com/mamewotoko/kibana/commit/b96078a950f26d1036f747fc73091e5577a8d9ebhttps://github.com/mamewotoko/kibana/commit/b96078a950f26d1036f747fc73091e5577a8d9eb

Sample data: 样本数据:

{"index":{"_index":"xxxlog","_type":"log","_id":0}}
{ "level": "error", "message": "Error!!" }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM