Logstash 与 Collectd 的集成

Logstash integration with Collectd

我设置了 logstash 和 collectd,以便 collectd 向 logstash 报告。这工作正常,除了我得到了相同时间戳的一堆指标。有没有办法获取数据,而不是 {ts: x, type:metric1, value:value1, ...}, {ts: x, type:metric2, value:value2, ...} ...,我得到类似 {ts: x, type1:metric1, value1:value1, type2:metric2, value2:value2, ...} 的数据?从某种意义上说,聚合每个时间戳的特定指标的数据。

我有一种感觉,您可能在 Logstash 配置文件中配置了一个 "multiline" 过滤器。多行过滤器实际上获取同时接收到的所有值并将它们组合起来。尝试将其关闭并检查您会得到什么。