【问题标题】:Graylog Search with Regex使用正则表达式的 Graylog 搜索
【发布时间】:2018-02-19 08:08:38
【问题描述】:

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

【问题讨论】:

  • 我建议在Graylog Community Forums 中询问有关 Graylog 的问题。只有比 StackOverflow 更多的专业观众。

标签: logging graylog2 graylog


【解决方案1】:

默认情况下,Graylog 中只分析少数消息字段,即。 e. messagefull_messagesource

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

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

例子:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-20
    • 2011-09-02
    • 1970-01-01
    • 2013-11-02
    • 1970-01-01
    • 2015-02-12
    相关资源
    最近更新 更多