For the benefit of anyone stumbling across this archived in the future,
I found the answer myself. Apparently not all distros require this, but
on CentOS, you need to comment out the following line in /etc/sudoers:

Defaults requiretty

I used visudo to do so, and that was only change I needed to make. Now
everything works great!

-----Original Message-----
From: Steve Jenkins 
Sent: Wednesday, December 30, 2009 8:20 AM
To: [email protected]
Subject: Nagios Permissions: PERC3/Di and afacli script

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.

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

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

Reply via email to