<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Nagios NRPE + sudo + hpacucli not working in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169466#M50608</link>
    <description>You could try this:&lt;BR /&gt;&lt;BR /&gt;- Set SUID to hpacucli&lt;BR /&gt;chmod u+s /usr/sbin/hpacucli&lt;BR /&gt;&lt;BR /&gt;- set root:root as owner&lt;BR /&gt;chown root:root /usr/sbin/hpacucli&lt;BR /&gt;&lt;BR /&gt;- Remove others read and execution permissions&lt;BR /&gt;chmod o-rw /usr/sbin/hpacucli&lt;BR /&gt;&lt;BR /&gt;- Add nagios to root group&lt;BR /&gt;gpasswd -a nagios root&lt;BR /&gt;&lt;BR /&gt;- Try again&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 17 Apr 2009 13:10:23 GMT</pubDate>
    <dc:creator>Ivan Ferreira</dc:creator>
    <dc:date>2009-04-17T13:10:23Z</dc:date>
    <item>
      <title>Nagios NRPE + sudo + hpacucli not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169458#M50600</link>
      <description>I´m downloaded the nagios pluginet check_hparray that can get hp raid status from hpacucli:&lt;BR /&gt;&lt;A href="http://www.nagiosexchange.org/cgi-bin/p" target="_blank"&gt;http://www.nagiosexchange.org/cgi-bin/p&lt;/A&gt; ... 8.html;d=1&lt;BR /&gt;&lt;BR /&gt;Also configured /etc/sudoers:&lt;BR /&gt;nagios ALL = NOPASSWD: /usr/sbin/hpacucli&lt;BR /&gt;&lt;BR /&gt;If I "su" to user nagios and run the command check_hparray it is working fine.&lt;BR /&gt;However, when I try the same thing from nrpe daemon I notice that hpacucli is returning an error status (not 0) but without any error messages/output.&lt;BR /&gt;&lt;BR /&gt;Note: OS is Red Hat Enterprise Linux 5.2.&lt;BR /&gt;I am calling multipath command in the same way using nrpe + sudo and this is working. &lt;BR /&gt;SELinux is NOT activated.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;Thanks...</description>
      <pubDate>Tue, 14 Apr 2009 09:01:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169458#M50600</guid>
      <dc:creator>GoranTornqvist</dc:creator>
      <dc:date>2009-04-14T09:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Nagios NRPE + sudo + hpacucli not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169459#M50601</link>
      <description>Edit the check_hparray script and add an echo statement in the -s) section:&lt;BR /&gt;&lt;BR /&gt;-s)&lt;BR /&gt;check=`sudo -u root $HPACUCLI controller slot=$2 ld all show`&lt;BR /&gt;# Add this line&lt;BR /&gt;echo $check &amp;gt; /tmp/check_array.out 2&amp;gt;&amp;amp;1&lt;BR /&gt;check_raid&lt;BR /&gt;;;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Consult the /tmp/check_array.out file</description>
      <pubDate>Tue, 14 Apr 2009 19:46:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169459#M50601</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2009-04-14T19:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Nagios NRPE + sudo + hpacucli not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169460#M50602</link>
      <description>I only get "check_hparray Error" output from the script and /tmp/check_array.out is empty.</description>
      <pubDate>Wed, 15 Apr 2009 04:32:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169460#M50602</guid>
      <dc:creator>GoranTornqvist</dc:creator>
      <dc:date>2009-04-15T04:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Nagios NRPE + sudo + hpacucli not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169461#M50603</link>
      <description>*bump*&lt;BR /&gt;&lt;BR /&gt;no suggestions...? Thanks ...</description>
      <pubDate>Thu, 16 Apr 2009 07:52:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169461#M50603</guid>
      <dc:creator>GoranTornqvist</dc:creator>
      <dc:date>2009-04-16T07:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Nagios NRPE + sudo + hpacucli not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169462#M50604</link>
      <description>You get:&lt;BR /&gt;&lt;BR /&gt;echo "$PROGNAME Error. $checkm"&lt;BR /&gt;&lt;BR /&gt;Because the $check variable is empty. There is something wrong because the tmp file has no output, that means that sudo and hpacucli is not being executed.&lt;BR /&gt;&lt;BR /&gt;What do you get if you run:&lt;BR /&gt;&lt;BR /&gt;sudo -u root /usr/sbin/hpacucli controller slot=$2 ld all show&lt;BR /&gt;&lt;BR /&gt;From the command line? Replace $2 for the correct value as in your nrpe.cfg&lt;BR /&gt;&lt;BR /&gt;Post your nrpe.cfg configuration file also for this section.</description>
      <pubDate>Thu, 16 Apr 2009 11:47:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169462#M50604</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2009-04-16T11:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Nagios NRPE + sudo + hpacucli not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169463#M50605</link>
      <description>Thanks for your reply...&lt;BR /&gt;&lt;BR /&gt;If I "su" to user nagios it works:&lt;BR /&gt;&lt;BR /&gt;-sh-3.2$ sudo -u root /usr/sbin/hpacucli controller slot=0 ld all show&lt;BR /&gt;&lt;BR /&gt;Smart Array E200i in Slot 0&lt;BR /&gt;&lt;BR /&gt;   array A&lt;BR /&gt;&lt;BR /&gt;      logicaldrive 1 (136.7 GB, RAID 1+0, OK)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;nrpe.cfg:&lt;BR /&gt;command[check_hparray]=/usr/lib/nagios/plugins/check_hparray -s $ARG1$&lt;BR /&gt;&lt;BR /&gt;To me it appears like a problem calling sudo thru nrpe...IÂ´m lost...</description>
      <pubDate>Fri, 17 Apr 2009 05:11:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169463#M50605</guid>
      <dc:creator>GoranTornqvist</dc:creator>
      <dc:date>2009-04-17T05:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Nagios NRPE + sudo + hpacucli not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169464#M50606</link>
      <description>What if you hard code the slot number in the npre.cfg file instead of having $ARG1$?</description>
      <pubDate>Fri, 17 Apr 2009 12:06:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169464#M50606</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2009-04-17T12:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Nagios NRPE + sudo + hpacucli not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169465#M50607</link>
      <description>Same problem when hard coding parameter IÂ´m afraid ...</description>
      <pubDate>Fri, 17 Apr 2009 12:10:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169465#M50607</guid>
      <dc:creator>GoranTornqvist</dc:creator>
      <dc:date>2009-04-17T12:10:05Z</dc:date>
    </item>
    <item>
      <title>Re: Nagios NRPE + sudo + hpacucli not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169466#M50608</link>
      <description>You could try this:&lt;BR /&gt;&lt;BR /&gt;- Set SUID to hpacucli&lt;BR /&gt;chmod u+s /usr/sbin/hpacucli&lt;BR /&gt;&lt;BR /&gt;- set root:root as owner&lt;BR /&gt;chown root:root /usr/sbin/hpacucli&lt;BR /&gt;&lt;BR /&gt;- Remove others read and execution permissions&lt;BR /&gt;chmod o-rw /usr/sbin/hpacucli&lt;BR /&gt;&lt;BR /&gt;- Add nagios to root group&lt;BR /&gt;gpasswd -a nagios root&lt;BR /&gt;&lt;BR /&gt;- Try again&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Apr 2009 13:10:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169466#M50608</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2009-04-17T13:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Nagios NRPE + sudo + hpacucli not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169467#M50609</link>
      <description>Solved it, if I added the whole command line in /etc/sudoers it worked:&lt;BR /&gt;nagios  ALL = NOPASSWD: /usr/sbin/hpacucli controller slot=0 ld all show&lt;BR /&gt;&lt;BR /&gt;This didnÂ´t work:&lt;BR /&gt;nagios  ALL = NOPASSWD: /usr/sbin/hpacucli&lt;BR /&gt;(according to the plugin docs it should be enough but wasnÂ´t for some reason)</description>
      <pubDate>Fri, 24 Apr 2009 14:25:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169467#M50609</guid>
      <dc:creator>GoranTornqvist</dc:creator>
      <dc:date>2009-04-24T14:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Nagios NRPE + sudo + hpacucli not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169468#M50610</link>
      <description>/etc/sudoers:&lt;BR /&gt;&lt;BR /&gt;nagios  ALL = NOPASSWD: /usr/sbin/hpacucli controller slot=0 ld all show&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Apr 2009 14:26:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169468#M50610</guid>
      <dc:creator>GoranTornqvist</dc:creator>
      <dc:date>2009-04-24T14:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: Nagios NRPE + sudo + hpacucli not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169469#M50611</link>
      <description>I know this is closed but to add my experience;&lt;BR /&gt;&lt;BR /&gt;My sudoers file has the following,&lt;BR /&gt;nagios ALL=NOPASSWD:/usr/sbin/hpacucli&lt;BR /&gt;&lt;BR /&gt;This has worked for several months without issue.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Instead of the check_array plugin I am using a script, but HP says it doesn't matter.&lt;BR /&gt;&lt;BR /&gt;What has been an issue is that the array check via hpacucli is not supported and has caused some of our systems to crash and not reboot. Feedback from HP says that even though there is this hpacucli check option it is not intended to query the array for prolonged periods. HP says that doing the hpacucli forces the array to init and flush the buffers. Most of the time this is not a concern as it will ride out. But watch out for when it does come back and bite you.&lt;BR /&gt;&lt;BR /&gt;If a system does crash check the messages file. The last entry is a nagios sudo to run the hpacucli.&lt;BR /&gt;</description>
      <pubDate>Mon, 04 May 2009 16:07:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169469#M50611</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2009-05-04T16:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Nagios NRPE + sudo + hpacucli not working</title>
      <link>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169470#M50612</link>
      <description>thanks for the tip ...&lt;BR /&gt;&lt;BR /&gt;should add that the real solution for this was to uncomment "Defaults requiretty" in /etc/sudoers.</description>
      <pubDate>Tue, 05 May 2009 04:43:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/nagios-nrpe-sudo-hpacucli-not-working/m-p/5169470#M50612</guid>
      <dc:creator>GoranTornqvist</dc:creator>
      <dc:date>2009-05-05T04:43:04Z</dc:date>
    </item>
  </channel>
</rss>

