On Wed, Dec 30, 2009 at 10:20 AM, Steve Jenkins <ste...@cheatcodes.com>wrote:

> I'm having a heck of a time getting an afacli monitoring script to work
> properly via nrpe in Nagios.
>
> The server is a 2960 running CentOS 5.4. Via nrpe, I am successfully
> able to run the check_afacli script from here:
>
> http://www.techno-obscura.com/~delgado/notes/sles9-NagiosAfacli.html<http://www.techno-obscura.com/%7Edelgado/notes/sles9-NagiosAfacli.html>
> .
>
> The problem is that check_afacli.pl script doesn't spit out enough info,
> and I'd rather use the check_raid.pl script from here:
>
> http://www.ibnads.com/afacli-nagios/
>
> When I run the check_raid.pl script on the monitored box (as root), it
> works fine and spits out a bunch of info I want to monitor. When I run
> it via nrpe, it just says "0 Containers Critical" which is know is
> incorrect.
>
> All the scripts state that in order to operate correctly, they have to
> be run as root. However, the check_afacli script runs just fine
> remotely, even without the nagios user in the sudoers file.
>
> I've added the nagios user to the sudoers file, but still can't get the
> check_raid.pl script to work. While tinkering around with a few other
> scripts, I can tell that afacli (when called via the script through
> nrpe) doesn't have sufficient permissions to open the container to query
> status. But what stumps me is why the check_afacli.pl script works fine,
> and the check_raid.pl script (which is the one I really want) doesn't!
>
> Anyone been down this road before care to offer some suggestions?
>
> Thanks,
>
> Steve
>


A couple of extra things to check that you may or may not have tried:

What happens if you try running the check_raid.pl script as the nagios user
when logged into the machine (ssh in, su -s /bin/bash nagios, whoami (to
confirm that you did switch to the nagios user) and then run the script)?

What does your line in your sudoers file look like?  Here is my line so that
nagios can run the check_megaraid_sas nagios script I have to check our PERC
5/i card:

nagios  ALL=(ALL)   NOPASSWD: /usr/lib/nagios/plugins/check_megaraid_sas

Did you make sure to edit the sudoers file using visudo and not normal vi,
emacs or something else?


My guess, without looking in detail at the scripts, is that the check_raid
script requires some extra permissions that the check_afacli script
doesn't.  Hopefully some of this might help.

Preston
_______________________________________________
Linux-PowerEdge mailing list
Linux-PowerEdge@dell.com
https://lists.us.dell.com/mailman/listinfo/linux-poweredge
Please read the FAQ at http://lists.us.dell.com/faq

Reply via email to