categraf采集文件内容,http方式上报

Viewed 46

categraf采集文件的场景下,是conf/logs.toml来配置的。
如果http的模式下,send_to = "127.0.0.1:17878" 。这里能否允许添加后缀,比如:send_to = "127.0.0.1:17878/receive"

添加后会报错:image.png

这种情况是大家是如何处理的呢

2 Answers

嗯嗯,验证了最新的categraf(0.3.57)版本。
categraf会将send_to配置拆分成ip和port。会将port进行strconv.Atoi(如果有其他特殊字符,上述会将17878/receive整体赋值给port,会转换失败,出现上述报错)

但是实际上:
categraf上报的地址127.0.0.1:17878/api/v2/logs

所以:也没有疑问了

好像是不支持

## the server receive logs, http/tcp/kafka, only kafka brokers can be multiple ip:ports with concatenation character ","
send_to = "127.0.0.1:17878"