Getting "0" as output for every measurement of influxDB specified via telegraf . Not getting the correct value which is transmitted by telegraf agent to influxDB

Hi all , i have created a shell script which returns the count of number of routes present via BGP . i have added [[inputs.exec]] telegraf plugin into .conf file as required .
As you can see my scripts returns “22” . but now when i restart telegraf service and check the output of my measurement “mobile12_routecount” in influxDB , it is showing value “0” always . and obviously i am getting the same “0” on grafana dashbard also .
I don’t know what i am missing , please do let me know if anything needs to be done to get the correct value into influxdb from telegraf.

The most common issue with exec/execd plugins is permissions. A zero in this case, would mean you aren’t getting any lines from your grep. This makes me think that the user running Telegraf can’t run the birdc command.

Is the same user launch telegraf? Can that user run the birdc command? Can you run that command outside of telegraf as the user running telegraf and verify the output?

thanks @jpowers . The issue is resolved . earlier telegraf user was not able to execute the command . later i added user permission telegraf ALL=(ALL) NOPASSWD: ALL in sudoers file (visudo) and it worked