I have a custom python plugin that I am using to pull data into Telegraf. It print out line protocol output, as expected.
In my Ubuntu 18.04 environment, when this plugin is run I see a single line in my logs:
2020-12-28T21:55:00Z E! [inputs.exec] Error in plugin: exec: exit status 1 for command '/my_company/plugins-enabled/plugin-mysystem/poll_mysystem.py': Traceback (most recent call last):...
That is it. I can’t figure out how to get the actual traceback.
If I run
sudo -u telegraf /usr/bin/telegraf -config /etc/telegraf/telegraf.conf, the plugin works as expected. It polls and loads data exactly as it should.
I’m not sure how to move forward with troubleshooting this error when telegraf is executing the plugin on it’s own.
I have restarted the telegraf service. I have verified permissions (and I think that the execution above shows that it should work).
What do I do next?