gpt4 book ai didi

logging - 使用正则表达式进行 Graylog 搜索

转载 作者:行者123 更新时间:2023-12-04 13:22:26 26 4
gpt4 key购买 nike

在我的 Graylog 服务器中,我想创建一个搜索值来查找以下查询:ctxt__Error:"User \"USERNAME\" not found." .
但我想为每个用户名找到任何错误。当我这样做时,我的搜索字符串不起作用:ctxt__Error:"User \"*\" not found."有没有另一种方法可以做到这一点?

最佳答案

Graylog 中默认只分析少数消息字段,即。 e. message , full_message , 和 source .

如果您希望分析其他字段,您可以创建自定义 Elasticsearch 索引模板:http://docs.graylog.org/en/2.4/pages/configuration/elasticsearch.html#custom-index-mappings

除此之外,应该可以在查询中使用正则表达式(不是简单的通配符),但正则表达式必须匹配完整的字段:
http://docs.graylog.org/en/2.4/pages/queries.html#search-query-language

例子:

ctxt_Error:/User ".*" not found./

关于logging - 使用正则表达式进行 Graylog 搜索,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48861805/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com