Problem completing drive check


I have a custom plug that checks for the age of files in a directory.

Running the plug in manually from a prompt results in the correct response back to the console. I ran the plug in set -x mode to see if there were any errors.

There were none.

However running from Nagios results in the following error:
Remote command execution failed: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

any ideas?