我正在尝试获取否。从日志文件到Prometheus命中ERROR的次数。
日志行示例:
{“ LogLevel”:“错误”,“ LogMsg”:“一些消息”,“时间”:“ 2019-07-19_03:31:33.387”}
global:
config_version: 2
input:
type: file
path: /ext/logs/app.log
readall: true
grok:
patterns_dir: ./patterns/
metrics:
- type: counter
name: info_trying_to_mess_with_grok
help: LogInfo
match: ** what is the pattern??**
server:
port: 9144
如何创建模式以匹配grok中的此登录?