Missing tag values

I created a small conf file that runs a bash script.
Inside the script I run a basic command as follows:
netstat -tulnp.

I have placed the bash file inside /etc/telegraf/scripts folder.

When I run the test command Incan see the correct output as follows:

openport,pid=123,program=java TEXT=8081

however I am not seeing values for taga pid and program in the Influx DB.

Influx - 2.2
Telegraf - 1.23.1
OS - Ubuntu 20.04

Would appreciate sone insight as to what and how I can check to debug why the pid and program tags are not showing in the influxdb.

Thanks !!

Hi @utsukprani

It would help to see the snippet of Telegraf conf code you are using to do this. You can set debug = true in the [agent] section which might show more details during runtime.

hi @phill thanks for your reply.
i updated telegraf.conf to have debug = true.

however can you specify where can i see logs ?
i am on Ubuntu 20.04.4 LTS version.

my conf file which is in telegraf.d looks like as follows:

[[inputs.exec]]
commands = [“/etc/telegraf/scripts/getOpenPorts.sh”]
timeout = “60s”
data_format = “influx”

@utsukprani
I run in a docker container and this is a sample of what I see on the terminal (stdout)

2022-07-02T00:07:05Z I! Using config file: /etc/telegraf/telegraf.conf
2022-07-02T00:07:05Z I! Starting Telegraf 1.23.0
2022-07-02T00:07:05Z I! Loaded inputs: http
2022-07-02T00:07:05Z I! Loaded aggregators: 
2022-07-02T00:07:05Z I! Loaded processors: 
2022-07-02T00:07:05Z I! Loaded outputs: file
2022-07-02T00:07:05Z I! Tags enabled: host=ad61a2f4ac4c
2022-07-02T00:07:05Z I! [agent] Config: Interval:10m0s, Quiet:false, Hostname:"ad61a2f4ac4c", Flush Interval:2m0s
2022-07-02T00:07:05Z D! [agent] Initializing plugins
2022-07-02T00:07:05Z D! [agent] Connecting outputs
2022-07-02T00:07:05Z D! [agent] Attempting connection to [outputs.file]
2022-07-02T00:07:05Z D! [agent] Successfully connected to outputs.file
2022-07-02T00:07:05Z D! [agent] Starting service inputs

My output plug-in is enabled as follows:

[[outputs.file]]
  files = ["stdout"]