在logstash中平均多个字段
我有一个事件,该事件带有可变数量的字段{“ dev_1”:12,“ dev_2”:34,...}
。我应该考虑哪些LogStash过滤器来产生这些字段的平均值,例如{“ device_avg”:23}
?
我不知道提前确切的字段名称。我需要对匹配dev _*
的所有字段进行一些模式匹配,但是我不确定这是我可以简单地使用聚合过滤器
I have an event that comes through with a variable number of fields { "dev_1": 12, "dev_2": 34, ... }
. What logstash filters should I look at to produce an average of those fields, something like { "device_avg": 23 }
?
I don't know the exact field names ahead of time. I will need to do some pattern matching to average all fields that match dev_*
but I'm not sure if that is something I can do simply with an aggregate filter
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须使用红宝石过滤器。尝试
You would have to use a ruby filter. Try