指标解析错误:偏移量为#的预期字段不是很有帮助

时间:2018-12-29 10:21:41

标签: telegraf telegraf-inputs-plugin

Telegraf出现问题,在处理Powershell脚本产生的以下行时,它在输入中返回错误:

nps,Component \ Name = E \:\ Label \:DB \ Serial \ Number \ 51646c8b,Component \ Type = DISK,Node \ Name = f-lon21-wmemstr.testsystem.ie,Node \ Location = Labenv, Node \ Family = Microsoft \ Windows \ NT \ Servers,Node \ Vendor = Microsoft,metric_name = Disk \ Space \ Free \-\ MB metric_value = 42639.22 1546062000000000000 nps,Component \ Name = E \:\ Label \:DB \ Serial \ Number \ 51646c8b,Component \ Type = DISK,Node \ Name = f-lon21-wmemstr.testsystem.ie,Node \ Location = Labenv,Node \ Family = Microsoft \ Windows \ NT \ Servers,Node \供应商= Microsoft,metric_name =磁盘\ Space \ Total \-\ MB metric_value = 140960 1546062000000000000 nps,Component \ Name = E \:\ Label \:DB \ Serial \ Number \ 51646c8b,Component \ Type = DISK,Node \ Name = f-lon21-wmemstr.testsystem.ie,Node \ Location = Labenv,Node \ Family = Microsoft \ Windows \ NT \ Servers,Node \ Vendor = Microsoft,metric_name =磁盘\ Space \利用率metric_value = 0.69751 1546062000000000000 nps,Component \ Name = E \:\ Label \:DB \ Serial \ Number \ 51646c8b,Component \ Type = DISK,Node \ Name = f-lon21-wmemstr.testsystem.ie,Node \ Location = Labenv,Node \ Family = Microsoft \ Windows \ NT \ Servers,Node \ Vendor = Microsoft,metric_name =磁盘\ Space \ Used \-\ MB metric_value = 98320.77 1546062000000000000

截断的错误是:

2018-12-29T06:48:27Z E!插件[inputs.exec]中的错误:度量解析错误:偏移量为61的预期字段: “ nps,组件名称= E:标签:数据库序列号51646c8b,Component \ Type = DISK,Node \ Name = f-lon21-wmemstr.testsystem.ie,Node \ Location = Labenv,Node \ Family = Microsoft \ Windows \ NT \ Servers,Node \ Vendor = Microsoft,metric_name = Disk \ Space \ Free \-\ MB metric_value = 42639.22 1546062000000000000 \ nnps,Component \ Name = E \:\\ Label \:DB \ Serial \ Number \ 51646c8b,Component \ Type =磁盘,节点\名称= f-lon21-wmemstr.testsystem.ie,节点\位置= Labenv,节点\家庭= Microsoft \ Windows \ NT \服务器,节点\供应商= Microsoft,metric_name =磁盘\空间\总计\- \ MB metric_value = 140960 1546062000000000000 \ nnps,Component \ Name = E \:\\ Label \:DB \ Serial \ Number \ 51646c8b,Component \ Type = DISK,Node \ Name = f-lon21-wmemstr.testsystem.ie,Node \ Location = Labenv,Node \ Family = Microsoft \ Windows \ NT \ Servers,Node \ Vendor = Microsoft,metric_name = Disk \ Space \ Utilization metric_value = 0.69751 1546062000000000000 \ nnps,Component \ Name = E \:\\ Label \:DB \ Serial \ Number \ 51646c8b,Component \ Type = DISK,Node \ Name = f-lon21-wmemstr.testsystem.ie,Nod e \ Location = Labenv,N ...“

偏移量61看起来很纯真,没有特殊字符。此外,还不清楚是应该检查powerhsell输出还是在Telegraf日志中的行。

1 个答案:

答案 0 :(得分:0)

我将从删除键和值中的空格开始。流入线路协议使用空格表示度量标准名称/标记与实际统计值之间的分隔。

相关问题