i dont know anything about using sudo on AIX. My team monitors 80 different AIX hosts with a mix of 5.3 and 6.1 versions. So just a few points to try<div><br></div><div> - Make sure the user you have set to run nrpe is the user ur testing with. The nrpe cfg has a spot for a username and group. We use user nagios with group system (yes create a nologin AIX account for the nagios user)</div>
<div> - Make sure the permissions are set correctly from the plugins to the nrpe.cfg</div><div> - Test the plugin locally. In your email you said you can run it, but which user? root? test runing the command from the user that is running nrpe.</div>
<div><br></div><div>I have a feeling its a file permission problem </div><div><br></div><div>Cheers!</div><div><br></div><div><br><div class="gmail_quote">On Wed, May 18, 2011 at 7:26 AM, Daniel Ceola <span dir="ltr"><<a href="mailto:DCeola@twgi.net">DCeola@twgi.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal">Hello all!</p><p class="MsoNormal"> </p><p class="MsoNormal">
I’ve recently been attempting to setup monitoring on my AIX 5.3 servers. After some research, I determined that the best way to accomplish this is through using NRPE. I downloaded the package here: <a href="https://www.monitoringexchange.org/inventory/Check-Plugins/Operating-Systems/AIX/AIX-5-3-NRPE-2-12-NSCA-2-7-2-Nagios-Plugins-1-4-11" target="_blank">https://www.monitoringexchange.org/inventory/Check-Plugins/Operating-Systems/AIX/AIX-5-3-NRPE-2-12-NSCA-2-7-2-Nagios-Plugins-1-4-11</a> and followed instructions here <a href="http://nagioswiki.com/wiki/index.php/Installing_Nagios_NRPE_on_AIX" target="_blank">http://nagioswiki.com/wiki/index.php/Installing_Nagios_NRPE_on_AIX</a> to install NRPE on the AIX system. I then found an item in the nagios-users archive that suggested that I needed to install sudo on the AIX system and change the NRPE config to use sudo for the commands. <a href="http://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg31668.html" target="_blank">http://www.mail-archive.com/nagios-users@lists.sourceforge.net/msg31668.html</a></p>
<p class="MsoNormal"> </p><p class="MsoNormal"> </p><p class="MsoNormal">I have my nagios server’s IP in the allowed_hosts list within nrpe.cfg</p><p class="MsoNormal">I also have this set (per instructions in below link) command_prefix=/usr/bin/sudo</p>
<p class="MsoNormal"> </p><p class="MsoNormal"> </p><p class="MsoNormal">At this point – when I run one of the check (check_disk) scripts locally (on the AIX system) that the NRPE package installed, I am able to get a result</p>
<p class="MsoNormal"> </p><p class="MsoNormal"># check_disk -w 85 -c 95</p><p class="MsoNormal">DISK CRITICAL - free space: / 307 MB (79% inode=98%); (only copied the first item, but there was a lot of output)</p><p class="MsoNormal">
</p><p class="MsoNormal">However, I cannot seem to get my check from my Nagios system to work properly.</p><p class="MsoNormal">nagios@UbuntuTest:/usr/local/nagios/libexec$ ./check_nrpe -H 192.168.3.15 -n -c check_aix_disks</p>
<p class="MsoNormal">NRPE: Unable to read output</p><p class="MsoNormal"> </p><p class="MsoNormal">The corresponding command in the nrpe.cfg on the AIX system: <br>command[check_aix_disks]=/usr/local/nagios/libexec/check_disk -w 10m -c 2m -x /proc</p>
<p class="MsoNormal"> </p><p class="MsoNormal"> </p><p class="MsoNormal"> </p><p class="MsoNormal">At this point, I’m unsure of what I need to do in order to get this working. If anyone could provide a possible direction, I would be most grateful!</p>
<p class="MsoNormal"> </p><p class="MsoNormal"> </p><p class="MsoNormal"> </p><p class="MsoNormal">Thanks,</p><p class="MsoNormal"> </p><p class="MsoNormal">Daniel Ceola</p><p class="MsoNormal">Systems & DB Admin</p>
<p class="MsoNormal">
</p><p class="MsoNormal">The Wills Group</p><p class="MsoNormal">6355 Crain Hwy</p><p class="MsoNormal">La Plata, MD 20646</p><p class="MsoNormal"><a href="tel:301-932-3600" value="+13019323600" target="_blank">301-932-3600</a></p>
<p class="MsoNormal"><a href="tel:301-932-3643" value="+13019323643" target="_blank">301-932-3643</a> (direct line)</p><p class="MsoNormal"> </p></div></div><br>------------------------------------------------------------------------------<br>
What Every C/C++ and Fortran developer Should Know!<br>
Read this article and learn how Intel has extended the reach of its<br>
next-generation tools to help Windows* and Linux* C/C++ and Fortran<br>
developers boost performance applications - including clusters.<br>
<a href="http://p.sf.net/sfu/intel-dev2devmay" target="_blank">http://p.sf.net/sfu/intel-dev2devmay</a><br>_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br><br clear="all"><br>-- <br>Christianity: The belief that some cosmic Jewish Zombie can make you live forever if you symbolically eat his flesh and telepathically tell him that you accept him as your master, so he can remove an evil force from your soul that is present in humanity because a rib-woman was convinced by a talking snake to eat from a magical tree. Makes perfect sense!<br>
</div>