The problem that I am having is modifying my telegraf.conf file to use the [[inputs.exec]] plugin, so that data can be sent from telegraf to influx.
Specifically, when I am in my CLI, I do a standard:
$ influx
Connected to http://localhost:8086 version 1.8.0
InfluxDB shell version: 1.8.0
use telegraf
Using database telegraf
show field keys from exec
What I want to display is the field keys from exec but nothing is being displayed, even though I have implemented the exec plugin along with the script I am executing. My guess is that I am implementing it in an incorrect manner? I have tried modifying my telegraf.conf in many ways, but with no luck.
I am thinking it may be something else within the inputs.exec plugin? Because when I start Telegraf, it shows that I am using the exec plugin, however none of the data is populating Influx. I have tried to research for hours about how to implement the inputs.exec plugin with correct syntax, but I haven’t found a solution yet.
Oh my bad, I thought you said you were successful in writing data. Absolutely, can you please share your config? As well as your json? Finally, thank you. for sharing the telegraf logs, but can you please include. the logs up until an error? Thank you.
My impression was by putting the python file (dnac_assurance) as my command for my inputs.exec plugin, that it would execute that script when I call “show field keys from exec”
I am able to execute the dnac_assurance script successfully within the python environment, however the data doesn’t populate in Influx
In order to get this working to reflect in InfluxDB, I had to modify the telegraf.conf and implement the [[inputs.exec]] plugin. Whether you are using a script in commands = [""], or manually setting your preferences, this should be fine.
Still in the same telegraf.conf, I also had to implement [[outputs.exec]] within the output plugins. I then restarted telegraf and influx on my CLI, and entered into influx to display all of the field keys.