[Nagiosplug-help] Clarification- using check_nrpe and check_mailq

Subhendu Ghosh sghosh at sghosh.org
Thu Mar 27 14:10:08 CET 2003


On Thu, 27 Mar 2003, Mitchell K. Smith wrote:

> It was set to use the nagios group. I switched it to mail but still the same error.
> Here is my nrpe.cfg 
> #############################################################################
> server_port=5666
> allowed_hosts=127.0.0.1,172.31.11.1
> nrpe_user=nagios
> nrpe_group=mail
> debug=1
> command_timeout=60
> command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
> command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
> command[check_disk1]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p /dev/hda1
> command[check_disk2]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p /dev/hdb1
> command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
> command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200 
> command[check_mail_queue]=/usr/local/nagios/libexec/check_mailq -w 1 -c 2
> command[check_named]=/usr/local/nagios/libexec/check_procs --command=named
> 
<snip>

Can you add a "group = mail" to the file below for xinetd as well?


> > > xinetd.d]# cat nrpe 
> > > # default: on
> > >         # description: NRPE
> > > service nrpe
> > > {
> > >         flags = REUSE
> > >         log_on_failure += USERID
> > >         socket_type = stream
> > >         user = nagios
> > >         server = /usr/local/nagios/libexec/nrpe
> > >         server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
> > >         wait = no
> > >         only_from = 172.31.11.1 172.31.6.29
> > > }
> > > 
> > > The nagios user is already a member of mail:
> > > from /etc/group
> > > mail:x:12:mail,postfix,nagios
> > > 
> > > Still gets the same error.
> > > 
> > > Mitch
> > > 
> > > 
> > > -----Original Message-----
> > > From: Subhendu Ghosh [mailto:sghosh at sghosh.org]
> > > Sent: Thursday, March 27, 2003 2:59 PM
> > > To: Mitchell K. Smith
> > > Cc: nagiosplug-help at lists.sourceforge.net
> > > Subject: Re: [Nagiosplug-help] Clarification- using check_nrpe and
> > > check_mailq
> > > 
> > > 
> > > Looks like the directory perms for mqueue got changed between rh7.3 and 
> > > rh8
> > > 
> > > change the group perms on mqueue to rx (group == mail)
> > > add nrpe user to group mail
> > > 
> > > run ./check_mailq as nrpe user to verify.
> > > 
> > > Also the plugin needs better error checking - I'll post a bug report
> > > [710973] on that.
> > > 
> > > -sg
> > > 
> > > 
> > > On Thu, 27 Mar 2003, Mitchell K. Smith wrote:
> > > 
> > > > I should have been more clear on two points.
> > > > 
> > > > OS is RH Linux 7.3 on the Nagios server and 8.0 on the remote host.
> > > > 
> > > > By changing group permissions on the /var/spool/mqueue directory to r x, I am able to get check_mailq to run as the Nagios user. The problem occurrs when trying to use nrpe from the Nagios server.
> > > > 
> > > > # ./check_nrpe -H 172.31.11.10 -c check_mail_queue
> > > > uires special privileges, e.g., root or TrustedUser.
> > > > Use of uninitialized value in numeric eq (==) at /usr/local/nagios/libexec/check_mailq line 104.
> > > > Use of uninitialized value in concatenation (.) or string at /usr/local/nagios/libexec/check_mailq line 110.
> > > > Use of uninitialized value in concatenation (.) or string at /usr/local/nagios/libexec/check_mailq line 110.
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Mitchell K. Smith 
> > > > Sent: Thursday, March 27, 2003 12:33 PM
> > > > To: nagiosplug-help at lists.sourceforge.net
> > > > Subject: [Nagiosplug-help] using check_nrpe and check_mailq
> > > > 
> > > > 
> > > > Greetings.
> > > > 
> > > > I am attempting to check the mail queue on a remote server.
> > > > 
> > > > check_mailq (nagios-plugins 1.3.0) 1.1
> > > > NRPE Plugin for Nagios Version: 1.8
> > > > 
> > > > If I run check_mailq on the remote host as user nagios I get the following error:
> > > > $ ./check_mailq -w 1 -c 2
> > > > Program mode requires special privileges, e.g., root or TrustedUser.
> > > > Use of uninitialized value in numeric eq (==) at ./check_mailq line 104.
> > > > Use of uninitialized value in concatenation (.) or string at ./check_mailq line 110.
> > > > Use of uninitialized value in concatenation (.) or string at ./check_mailq line 110.
> > > >  | mailq = 
> > > > 
> > > > If I run as root, it works.
> > > > # ./check_mailq -w 1 -c 2
> > > > OK: mailq is empty | mailq = 0
> > > > 
> > > > I would rather not have to run the plugins as root on the remote host. Tried giving the mail group r,x permissions and making nagios a member of the mail group. That didn't help.
> > > > 
> > > > Can someone recommend the best way to deal with this?
> > > > Thanks for your help.
> > > > 
> > > > 
> > > > Mitchell K. Smith
> > > > 
> > > > 
> > > > -------------------------------------------------------
> > > > This SF.net email is sponsored by:
> > > > The Definitive IT and Networking Event. Be There!
> > > > NetWorld+Interop Las Vegas 2003 -- Register today!
> > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
> > > > _______________________________________________
> > > > Nagiosplug-help mailing list
> > > > Nagiosplug-help at lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> > > > ::: Please include plugins version (-v) and OS when reporting any issue. 
> > > > ::: Messages without supporting info will risk being sent to /dev/null
> > > > 
> > > > 
> > > > -------------------------------------------------------
> > > > This SF.net email is sponsored by:
> > > > The Definitive IT and Networking Event. Be There!
> > > > NetWorld+Interop Las Vegas 2003 -- Register today!
> > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
> > > > _______________________________________________
> > > > Nagiosplug-help mailing list
> > > > Nagiosplug-help at lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> > > > ::: Please include plugins version (-v) and OS when reporting any issue. 
> > > > ::: Messages without supporting info will risk being sent to /dev/null
> > > > 
> > > 
> > > 
> > 
> > 
> 
> 

-- 






More information about the Help mailing list