I have a script that queries multiple UPS’s, so I can write data out use telegraf. If I just output a single UPS (i.e. single line), no issue at all - it all works. But, trying to have the Plugin accept multiple input lines (and send them one-by-one to influxdb) => then it fails, with an error message,
Error in plugin: metric parse error: expected field at 1:223
Is this a known issue? Can I really not send multiple input lines to this Plugin (in influx format)?
Yes it is possible to process multiple metrics at once. I guess you can’t just append the influx line protocol lines to each other, you have to output each line individually via stdout.
Have you looked at what the script actually outputs?
Can you show the script?
Hmmm - let me dig. This is the output from my script (multi-line), and it yells about it. You didn’t process the lines individually, rather as a combined output … right?
Hmmm - OK, this may be me, but … if I run telegraf --test => no issues at all. But, if I the restart the service, I get errors, like,
telegraf[1225479]: 2021-07-03T18:11:20Z E! [inputs.exec] Error in plugin: exec: fork/exec /mnt/ProgSSD/upsInflux/upsInflux.py: no such file or directory for command '/mnt/ProgSSD/upsInflux/upsInflux.py /mnt/ProgSSD/upsInflux/upsConfig.json'
It also works if I manually run the command. Thinking that perhaps this is related to paths … does the service run from a different path? I can also manually just run telegraf … all good. Very odd!