I had been using exec the entire month to read not numeric values and send them to influxdb with no problem at all. Im almost 100% certain the metric above is OK for the Influx Line Protocol. Im getting the following error when i run telegraf.
2017-12-28T15:52:31Z E! Error in plugin [inputs.exec]: invalid number invalid number invalid number invalid number invalid number invalid number invalid number
I’m stuck here, tried almost everything to solve it with no success.
Thanks in advance.
PD: I do have another Exec running reading string metrics and working like a charm with the same protocol. Thats why i really dont know whats going on. @daniel i tag you here since you have helped me before with this development. Thank you!
I can successfully parse the example line. Flipping through the parser code this ugly error can occur in a number of cases, and unfortunately it doesn’t show what the input buffer contains so it is difficult to be sure exactly what is the cause.
Could you try editing your config like this so that the output is also written to a file, run until the error occurs and then upload the file here?
[[inputs.exec]]
# before
#commands = ["sh exec.sh]
# after
commands = ["sh exec.sh | tee /tmp/telegraf.out"]
I do switched the file type to .txt since i could not upload it as .out
The protocol seems to be alright, maybe there is a problem with the length of some metrics?
EDIT: Just to remember, the error is the following:
E! Error in plugin [inputs.exec]: invalid number invalid number invalid number invalid number invalid number invalid number invalid number
At any timestamp each measurement+tagset can only have one value for each field in InfluxDB. This is a feature though, as it allows you to change values and makes writing idempotent so you don’t need to worry about duplicate insertions. There are a couple changes commonly made to store all the data in cases like these, depending on what is being stored and the storage needs:
Add a new tag to each line that differentiates it from other points occurring at the same time