<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Nagios check_mailq: is not executable by uid 0</title>
	<atom:link href="http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/</link>
	<description>linux + ruby on rails = love</description>
	<lastBuildDate>Wed, 01 Sep 2010 07:55:52 +0300</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: wayne</title>
		<link>http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/comment-page-1/#comment-298</link>
		<dc:creator>wayne</dc:creator>
		<pubDate>Wed, 25 Aug 2010 13:45:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=20#comment-298</guid>
		<description>I found the problem. CentOS is using user nrpe and not nagios for nrpe daemon. After I add in nrpe in sudoer files everything works!
Thanks !!!!</description>
		<content:encoded><![CDATA[<p>I found the problem. CentOS is using user nrpe and not nagios for nrpe daemon. After I add in nrpe in sudoer files everything works!<br />
Thanks !!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wayne</title>
		<link>http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/comment-page-1/#comment-297</link>
		<dc:creator>wayne</dc:creator>
		<pubDate>Sun, 22 Aug 2010 11:59:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=20#comment-297</guid>
		<description>Thanks for prompt reply Vitalie, I have other nrpe check (load, user, disk, process) running without problem, only this qmail check give me the unable to read output.</description>
		<content:encoded><![CDATA[<p>Thanks for prompt reply Vitalie, I have other nrpe check (load, user, disk, process) running without problem, only this qmail check give me the unable to read output.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vitalie Cherpec</title>
		<link>http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/comment-page-1/#comment-296</link>
		<dc:creator>Vitalie Cherpec</dc:creator>
		<pubDate>Sun, 22 Aug 2010 08:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=20#comment-296</guid>
		<description>Check connection from nagios server to your server on nrpe port (5666):

[vitalie@nagios ~]$ telnet server 5666
Trying 1.1.1.1...
Connected to server (1.1.1.1).
Escape character is &#039;^]&#039;.


Examine iptables rules, /etc/xinetd.d/nrpe and /etc/hosts.*  files, you may have IP address restrictions there, check log files in /var/log/*.</description>
		<content:encoded><![CDATA[<p>Check connection from nagios server to your server on nrpe port (5666):</p>
<p>[vitalie@nagios ~]$ telnet server 5666<br />
Trying 1.1.1.1&#8230;<br />
Connected to server (1.1.1.1).<br />
Escape character is &#8216;^]&#8217;.</p>
<p>Examine iptables rules, /etc/xinetd.d/nrpe and /etc/hosts.*  files, you may have IP address restrictions there, check log files in /var/log/*.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wayne</title>
		<link>http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/comment-page-1/#comment-295</link>
		<dc:creator>wayne</dc:creator>
		<pubDate>Sun, 22 Aug 2010 06:30:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=20#comment-295</guid>
		<description>I got different error this time after adding in sudoer.
[root@nagios-server]# /usr/lib/nagios/plugins/check_nrpe -H 10.0.0.2 -c check_qmail_queue
NRPE: Unable to read output

I run the command in monitored server under nagios account with sudo and i have no issue.
sh-3.1$ /usr/bin/sudo /usr/lib/nagios/plugins/check_mailq -c 500 -w 250 -M qmail
OK: mailq (23) is below threshold (250/500)&#124;unsent=23;250;500;0

Any thoughts?</description>
		<content:encoded><![CDATA[<p>I got different error this time after adding in sudoer.<br />
[root@nagios-server]# /usr/lib/nagios/plugins/check_nrpe -H 10.0.0.2 -c check_qmail_queue<br />
NRPE: Unable to read output</p>
<p>I run the command in monitored server under nagios account with sudo and i have no issue.<br />
sh-3.1$ /usr/bin/sudo /usr/lib/nagios/plugins/check_mailq -c 500 -w 250 -M qmail<br />
OK: mailq (23) is below threshold (250/500)|unsent=23;250;500;0</p>
<p>Any thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vitalie Cherpec</title>
		<link>http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/comment-page-1/#comment-294</link>
		<dc:creator>Vitalie Cherpec</dc:creator>
		<pubDate>Sat, 21 Aug 2010 07:33:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=20#comment-294</guid>
		<description>You need to execute plugin under with sudo:

http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/#comment-173</description>
		<content:encoded><![CDATA[<p>You need to execute plugin under with sudo:</p>
<p><a href="http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/#comment-173" rel="nofollow">http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/#comment-173</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wayne</title>
		<link>http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/comment-page-1/#comment-293</link>
		<dc:creator>wayne</dc:creator>
		<pubDate>Fri, 20 Aug 2010 23:19:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=20#comment-293</guid>
		<description>I have problem with nrpe. It runs locally fine from command line with proper output. With nrpe, it gives me &quot;Couldn&#039;t match /var/qmail/bin/qmail-qstat output&quot; with UNKNOWN status. I don&#039;t know what was wrong.</description>
		<content:encoded><![CDATA[<p>I have problem with nrpe. It runs locally fine from command line with proper output. With nrpe, it gives me &#8220;Couldn&#8217;t match /var/qmail/bin/qmail-qstat output&#8221; with UNKNOWN status. I don&#8217;t know what was wrong.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wayne</title>
		<link>http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/comment-page-1/#comment-292</link>
		<dc:creator>wayne</dc:creator>
		<pubDate>Fri, 20 Aug 2010 22:47:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=20#comment-292</guid>
		<description>Thanks, it works for me. Just vi check_mailq and change green line according to the above instruction</description>
		<content:encoded><![CDATA[<p>Thanks, it works for me. Just vi check_mailq and change green line according to the above instruction</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/comment-page-1/#comment-220</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Fri, 14 Aug 2009 07:29:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=20#comment-220</guid>
		<description>Another example

In command.cfg (or whatever file you use for command definitions)
# &#039;check_mailq&#039; command definition 
# $USER1$ = /usr/local/nagios/libexec

define command{
        command_name    check_mailq
        command_line    /usr/local/bin/sudo $USER1$/check_mailq -w $ARG1$ -c $ARG2$ -M $ARG3$
}

In servers.cfg (or whatever file you use for service definitions)
define service{
        use                             local-service
        host_name                       
        service_description        MailQue
        check_command             check_mailq!200!300!qmail
}

In sudoers file
# User alias specification
User_Alias NAGIOS = nagios
# Cmnd alias specification
Cmnd_Alias NAGIOSCOMMANDS = /var/qmail/qmail-qstat, /usr/local/nagios/libexec/check_mailq
# Defaults specification
Defaults:NAGIOS !requiretty

# User privilege specification
root    ALL=(ALL) ALL
NAGIOS    ALL=(ALL) NOPASSWD: NAGIOSCOMMANDS</description>
		<content:encoded><![CDATA[<p>Another example</p>
<p>In command.cfg (or whatever file you use for command definitions)<br />
# &#8216;check_mailq&#8217; command definition<br />
# $USER1$ = /usr/local/nagios/libexec</p>
<p>define command{<br />
        command_name    check_mailq<br />
        command_line    /usr/local/bin/sudo $USER1$/check_mailq -w $ARG1$ -c $ARG2$ -M $ARG3$<br />
}</p>
<p>In servers.cfg (or whatever file you use for service definitions)<br />
define service{<br />
        use                             local-service<br />
        host_name<br />
        service_description        MailQue<br />
        check_command             check_mailq!200!300!qmail<br />
}</p>
<p>In sudoers file<br />
# User alias specification<br />
User_Alias NAGIOS = nagios<br />
# Cmnd alias specification<br />
Cmnd_Alias NAGIOSCOMMANDS = /var/qmail/qmail-qstat, /usr/local/nagios/libexec/check_mailq<br />
# Defaults specification<br />
Defaults:NAGIOS !requiretty</p>
<p># User privilege specification<br />
root    ALL=(ALL) ALL<br />
NAGIOS    ALL=(ALL) NOPASSWD: NAGIOSCOMMANDS</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vitalie Cherpec</title>
		<link>http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/comment-page-1/#comment-205</link>
		<dc:creator>Vitalie Cherpec</dc:creator>
		<pubDate>Fri, 17 Jul 2009 20:12:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=20#comment-205</guid>
		<description>The instructions  from article are for Qmail, check the /usr/lib/nagios/plugins/check_mailq file for Exim/Sendmail settings.</description>
		<content:encoded><![CDATA[<p>The instructions  from article are for Qmail, check the /usr/lib/nagios/plugins/check_mailq file for Exim/Sendmail settings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: astro</title>
		<link>http://www.cherpec.com/2008/08/nagios-check_mailq-is-not-executable-by-uid-0/comment-page-1/#comment-204</link>
		<dc:creator>astro</dc:creator>
		<pubDate>Fri, 17 Jul 2009 19:45:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.cherpec.com/?p=20#comment-204</guid>
		<description>Hi

Can you help me?, I am using exim and I am getting &quot;ERROR:  is not executable by (uid 0:gid(0 10 6 4 3 2 1 0))&quot;  I have did all these steps, but it do not works</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Can you help me?, I am using exim and I am getting &#8220;ERROR:  is not executable by (uid 0:gid(0 10 6 4 3 2 1 0))&#8221;  I have did all these steps, but it do not works</p>
]]></content:encoded>
	</item>
</channel>
</rss>
