Grafana Influx上传器导入标注CSV提示解析失败如何解决
InfluxDB标注CSV上传失败错误排查
错误原因
- 字段类型未明确标注field/tag属性
InfluxDB标注CSV要求,除时间列外的所有数据列必须在
#datatype行明确指定是field还是tag,不能仅写基础数据类型:
- 存储为指标值的字段需追加
Field后缀,比如longField、stringField- 存储为标签的字段需追加
Tag后缀,比如stringTag
你当前的#datatype行仅写了long,long,string,未标注属性,不符合格式要求。
- 时间戳单位未显式指定
你使用的是10位秒级Unix时间戳,
dateTime:number默认解析单位为纳秒,必须显式添加秒级单位标识s,写为dateTime:number:s才能被正确识别。
修正后CSV内容
#constant measurement,datatest #datatype dateTime:number:s,longField,longField,stringTag time,temp,raw,SN 1539250260,21,409,ABC3 1539250985,27,718,ABC1 1539251114,25,496,ABC2 1539251168,22,751,ABC3 1539251893,29,725,ABC1 1539252019,28,489,ABC2 1539252076,26,753,ABC3 1539252800,29,731,ABC1 1539252930,29,485,ABC2
内容的提问来源于stack exchange,提问作者Meric NESSANGE
相关产品推荐
相关产品推荐

