Re: [Nagios-users] Checking multiple TCP ports for a single status?

2011-06-02 Thread Matthew Jurgens
Something a little more powerful and generic that can be used in 
multiple scenarios


check_multi

See: http://exchange.nagios.org/directory/Plugins/Others/check_multi/details

On 30/05/2011 6:11 PM, quanta wrote:

Take a look at this:
http://www.theillien.com/Sys_Admin_v12/html/v14/i12/a6_l2.htm

On 12/30/2010 01:56 AM, Daniel Wittenberg wrote:

Write a simple script that does both checks and returns results?

Dan

-Original Message-
From: stan [mailto:st...@panix.com]
Sent: Wednesday, December 29, 2010 12:39 PM
To: nagios List
Subject: [Nagios-users] Checking multiple TCP ports for a single status?


I think I need to verify that both port 135, and 445 are avaialble on
some
Windows amchines. As I understand it, both of these need to be up. I'd
like
to make this a single check. Looks like check_tcp will only accept a
single
-p argument. Is this correct? If so, is there a way I can AND to
different
check_tcp runs, and report a single status back to Nagios?



--
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
___
Nagios-users mailing list
Nagios-users@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


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1375 / Virus Database: 1509/3668 - Release Date: 05/29/11




--
Smartmon System Monitoring 
www.smartmon.com.au 
--
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@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

Re: [Nagios-users] Non obvious 127 plugin error

2011-06-02 Thread Craig Stewart
All,

Just an update:

Appending "enable_environment_macros=0" to the end of the nagios.cfg
file as opposed to putting it just after all the file declarations
appears to have fixed it.  I didn't think it was that sensitive to
placement in the config file.

Thanks all!

Craig
--
Craig Stewart
Systems Integration Analyst
craig.stew...@corp.xplornet.com Tel: (506) 328-1245 Cell: (506) 425-0111
Xplornet - Broadband, Everywhere

On 06/02/2011 02:33 PM, Craig Stewart wrote:
> Justin,
> 
> I ran across that one as well and set the following in nagios.cfg:
> 
> enable_environment_macros=0
> 
> This didn't help.  I do have a fairly large config (about 8k hosts and
> 12k service checks) but I didn't think it was THAT big.

--
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@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


Re: [Nagios-users] Non obvious 127 plugin error

2011-06-02 Thread Craig Stewart
Justin,

I ran across that one as well and set the following in nagios.cfg:

enable_environment_macros=0

This didn't help.  I do have a fairly large config (about 8k hosts and
12k service checks) but I didn't think it was THAT big.

Actually the check_dig command isn't the only one that isn't working.
The "service-notify-by-email" command also barfs on the output of SOME
checks, not all.  This is simply a "printf blah blah blah" command
defined in Nagios, not a compiled plug in. The check_ping command works,
but I understand it's just a wrapper for the ping command itself.  A
number of custom bash and perl check commands work, but admittedly I
simply pass the $HOSTNAME$ to them as an argument.

I've rewritten the DNS-Check command so that everything except the
$HOSTNAME$ is "hard coded" but I don't think this will work.  I'm
admittedly grasping at straws now.  This is what the command line will
look like:

/usr/lib/nagios/plugins/check_dns -s $HOSTADDRESS$ -H www.xplornet.com
-a 142.166.86.46 -w 0.25 -c 5 -t 10

Craig

Craig Stewart
Systems Integration Analyst
craig.stew...@corp.xplornet.com
Xplornet - Broadband, Everywhere

On 06/02/2011 02:07 PM, Justin T Pryzby wrote:
> 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
> 

--
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@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


Re: [Nagios-users] Non obvious 127 plugin error

2011-06-02 Thread Justin T Pryzby
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.stew...@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  > > 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@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
> >  -l
> > > 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
> > . 864 IN A
> > > 142.166.86.46)|time=0.095553s;0.50;1.00;0.00
> > >
> > >
> > > You understand my confusion.
> > >
> > > Craig
> > >
> > > Craig Stewart
> > > Systems Integration Analyst
> > > craig.stew...@corp.xplornet.com
> >  Tel: (506) 328-1245
> >  Cell: (506) 425-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@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 se

Re: [Nagios-users] Non obvious 127 plugin error

2011-06-02 Thread Craig Stewart
Giorgio,

I appreciate all your guesses.

As far as the ulimits.conf file was, this system didn't have one!  I did
run the ulimits -a as the nagios user anf got this:

