Input.exec not creating data in Influx

I have telegraf config built using [[inputs.exec]], telegraf --test displays data in influx inline format but not seeing the measurement getting created in InfluxDB. Other configs living on the same machine able to feed data to InfluxDB. Any suggestions on what is going wrong?

telegraf --test --config-directory /etc/telegraf/telegraf.d --input-filter exec
2021-01-04T16:53:40Z I! Starting Telegraf 1.16.3
2021-01-04T16:53:40Z I! Using config file: /etc/telegraf/telegraf.conf
> test_exec,apic=10.2.0.22,env=poc,fabricHealthTotal_attributes_dn=health,host=telegrafvm,os=linux,platform=linux fabricHealthTotal_attributes_cur=4i 1609779221000000000
> test_exec,apic=10.2.0.22,env=poc,fabricHealthTotal_attributes_dn=pod-1/health,host=telegrafvm,os=linux,platform=linux fabricHealthTotal_attributes_cur=4i 1609779221000000000

telegraf --config /etc/telegraf/telegraf.conf --config-directory /etc/telegraf/telegraf.d --debug
and
telegraf --config /etc/telegraf/telegraf.conf --config-directory /etc/telegraf/telegraf.d --input-filter exec --debug

running --debug option make metrics available in influx but telegraf on its own after reload/restart not picking up this config and feeding the metrics.

Any suggestions?

Finally found the issue, this reference helped me debug the issue. a couple of files used by shell script does not have permissions for telegraf user. But when I run test/debug will be of a different user. After updating proper permissions, metrics are now flowing into Influx.

It would have been easy to troubleshoot and fix if telegraf logged these errors upfront in the logs.