Non obvious 127 plugin error

Justin T Pryzby justinp at norchemlab.com
Thu Jun 2 19:07:42 CEST 2011


Ah, I think it may be due to a ngaios setting of
"enable_environment_macros":
nagios.sourceforge.net/docs/3_0/configmain.html

Nagios [can] export all sorts of data relating to the state of the
check, and that can be useful, but it seems as if your configuration
is too big or complicated or such to fit.  Do your other checks work?
What if you make their argument list as long as for check_dig?
I think it's possible that some checks are run with bigger inherited
environment than other checks, due to servicegroups and such.  The
execve() E2BIG error is due to a kernel limit on the size of "argument
list plus environment".  You could also write a check (or replace the
check_dig command) with something like "set
>/var/lib/nagios3/nagios-environment" or some other nagios-writable
path.  There shouldn't be more than (say) a kilobyte of environment.
It's also possible that you're sourceing something huge like
/etc/bash_completion, but that doesn't explain why it doesn't affect
your user accounts and other nagios checks.  Or you can rerun the
strace with "-v" to cause the environment to be displayed.

Justin

On Thu, Jun 02, 2011 at 09:43:42AM -0300, Craig Stewart wrote:
> All,
> 
> SELinux was enabled (DOH!) and has been now disabled.  Didn't fix my
> problem though.  Thanks for that Clint, I don't know HOW many times
> SELinux has bitten me.  Should know by now.
> 
> I ran the strace as suggested by Justin and saw THIS little tidbit flash by:
> 
> 11769 execve("/bin/sh", ["sh", "-c", "/usr/lib/nagios/plugins/check_dig
> -H 142.166.86.18 -l www.xplornet.com -a 142.166.86.46 -w 0.5 -c 1 -t
> 5"], [/* 189 vars */]) = -1 E2BIG (Argument list too long)
> 11751 --- {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11769,
> si_status=127, si_utime=0, si_stime=0} (Child exited) --
> 
> Argument list too long????  So, SOMETHING (I suspect the shell) doesn't
> like that many arguments passed.  Well, making progress.
> 
> By the way, this is a bone stock OS install (Fedora 15 currently) and I
> haven't tweaked anything.
> 
> Cheers all!
> 
> Craig
> --
> Craig Stewart
> Systems Integration Analyst
> Craig.Stewart at corp.xplornet.com
> Xplornet - Broadband, Everywhere
> 
> On 06/01/2011 05:36 PM, Clint Dilks wrote:
> > Hi
> > 
> > Just wondering if SE Linux is disabled on your system?  If not check
> > your audit log and see if access to the plugin is being denied
> > 
> > On Thu, Jun 2, 2011 at 8:15 AM, Justin T Pryzby <justinp at norchemlab.com
> > <mailto:justinp at norchemlab.com>> wrote:
> > 
> >     You can also strace the main nagios process:
> >     strace -fs999 -e execve -p PID_OF_NAGIOS
> >     or
> >     sudo strace -fs999 -e execve -p `ps o pid h -C nagios3 --sort
> >     start_time |sed q` 2>&1 |grep -Fw execve |grep -Fw check_dig
> > 
> >     127 is the return status of the shell when a command isn't found:
> >     justinp at justinp:~$ asdf; echo $?
> >     bash: asdf: command not found
> >     127
> > 
> >     man sh => /EXIT STATUS/
> > 
> >     Justin
> > 
> >     On Wed, Jun 01, 2011 at 04:23:05PM -0300, Craig Stewart wrote:
> >     > Giorgio
> >     >
> >     > As apache user:
> >     >
> >     > bash-4.2$ /usr/lib/nagios/plugins/check_dig -H 72.45.111.250
> >     <tel:72.45.111.250> -l
> >     > www.xplornet.com <http://www.xplornet.com> -a 142.166.86.46 -w 0.5
> >     -c 1 -t 5
> >     > DNS OK - 0.096 seconds response time (www.xplornet.com
> >     <http://www.xplornet.com>. 864 IN A
> >     > 142.166.86.46)|time=0.095553s;0.500000;1.000000;0.000000
> >     >
> >     >
> >     > You understand my confusion.
> >     >
> >     > Craig
> >     >
> >     > Craig Stewart
> >     > Systems Integration Analyst
> >     > Craig.Stewart at corp.xplornet.com
> >     <mailto:Craig.Stewart at corp.xplornet.com> Tel: (506) 328-1245
> >     <tel:%28506%29%20328-1245> Cell: (506) 425-0111
> >     <tel:%28506%29%20425-0111>
> >     > Xplornet - Broadband, Everywhere
> >     >
> >     > On 06/01/2011 04:18 PM, Giorgio Zarrelli wrote:
> >     > > Hi,
> >     > >
> >     > > I'm curious. Please, do a su - as the apache user and execute
> >     the check
> >     > > as that user.
> >     > >
> >     > > Ciao,
> >     > >
> >     > > Giorgio
> >     >
> >     >
> >     ------------------------------------------------------------------------------
> >     > Simplify data backup and recovery for your virtual environment
> >     with vRanger.
> >     > Installation's a snap, and flexible recovery options mean your
> >     data is safe,
> >     > secure and there when you need it. Data protection magic?
> >     > Nope - It's vRanger. Get your free trial download today.
> >     > http://p.sf.net/sfu/quest-sfdev2dev
> >     > _______________________________________________
> >     > Nagios-users mailing list
> >     > Nagios-users at lists.sourceforge.net
> >     <mailto:Nagios-users at lists.sourceforge.net>
> >     > https://lists.sourceforge.net/lists/listinfo/nagios-users
> >     > ::: Please include Nagios version, plugin version (-v) and OS when
> >     reporting any issue.
> >     > ::: Messages without supporting info will risk being sent to /dev/null
> >     >
> > 
> >     ------------------------------------------------------------------------------
> >     Simplify data backup and recovery for your virtual environment with
> >     vRanger.
> >     Installation's a snap, and flexible recovery options mean your data
> >     is safe,
> >     secure and there when you need it. Data protection magic?
> >     Nope - It's vRanger. Get your free trial download today.
> >     http://p.sf.net/sfu/quest-sfdev2dev
> >     _______________________________________________
> >     Nagios-users mailing list
> >     Nagios-users at lists.sourceforge.net
> >     <mailto:Nagios-users at lists.sourceforge.net>
> >     https://lists.sourceforge.net/lists/listinfo/nagios-users
> >     ::: Please include Nagios version, plugin version (-v) and OS when
> >     reporting any issue.
> >     ::: Messages without supporting info will risk being sent to /dev/null
> > 
> > 
> > 
> > -- 
> > This message has been scanned for viruses and
> > dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is
> > believed to be clean.
> 
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with vRanger. 
> Installation's a snap, and flexible recovery options mean your data is safe,
> secure and there when you need it. Data protection magic?
> Nope - It's vRanger. Get your free trial download today. 
> http://p.sf.net/sfu/quest-sfdev2dev
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
> 

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2 
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list