-bash-4.2$ ulimit -a
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
scheduling priority (-e) 0
file size   (blocks, -f) unlimited
pending signals (-i) 32100
max locked memory   (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files  (-n) 1024
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority  (-r) 0
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) 1024
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited
-bash-4.2$

Craig

Craig Stewart
Systems Integration Analyst
craig.stew...@corp.xplornet.com
Xplornet - Broadband, Everywhere

On 06/02/2011 11:30 AM, Giorgio Zarrelli wrote:
> We are making guesses, so check ulimits.conf
> 
> Ciao,
> 
> Giorgio
> 
> Il giorno 02/giu/2011, alle ore 15:58, Craig Stewart
>  ha scritto:
> 
>> Giorgio,
>>
>> It's bash.
>>
>> [root@nms tmp]# ls -l /bin/sh
>> lrwxrwxrwx. 1 root root 4 May 31 11:39 /bin/sh -> bash
>> [root@nms tmp]#
>>
>> I've been doing a bit of reading and it looks like the maximum arguments
>> is a kernel setting built at compile time.  I'm having a hard time
>> wrapping my head around how the check works when run directly and fails
>> when called by the Nagios process.
>>
>> I'm starting to wonder if I should point the /bin/sh to something like
>> csh or some such as a test.
>>
>> Craig
>> --
>> Craig Stewart
>> Systems Integration Analyst
>> craig.stew...@corp.xplornet.com Tel: (506) 328-1245 Cell: (506) 425-0111
>> Xplornet - Broadband, Everywhere
>>
>> On 06/02/2011 10:43 AM, Giorgio Zarrelli wrote:
>>> Check wether your shell is a Dash or a Bash. That means, check where the
>>> /bin/sh symlink is pointing to.
>>>
>>> Ciao,
>>>
>>> Giorgio
>>>
>>> Il giorno 02/giu/2011, alle ore 14:43, Craig Stewart
>>>  ha scritto:
>>>
 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.stew...@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  > 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@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
>-l
>> 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
>   . 864 IN A
>> 142.166.86.46)|time=0.095553s;0.50;1.00;0.00
>>
>>
>> You understand my confusion.
>>
>> Craig
>>
>> Craig Stewart
>> Systems Integration Analyst
>> craig.stew...@corp.xplornet.com
>   >>  >> Tel: (506) 328-1245
>Cell: (506) 425-0111
>   
>> Xplornet - Broadband, Everywhere
>>
>> On 06/01/2011 04:18 PM, Giorgio Zarrelli wrote:
>>

Re: [Nagios-users] Check_NRPE on AIX

2011-06-02 Thread Daniel Ceola
I've finally gotten a chance to look at this again.  Thank you to those that 
responded with helpful information.  However, I just realized that I am working 
on an AIX 5.1 system, and since the binaries I'm using are written for 5.3, 
there are compatibility issues which seem to be causing my problems.  I may 
need to look around for a different solution, to monitor my AIX system.

Thanks,

Daniel Ceola

From: Kyle O'Donnell [mailto:nag...@isprime.org]
Sent: Thursday, May 19, 2011 11:51 PM
To: Nagios Users List
Subject: Re: [Nagios-users] Check_NRPE on AIX


Those are the binaries that I compiled and uploaded a couple years ago.  We are 
still using them today, but if you have any issues let me know.

I would suggest running the check_disk with the -x /proc as it is in nrpe as 
the same user nrpe is running as via command line to ensure it behaves as 
expected

I have had no issue using sudo on aix btw.

--kyleo
On May 18, 2011 9:32 AM, "Daniel Ceola" 
mailto:dce...@twgi.net>> wrote:
--
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@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

Re: [Nagios-users] Non obvious 127 plugin error

2011-06-02 Thread Giorgio Zarrelli
We are making guesses, so check ulimits.conf

Ciao,

Giorgio

Il giorno 02/giu/2011, alle ore 15:58, Craig Stewart 
 ha scritto:

> Giorgio,
> 
> It's bash.
> 
> [root@nms tmp]# ls -l /bin/sh
> lrwxrwxrwx. 1 root root 4 May 31 11:39 /bin/sh -> bash
> [root@nms tmp]#
> 
> I've been doing a bit of reading and it looks like the maximum arguments
> is a kernel setting built at compile time.  I'm having a hard time
> wrapping my head around how the check works when run directly and fails
> when called by the Nagios process.
> 
> I'm starting to wonder if I should point the /bin/sh to something like
> csh or some such as a test.
> 
> Craig
> --
> Craig Stewart
> Systems Integration Analyst
> craig.stew...@corp.xplornet.com Tel: (506) 328-1245 Cell: (506) 425-0111
> Xplornet - Broadband, Everywhere
> 
> On 06/02/2011 10:43 AM, Giorgio Zarrelli wrote:
>> Check wether your shell is a Dash or a Bash. That means, check where the
>> /bin/sh symlink is pointing to.
>> 
>> Ciao,
>> 
>> Giorgio
>> 
>> Il giorno 02/giu/2011, alle ore 14:43, Craig Stewart
>>  ha scritto:
>> 
>>> 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.stew...@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 >>> > 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@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
-l
> 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
   . 864 IN A
