George,

The Nagios API specifies that Nagios can only accept output that does not exceed a certaint amount of bytes (cant recall the exact bytes).  If your script is returning large amounts then you could have problems. As Michuki has mentioned, try querying using the pre-defined vendor OIDs for best results.

I use a distribution of Nagios called Fully Automated Nagios (FAN) comes with a GUI front-end called centreon and has quite a good number checks built-in out of he box. You could give it a try.

Regards,

Lenya


On Tue, Feb 21, 2012 at 4:47 PM, TheMburu George <themburu@gmail.com> wrote:
Hi Michuki

The permisions are all fine on the perl script, however will try all the tweaks to see if it works.

./TheMburu

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.




--
Conservatism is the adherence to the old tried against the new untried.

_______________________________________________
Skunkworks mailing list
Skunkworks@lists.my.co.ke
------------
List info, subscribe/unsubscribe
http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks
------------

Skunkworks Rules
http://my.co.ke/phpbb/viewtopic.php?f=24&t=94
------------
Other services @ http://my.co.ke