[inputs.exec] Error in plugin: exec: exit status 1 for command for shell script

I am trying to execute a shell script to get output from database, but I am getting below error. Can someone please advise any solution?

2022-09-19T12:18:00Z E! [inputs.exec] Error in plugin: exec: exit status 1 for command ‘/data/1rd/grafana/scripts/getReconConsumerData.sh’: Traceback (most recent call last):…

Sounds like when trying to execute that script a Traceback is printed out.

Can you run that script on it’s own?
What does the full traceback show?
Are you sure Telegraf has permissions to run that script?