The permisions are all fine on the perl script, however will try all the tweaks to see if it works.
On Tue, Feb 21, 2012 at 12:07 PM, Michuki Mwangi
<michuki@swiftkenya.com> wrote:
On 2/21/12 11:23 AM, TheMburu George wrote:
> Hi Michuki
>
> For now the major thing for now is neighbor states.
> Got two scripts one in perl the other basic shell, from command line the
> perl script has correct output but when I set it on Nagios the response
> isnt showing as for the shell script is just not working at all.
>
Check the logs - or post them here.
If you can run the perl one, it looks like a permission issue when its
run by Nagios.Try the following; Check the user that Nagios is running
as (it varies from OS). Then attempt to run the script as the Nagios
user and see if you get the same result.
For the shell thats not running at all - try running it in debug mode
(from the your shell) $export_DEBUG=on
Then run the script using the -x to see the commands as they are
executed. If there's something failing you will pick it up from here.
bash -x ./scripname.sh
HTH,
Michuki.