Adding entry to bucket

Hello,

On rare occasions it seems a data point is not pulled into my bucket from Telegraf and I wanted to create an entry manually when it happens since it is a rare event. Since it is data that would provide the end of an elapsed time or state change it messes my graphs when missed. I’ve tried the following Flux query but just get “Found unexpected argument mode”.

import "csv"

csvData = "
_time,_value,_field,_measurement,appname,facility,host,hostname,severity
2022-04-29T06:29:00Z,syslog messages would be here,message,syslog,noteman,local6,localhost.localdomain,Server1,info"

csv.from(csv: csvData, mode: "raw")
|> map(fn: (r) => ({ r with _time: time(v: r._time) }))
|> to (bucket: "Mybucket")

I’m using raw mode which should bring everything in as a string but mapping the _time to convert it to actual time object.

Any assistance would be appreciated.

Hi @R0bR,
This works great in InfluxDB cloud. What version of InfluxDB OSS are you using?

Hello @Jay_Clifford,

Thanks for the response, I’m running 2.0.4 in CentOS.

Thanks,
Rob!

Can you try and update to the latest build 2.2 ?

Hello @Jay_Clifford ,

I just updated to the latest 2.2 build and now it works!

Thanks for the help.
Rob!

1 Like