Nagios-users checkcommands.cfg problem from Neil Lehouillier...

Desmyter Yves yves.desmyter at mil.be
Fri Oct 17 07:52:53 CEST 2003


Hi Neil,

I use the disk check like this :
; +---------------------------------------------------------------+
; | check : c:-partition on ALL corporate servers                 |
; +---------------------------------------------------------------+
define service{
	use				generic-service		; Name
of service template to use

	hostgroup_name
production_servers,test_servers,development_servers
	service_description		C:-partition
	is_volatile			0
	check_period			24x7
	max_check_attempts		3
	normal_check_interval		3
	retry_check_interval		1
	contact_groups			nt-admins
	notification_interval		5
	notification_period		24x7
	notification_options		w,u,c,r
	check_command			check_nt_disk!c!80!90

SO : try putting the drive letter in front of the threshold numbers .

Hope this helps you out .

Yves Desmyter .



-----Original Message-----
From: nagios-users-request at lists.sourceforge.net
[mailto:nagios-users-request at lists.sourceforge.net] 
Sent: vrijdag 17 oktober 2003 5:14
To: nagios-users at lists.sourceforge.net
Subject: Nagios-users digest, Vol 1 #1707 - 7 msgs


Send Nagios-users mailing list submissions to
	nagios-users at lists.sourceforge.net

To subscribe or unsubscribe via the World Wide Web, visit
	https://lists.sourceforge.net/lists/listinfo/nagios-users
or, via email, send a message with subject or body 'help' to
	nagios-users-request at lists.sourceforge.net

You can reach the person managing the list at
	nagios-users-admin at lists.sourceforge.net

When replying, please edit your Subject line so it is more specific than
"Re: Contents of Nagios-users digest..."


Today's Topics:

   1. checkcommands.cfg problem (Neil Lehouillier)
   2. check_mailq for postfix (Yanek Korff)
   3. Re: check_mailq for postfix (Subhendu Ghosh)
   4. Redundancy...bad? (jeff vier)
   5. RE: check_mailq for postfix (Yanek Korff)
   6. Problem with Passive Check (Thornton Prime)
   7. RE: Problem with Passive Check (Marc Powell)

--__--__--

Message: 1
Date: Thu, 16 Oct 2003 13:13:25 -0600
From: "Neil Lehouillier" <nlehouillier at seitelsolutions.ca>
To: <nagios-users at lists.sourceforge.net>
Subject: [Nagios-users] checkcommands.cfg problem

Hi all,

I'm trying to get nagios 1.1 to monitor a Windows 2000 machine's disk =
usage.  The windows 2000 box has the NSClient installed and it works =
fine from the command line of the nagios box.  But when I run it through
= nagios itself this is what I get:

[1066255080] SERVICE ALERT: Scrooge;C drive disk =
check;UNKNOWN;HARD;1;check_nt: Unknown argument: (null) [1066255080]
SERVICE NOTIFICATION: UnixAdmins;Scrooge;C drive disk =
check;UNKNOWN;notify-by-email;check_nt: Unknown argument: (null)

Here is the settings within the services.cfg file:

define service {
host_name                      Scrooge
service_description            C drive disk check
check_command                  check_nt_disk!80!95!c
register                       1
max_check_attempts             1
normal_check_interval          3
retry_check_interval           1
check_period                   24x7
notification_interval          0
notification_period            24x7
notification_options           w,u,c,r
contact_groups                 Unix-admins

And here is the checkcommands.cfg settings:

define command {
command_name                   check_nt_disk
command_line                   $USER1$/check_nt -H $HOSTADDRESS$ -p 1248
=
-v USEDDISKSPACE -s password123 -l $ARG3$ -w $ARG1$ -c $ARG2$
}

Has anyone experienced this problem before?  I did some searches within
= the mailing list and have been unable to find anything.

Any help is greatly appreciated......

Thanks.....

Neil



--__--__--

Message: 2
Date: Thu, 16 Oct 2003 17:04:41 -0400
From: "Yanek Korff" <ykorff at cigital.com>
To: <nagios-users at lists.sourceforge.net>
Subject: [Nagios-users] check_mailq for postfix


I don't know if anyone's done this before, but here's a hackjob diff of
check_mailq that works for the version of postfix I'm running.  May it
fare so well in your environment.

--- /home/users/ykorff/check_mailq      Thu Oct 16 17:00:31 2003
+++ check_mailq Thu Oct 16 16:57:13 2003
@@ -66,15 +66,17 @@
 }

 # only first line is relevant in this iteration.
+$verbose =3D 1;
 while (<MAILQ>) {
-       if (/mqueue/) {
+       if (/empty/ ) {
+               $msg =3D "OK: mailq is empty";
+               $msg_q =3D 0;
+               $state =3D $ERRORS{'OK'};
+        }
+       elsif (/Requests/) {
                print "$utils::PATH_TO_MAILQ =3D $_ "if $verbose ;
-               if (/empty/ ) {
-                       $msg =3D "OK: mailq is empty";
-                       $msg_q =3D 0;
-                       $state =3D $ERRORS{'OK'};
-               }elsif ( /(\d+)/ ) {
-                       $msg_q =3D $1 ;
+               if ( /(\d+) Kbytes in (\d+)/ ) {
+                       $msg_q =3D $2 ;

                        print "msg_q =3D $msg_q warn=3D$opt_w =
crit=3D$opt_c\n" if $verbose;


------------------------------------------------------------------------
-=
---
This electronic message transmission contains information that may be
confidential or privileged.  The information contained herein is =
intended solely for the recipient and use by any other party is not
authorized.  = If you are not the intended recipient (or otherwise
authorized to receive = this message by the intended recipient), any
disclosure, copying, = distribution or use of the contents of the
information is prohibited.  If you have = received this electronic
message transmission in error, please contact the sender = by reply
email and delete all copies of this message.  Cigital, Inc. = accepts no
responsibility for any loss or damage resulting directly or indirectly =
from the use of this email or its contents. Thank You.
------------------------------------------------------------------------
-=
---


--__--__--

Message: 3
Date: Thu, 16 Oct 2003 18:20:11 -0400 (EDT)
From: Subhendu Ghosh <sghosh at sghosh.org>
To: Yanek Korff <ykorff at cigital.com>
cc: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] check_mailq for postfix

Of course it might be useful to know your postfix version and the plugin

version for this diff :(

check_mailq v 1.4 supports sendmail/qmail/postfix ....

-sg

On Thu, 16 Oct 2003, Yanek Korff wrote:

> 
> I don't know if anyone's done this before, but here's a hackjob diff 
> of check_mailq that works for the version of postfix I'm running.  May

> it fare so well in your environment.
> 
> --- /home/users/ykorff/check_mailq      Thu Oct 16 17:00:31 2003
> +++ check_mailq Thu Oct 16 16:57:13 2003
> @@ -66,15 +66,17 @@
>  }
> 
>  # only first line is relevant in this iteration.
> +$verbose = 1;
>  while (<MAILQ>) {
> -       if (/mqueue/) {
> +       if (/empty/ ) {
> +               $msg = "OK: mailq is empty";
> +               $msg_q = 0;
> +               $state = $ERRORS{'OK'};
> +        }
> +       elsif (/Requests/) {
>                 print "$utils::PATH_TO_MAILQ = $_ "if $verbose ;
> -               if (/empty/ ) {
> -                       $msg = "OK: mailq is empty";
> -                       $msg_q = 0;
> -                       $state = $ERRORS{'OK'};
> -               }elsif ( /(\d+)/ ) {
> -                       $msg_q = $1 ;
> +               if ( /(\d+) Kbytes in (\d+)/ ) {
> +                       $msg_q = $2 ;
> 
>                         print "msg_q = $msg_q warn=$opt_w 
> crit=$opt_c\n" if $verbose;
> 
> 
> ----------------------------------------------------------------------
> ------
> This electronic message transmission contains information that may be
> confidential or privileged.  The information contained herein is
intended
> solely for the recipient and use by any other party is not authorized.
If
> you are not the intended recipient (or otherwise authorized to receive
this
> message by the intended recipient), any disclosure, copying,
distribution or
> use of the contents of the information is prohibited.  If you have
received
> this electronic message transmission in error, please contact the
sender by
> reply email and delete all copies of this message.  Cigital, Inc.
accepts no
> responsibility for any loss or damage resulting directly or indirectly
from
> the use of this email or its contents.
> Thank You.
>
------------------------------------------------------------------------
----
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program. 
> SourceForge.net hosts over 70,000 Open Source Projects. See the people

> who have HELPED US provide better services: Click here: 
> http://sourceforge.net/supporters.php
> _______________________________________________
> 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
> 

-- 




--__--__--

Message: 4
From: jeff vier <jeff.vier at tradingtechnologies.com>
To: nagios-users <nagios-users at lists.sourceforge.net>
Organization: TT
Date: Thu, 16 Oct 2003 17:58:22 -0500
Subject: [Nagios-users] Redundancy...bad?

What if, instead of "clustering" the recommended way as described in the
docs utilizing passive checks aimed at a central server and such, I
simply set up two Nagios servers fully using a common MySQL backend?

I have this set up now, and they both seem okay.
I figure, MySQL can handle it no sweat. Sure, sometimes they'll check
the same thing, but for the most part they're going to be on dissimilar
schedules and simply reference each others' results from the DB (further
dissuading them from duplicate work).

Am I missing some reason this would be a Bad Thing?

Thanks for any input.



--__--__--

Message: 5
Subject: RE: [Nagios-users] check_mailq for postfix
Date: Thu, 16 Oct 2003 19:58:54 -0400
From: "Yanek Korff" <ykorff at cigital.com>
To: "Subhendu Ghosh" <sghosh at sghosh.org>
Cc: <nagios-users at lists.sourceforge.net>

Well, I didn't provide a version for check_mailq as the file says: #
Initial version support sendmail's mailq command

I built it out of nagios-plugins in FreeBSD ports:
Port:   nagios-plugins-1.3.1

Postfix version I'm running is 2.0.9; though I suspect it will work in
several other vesions.

-Yanek.

> -----Original Message-----
> From: Subhendu Ghosh [mailto:sghosh at sghosh.org]=20
> Sent: Thursday, October 16, 2003 18:20
> To: Yanek Korff
> Cc: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] check_mailq for postfix
>=20
>=20
> Of course it might be useful to know your postfix version and=20  the 
>plugin=20  version for this diff :(
>=20
> check_mailq v 1.4 supports sendmail/qmail/postfix ....
>=20
> -sg
>=20
> On Thu, 16 Oct 2003, Yanek Korff wrote:
>=20
> >=20
> > I don't know if anyone's done this before, but here's a=20
> hackjob diff of
> > check_mailq that works for the version of postfix I'm=20
> running.  May it
> > fare so well in your environment.
> >=20
> > --- /home/users/ykorff/check_mailq      Thu Oct 16 17:00:31 2003
> > +++ check_mailq Thu Oct 16 16:57:13 2003
> > @@ -66,15 +66,17 @@
> >  }
> >=20
> >  # only first line is relevant in this iteration.
> > +$verbose =3D 1;
> >  while (<MAILQ>) {
> > -       if (/mqueue/) {
> > +       if (/empty/ ) {
> > +               $msg =3D "OK: mailq is empty";
> > +               $msg_q =3D 0;
> > +               $state =3D $ERRORS{'OK'};
> > +        }
> > +       elsif (/Requests/) {
> >                 print "$utils::PATH_TO_MAILQ =3D $_ "if $verbose ;
> > -               if (/empty/ ) {
> > -                       $msg =3D "OK: mailq is empty";
> > -                       $msg_q =3D 0;
> > -                       $state =3D $ERRORS{'OK'};
> > -               }elsif ( /(\d+)/ ) {
> > -                       $msg_q =3D $1 ;
> > +               if ( /(\d+) Kbytes in (\d+)/ ) {
> > +                       $msg_q =3D $2 ;
> >=20
> >                         print "msg_q =3D $msg_q warn=3D$opt_w=20
> crit=3D$opt_c\n"
> > if $verbose;
> >=20
> >=20
> >=20
> --------------------------------------------------------------
> --------------
> > This electronic message transmission contains information=20
> that may be
> > confidential or privileged.  The information contained=20
> herein is intended
> > solely for the recipient and use by any other party is not=20
> authorized.  If
> > you are not the intended recipient (or otherwise authorized=20
> to receive this
> > message by the intended recipient), any disclosure,=20
> copying, distribution or
> > use of the contents of the information is prohibited.  If=20
> you have received
> > this electronic message transmission in error, please=20
> contact the sender by
> > reply email and delete all copies of this message. =20
> Cigital, Inc. accepts no
> > responsibility for any loss or damage resulting directly or=20
> indirectly from
> > the use of this email or its contents.
> > Thank You.
> >=20
> --------------------------------------------------------------
> --------------
> >=20
> >=20
> > -------------------------------------------------------
> > This SF.net email is sponsored by: SF.net Giveback Program.  
> >SourceForge.net hosts over 70,000 Open Source Projects.  See the 
> >people who have HELPED US provide better services:  Click here: 
> >http://sourceforge.net/supporters.php
> > _______________________________________________
> > 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=20
> OS when reporting any issue.=20
> > ::: Messages without supporting info will risk being sent=20
> to /dev/null
> >=20
>=20
> --=20
>=20
>=20
>=20


------------------------------------------------------------------------
-=
---
This electronic message transmission contains information that may be
confidential or privileged.  The information contained herein is =
intended solely for the recipient and use by any other party is not
authorized.  = If you are not the intended recipient (or otherwise
authorized to receive = this message by the intended recipient), any
disclosure, copying, = distribution or use of the contents of the
information is prohibited.  If you have = received this electronic
message transmission in error, please contact the sender = by reply
email and delete all copies of this message.  Cigital, Inc. = accepts no
responsibility for any loss or damage resulting directly or indirectly =
from the use of this email or its contents. Thank You.
------------------------------------------------------------------------
-=
---


--__--__--

Message: 6
From: Thornton Prime <thornton at yoyoweb.com>
To: nagios-users at lists.sourceforge.net
Date: Thu, 16 Oct 2003 18:21:33 -0700
Subject: [Nagios-users] Problem with Passive Check


I am having an unusual problem with some of my passive checks.

Basically about half of the time Nagios appears to get an OK from some
phantom check. Viewing the status on the web, I'll half the time see
"SERVICE OK - 20" and half the time see "(no output)". When my real
passive check does fail, the service flaps between the failure (with
"SERVICE - CRITICAL - 25") and ok (with "(no output)".)

I have passive_checks_enabled = 1, active_checks_enabled = 0 and have
check_freshness = 0. I have verified in the status logs that nothing
else is feeding service updates.

It appears as if somehow it is still running my check (which is set to
""), and the check is returning OK.

What am I missing?

thornton



--__--__--

Message: 7
Subject: RE: [Nagios-users] Problem with Passive Check
Date: Thu, 16 Oct 2003 21:15:38 -0500
From: "Marc Powell" <mpowell at ena.com>
To: "Thornton Prime" <thornton at yoyoweb.com>,
	<nagios-users at lists.sourceforge.net>

You have multiple Nagios processes running on your aggregation server.
Stop Nagios with the init script, kill any remaining processes and
restart Nagios.

--
Marc

> -----Original Message-----
> From: Thornton Prime [mailto:thornton at yoyoweb.com]
> Sent: Thursday, October 16, 2003 8:22 PM
> To: nagios-users at lists.sourceforge.net
>=20
>=20
> I am having an unusual problem with some of my passive checks. =20
> Basically about half of the time Nagios appears to get an OK from some
> phantom check. Viewing the status on the web, I'll half the time see
> "SERVICE OK - 20" and half the time see "(no output)". When my real
> passive check does fail, the service flaps between the failure (with
> "SERVICE - CRITICAL - 25") and ok (with "(no output)".)
>=20
> I have passive_checks_enabled =3D 1, active_checks_enabled =3D 0 and =
have
> check_freshness =3D 0. I have verified in the status logs that nothing

>else is feeding service updates. =20
> It appears as if somehow it is still running my check (which is set to
> ""), and the check is returning OK.
>=20
> What am I missing?
>=20
> thornton
>=20
>=20
>=20
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> SourceForge.net hosts over 70,000 Open Source Projects.
> See the people who have HELPED US provide better services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> 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



--__--__--

_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users


End of Nagios-users Digest



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
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