> 142.166.86.46)|time=0.095553s;0.50;1.00;0.00
> 
> 
> You understand my confusion.
> 
> Craig
> 
> Craig Stewart
> Systems Integration Analyst
> craig.stew...@corp.xplornet.com
   > > Tel: (506) 328-1245
Cell: (506) 425-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@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 

Re: [Nagios-users] Non obvious 127 plugin error

2011-06-02 Thread Craig Stewart
Giorgio,

It's bash.

[root@nms tmp]# ls -l /bin/sh
lrwxrwxrwx. 1 root root 4 May 31 11:39 /bin/sh -> bash
[root@nms tmp]#

I've been doing a bit of reading and it looks like the maximum arguments
is a kernel setting built at compile time.  I'm having a hard time
wrapping my head around how the check works when run directly and fails
when called by the Nagios process.

I'm starting to wonder if I should point the /bin/sh to something like
csh or some such as a test.

Craig
--
Craig Stewart
Systems Integration Analyst
craig.stew...@corp.xplornet.com Tel: (506) 328-1245 Cell: (506) 425-0111
Xplornet - Broadband, Everywhere

On 06/02/2011 10:43 AM, Giorgio Zarrelli wrote:
> Check wether your shell is a Dash or a Bash. That means, check where the
> /bin/sh symlink is pointing to.
> 
> Ciao,
> 
> Giorgio
> 
> Il giorno 02/giu/2011, alle ore 14:43, Craig Stewart
>  ha scritto:
> 
>> 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.stew...@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 >> > 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@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
>>> -l
 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
>>>. 864 IN A
 142.166.86.46)|time=0.095553s;0.50;1.00;0.00


 You understand my confusion.

 Craig

 Craig Stewart
 Systems Integration Analyst
 craig.stew...@corp.xplornet.com
>>> > Tel: (506) 328-1245
>>> Cell: (506) 425-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@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
>>>_

Re: [Nagios-users] Non obvious 127 plugin error

2011-06-02 Thread Giorgio Zarrelli
Check wether your shell is a Dash or a Bash. That means, check where the 
/bin/sh symlink is pointing to.

Ciao,

Giorgio

Il giorno 02/giu/2011, alle ore 14:43, Craig Stewart 
 ha scritto:

> 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.stew...@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 > > 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@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
>> -l
>>> 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
>>. 864 IN A
>>> 142.166.86.46)|time=0.095553s;0.50;1.00;0.00
>>> 
>>> 
>>> You understand my confusion.
>>> 
>>> Craig
>>> 
>>> Craig Stewart
>>> Systems Integration Analyst
>>> craig.stew...@corp.xplornet.com
>> Tel: (506) 328-1245
>> Cell: (506) 425-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@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@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* , 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,
>

Re: [Nagios-users] Notifications configuration problem

2011-06-02 Thread Matthew Pounsett

On 2011-06-02, at 01:44, Michael Vaknine wrote:

> I am monitoring some servers on a different site and usuing ADSL line for 
> this.
> I have problems with the ADSL Each time I get a notification that a server is 
> down and then after 5seconds I get a notification that the server is up again.
> Is there a way to configure a notification that Nagios will think that it has 
> a problem only if it is persistent more than 5 minutes or so?

For this you use max_check_attempts.   This tells nagios how many times in a 
row the check must be in a non-OK state before it sends an alert.  Combining 
max_check_attempts with the two interval settings (check_interval, 
retry_interval) determines how much time passes while those checks are being 
done.





--
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@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


Re: [Nagios-users] Non obvious 127 plugin error

2011-06-02 Thread Craig Stewart
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.stew...@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  > 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@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
>  -l
> > 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
> . 864 IN A
> > 142.166.86.46)|time=0.095553s;0.50;1.00;0.00
> >
> >
> > You understand my confusion.
> >
> > Craig
> >
> > Craig Stewart
> > Systems Integration Analyst
> > craig.stew...@corp.xplornet.com
>  Tel: (506) 328-1245
>  Cell: (506) 425-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@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@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* , 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. 
htt