【发布时间】:2018-04-06 15:29:24
【问题描述】:
如何格式化数据以让 influxdb 知道 myscript 正在发送时间戳。
我有一个发送的脚本:
ping,host=10.22.0.253,hostname=JAYNET01AA,location=Lab,function=Router rtt=1.26 timestamp=1.5230279389238705e+18 ping,host=10.22.0.254,hostname=JAYNET01BB,location=Lab,function=Router rtt=2.0 时间戳=1.5230279389238705e+18 ping,host=10.254.22.105,hostname=JAYNET02BB,location=Lab,function=Router rtt=0.483 timestamp=1.5230279389238705e+18
我在最后添加了一个精度变量(influx 1.2 默认为纳秒)。但似乎 influxdb 不承认它。也许你知道我需要以什么格式将数据推送到 influxdb 以使 influxdb 明白这是时间戳数据。
P.S 我收到了这个回复 ": 错误的时间戳\n无法解析"
是否有将时间戳转换为 RFC 3339 格式的简单方法? 谢谢
【问题讨论】: