我有一个jdbc输入,需要发送到两个不同的输出(http和influxdb)。我需要根据输出添加字段。我希望我可以在输出阶段使用add_field,但它只在输入和过滤阶段可用。}filter {
output {
#need to add/remove field here for http output #need to add/remove field here for influxdb
我需要从访问日志中获取并存储不同的2xx、4xx和5xx请求的响应时间和计数。(用于绘图和警报目的)。 我知道我可以使用telegraf来解析日志文件,并不断地将数据发送到influxdb。并从对数据运行查询中获得这些计数。 [1,2 ] 但是通过这种方式,我将发送大量的数据点到influxbd服务器。我试图找到的是,如果有任何方法,我只能将处理后的数据发送到influxdb,比如no of req/sec,no of 2xx/4xx/5xx req/sec。