From Brian.Ipsen at andebakken.dk Sun Dec 1 07:36:03 2002 From: Brian.Ipsen at andebakken.dk (Brian Ipsen) Date: Sun Dec 1 07:36:03 2002 Subject: [Nagiosplug-devel] Error compiling check_nt Message-ID: Hi, I'm trying to compile the 1.3.0-beta2 version of the plugins, and have copied the check_nt.c file from NSClient 1.06.2 into the plugins directory - then run configure - and then during "make all" the following shows up: gcc -O3 -march=i686 -mcpu=i686 -funroll-loops -I/opt/mysql/include/mysql -l z -L. -L/usr/share/ssl/lib -o check_dig check_dig.o utils.o popen.o -lutil gcc -O3 -march=i686 -mcpu=i686 -funroll-loops -I/opt/mysql/include/mysql -l z -L. -L/usr/share/ssl/lib check_nt.c -o check_nt /tmp/ccBGsVBk.o: In function `main': /tmp/ccBGsVBk.o(.text+0x37): undefined reference to `strscpy' /tmp/ccBGsVBk.o(.text+0x74): undefined reference to `socket_timeout_alarm_handler' /tmp/ccBGsVBk.o(.text+0xba): undefined reference to `strscpy' /tmp/ccBGsVBk.o(.text+0xdb): undefined reference to `process_tcp_request' /tmp/ccBGsVBk.o(.text+0xf3): undefined reference to `strscpy' [and a lot more errors] /tmp/ccBGsVBk.o(.text+0x1355): undefined reference to `is_numeric' collect2: ld returned 1 exit status make[1]: *** [check_nt] Error 1 make[1]: Leaving directory `/var/tmp/nagios-plugins-1.3.0-beta2/plugins' make: *** [all-recursive] Error 1 Any idea why ?? I didn't have the problem with the 1.3-beta1 version of the plugins. Regards, /Brian From noreply at sourceforge.net Sun Dec 1 11:29:24 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Sun Dec 1 11:29:24 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-646516 ] Error when trying to include check_nt Message-ID: Bugs item #646516, was opened at 2002-12-01 08:14 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=646516&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Error when trying to include check_nt Initial Comment: When copying check_nt.c from NSClient into the plugins directory of 1.3.0-beta2 several errors occur. First of all, the utils.c does not have the ssprintf routine anymore - I wonder where that one went, since it is prototype'd in the top of utils.c Second, when ssprintf has been put into utils.c again, make all still fails, due to missing arguments to the c- compiler/linker. The command-line generated by the configure/makefile.am stuff gives (for my configuration): gcc -O3 -march=i686 -mcpu=i686 -funroll-loops - I/opt/mysql/include/mysql -lz -L. -L/usr/share/ssl/lib check_nt.c -o check_nt where it should have been: gcc -DHAVE_CONFIG_H -I. -O3 -march=i686 - mcpu=i686 -funroll-loops -I/opt/mysql/include/mysql -lz - L. -L/usr/share/ssl/lib check_nt.c -o check_nt netutils.o utils.o -lnsl -lresolv -lutil Notive the missing libraries and the two object-files ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=646516&group_id=29880 From Fabian.Pehla at Dregis.com Tue Dec 3 06:40:13 2002 From: Fabian.Pehla at Dregis.com (Pehla, Fabian) Date: Tue Dec 3 06:40:13 2002 Subject: [Nagiosplug-devel] Error compiling check_nt Message-ID: <640A7EC6DCCAD511A5250008C75D52BD02801602@ffz00zm2.ffz00e.mail.dresdner.net> Hi, I also had some trouble concerning check_nt from NSClient. At the moment I am using check_nt from NSClient 1.07.0 because the old version in 1.06.2 produced Segmentation faults when checking many services at once and turning on the option -d SHOWALL. If anyone is interested in a patch for check_nt.c (NSClient 1.07.0) to work with nagios-plugins-1.3.0-beta2, please feel free to ask me. The only modification I made (as far as I remember) was replacing ssprintf with asprintf (jsut ad the project maintainers did with the other plugins due to a modified snprintf.c). Best regards, Fabian P.S.: This patch could also be a solution to Bug #646516 From brylon at jla.rutgers.edu Tue Dec 3 08:29:04 2002 From: brylon at jla.rutgers.edu (Bryan Loniewski) Date: Tue Dec 3 08:29:04 2002 Subject: [Nagiosplug-devel] check_dns hacked again! Message-ID: Dear list, We here at Rutgers University use Nagios and love it! My boss hacked the check_dns code to use a dns resolver directly, instead of the nslookup program. For some reason nslookup crashes on some of its lookups, this happened on stock sun as well as rutgers built versions of the program. Probably because of the reason located on the mailing list archive: http://sourceforge.net/mailarchive/forum.php?thread_id=1356001&forum_id=8499 I think his code has an advantage of not calling the external nslookup program. I am not sure though where to submit the source! Any suggestions would be very much appreciated! Thanks for any feedback. Sincerely, Bryan Loniewski Rutgers University Computing Services (RUCS) From sghosh at sghosh.org Tue Dec 3 08:51:01 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Tue Dec 3 08:51:01 2002 Subject: [Nagiosplug-devel] check_dns hacked again! In-Reply-To: Message-ID: Hi Bryan You can submit to the list or a better place would be on Sourceforge / patches -sg On Tue, 3 Dec 2002, Bryan Loniewski wrote: > Dear list, > > We here at Rutgers University use Nagios and love it! My boss hacked > the check_dns code to use a dns resolver directly, instead of the nslookup > program. For some reason nslookup crashes on some of its lookups, this > happened on stock sun as well as rutgers built versions of the program. > Probably because of the reason located on the mailing list archive: > > http://sourceforge.net/mailarchive/forum.php?thread_id=1356001&forum_id=8499 > > I think his code has an advantage of not calling the external nslookup > program. I am not sure though where to submit the source! Any suggestions > would be very much appreciated! Thanks for any feedback. > > Sincerely, > > Bryan Loniewski > Rutgers University Computing Services (RUCS) > > > -- From noreply at sourceforge.net Tue Dec 3 08:57:02 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Tue Dec 3 08:57:02 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Support Requests-647524 ] check_radius install fails on FreeBSD Message-ID: Support Requests item #647524, was opened at 2002-12-02 20:19 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=647524&group_id=29880 Category: Install Problem (example) Group: None Status: Open Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: check_radius install fails on FreeBSD Initial Comment: check_radius fails to build on FreeBSD 4.3 (possibly others). Configure prints: checking for rc_read_config in -lradiusclient... no configure: warning: Skipping radius plugin radiusclient is installed - ldconfig -r | grep radiusclient 124:-lradiusclient.0 => /usr/local/lib/libradiusclient.so.0 config.log shows: configure:2837: checking for rc_read_config in - lradiusclient configure:2856: gcc -o conftest -g -O2 -L. conftest.c - lradiusclient -lutil -lkvm 1>&5 /usr/libexec/elf/ld: cannot find -lradiusclient trying directly from the command line: touch conftest.c # gcc -o conftest -g -O2 -L. conftest.c -lradiusclient - lutil -lkvm /usr/libexec/elf/ld: cannot find -lradiusclient Trying this with -L pointing to /usr/local/lib results in # gcc -o conftest -g -O2 -L/usr/local/lib conftest.c - lradiusclient -lutil -lkvm /usr/lib/crt1.o: In function `_start': seems OK Not sure where to go from here. Suggestions? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=647524&group_id=29880 From noreply at sourceforge.net Tue Dec 3 08:57:03 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Tue Dec 3 08:57:03 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Feature Requests-647623 ] check_http content Message-ID: Feature Requests item #647623, was opened at 2002-12-02 23:10 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397600&aid=647623&group_id=29880 Category: None Group: None Status: Open Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: check_http content Initial Comment: Hi All, I know that you can check to see if a certain string apears on a page using the check_http module and regex expressions, but when you have multiple databases that are in use, you never know which on will die and cause a problem. Writing a regex expression that caters for all cases can be a real pain. My solution is as follows : Allow two additional parameters --maxcontent and -- mincontent which specifies that the pages size returned from the web server should fall between these two ranges. That way if you start getting DB connectin problems etc .. it is easy to spot because that page size does not fall within the threshhold. Thanks Warrick FitzGerald ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397600&aid=647623&group_id=29880 From noreply at sourceforge.net Tue Dec 3 21:21:01 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Tue Dec 3 21:21:01 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-647959 ] check_dns fix Message-ID: Patches item #647959, was opened at 2002-12-03 10:11 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=647959&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: check_dns fix Initial Comment: check_dns fix, uses a dns resolver directly, instead of the nslookup program. Gutted (changed) a decent amount of code, also NOTE the diff is run against nagiosplug-1.3-beta1 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=647959&group_id=29880 From harald at arcada.fi Wed Dec 4 02:13:07 2002 From: harald at arcada.fi (Harald Hannelius) Date: Wed Dec 4 02:13:07 2002 Subject: [Nagiosplug-devel] Anyone got the check_mssql posted earlier? Message-ID: I read on the web-archives that Jonathan Rozes posted a check_mssql plugin as an attchment. Apparently webarchives don't archive attachments so the plugin isn't accessible over the net. I would be glad if someone could e-mail me the plugin. Thanks in advance, Harald -- A: Top Posters Q: What is the most annoying thing on mailing lists? Harald H Hannelius | harald/a\arcada.fi | GSM +358 50 594 1020 (NEW) From daniel.geske at yoc.de Wed Dec 4 03:35:04 2002 From: daniel.geske at yoc.de (Daniel Geske) Date: Wed Dec 4 03:35:04 2002 Subject: [Nagiosplug-devel] Anyone got the check_mssql posted earlier? In-Reply-To: Message-ID: <000901c29b88$92a48bf0$a52efea9@Bowman> Dear Harald: There you go. Have fun! Greetings Daniel > -----Original Message----- > From: nagiosplug-devel-admin at lists.sourceforge.net > [mailto:nagiosplug-devel-admin at lists.sourceforge.net] On > Behalf Of Harald Hannelius > Sent: Wednesday, December 04, 2002 11:13 AM > To: nagiosplug-devel at lists.sourceforge.net > Subject: [Nagiosplug-devel] Anyone got the check_mssql posted earlier? > > > > I read on the web-archives that Jonathan Rozes posted a > check_mssql plugin as an attchment. Apparently webarchives > don't archive attachments so the plugin isn't accessible over the net. > > I would be glad if someone could e-mail me the plugin. > > Thanks in advance, > > Harald > > -- > A: Top Posters > Q: What is the most annoying thing on mailing lists? > > Harald H Hannelius | harald/a\arcada.fi | GSM +358 50 > 594 1020 (NEW) > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Microsoft Visual Studio.NET > comprehensive development tool, built to increase your > productivity. Try a free online hosted session at: http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en _______________________________________________ Nagiosplug-devel mailing list Nagiosplug-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel -------------- next part -------------- A non-text attachment was scrubbed... Name: check_mssql.dat Type: application/octet-stream Size: 3562 bytes Desc: not available URL: From noreply at sourceforge.net Wed Dec 4 10:41:08 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Wed Dec 4 10:41:08 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-648273 ] check_nt 1.07.0 with plugins 1.3.0-beta2 Message-ID: Patches item #648273, was opened at 2002-12-04 09:03 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=648273&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Fabian Pehla (fpehla) Assigned to: Nobody/Anonymous (nobody) Summary: check_nt 1.07.0 with plugins 1.3.0-beta2 Initial Comment: Patch to use check_nt.c from NSClient 1.07.0 with nagios-plugins-1.3.0-beta2. The only modification I made (as far as I remember) was replacing ssprintf with asprintf (just as the project maintainers did with the other plugins due to a modified snprintf.c). best regards, Fabian ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=648273&group_id=29880 From Kimberly_M_Graft at KeyBank.com Wed Dec 4 13:32:02 2002 From: Kimberly_M_Graft at KeyBank.com (Kimberly_M_Graft at KeyBank.com) Date: Wed Dec 4 13:32:02 2002 Subject: [Nagiosplug-devel] Plugin Newbie Message-ID: Hi! I am new to Nagios - I have it installed on a Solaris 8 machine, and am using several of the default plugins successfully. I am very impressed with it! I already have quite a few custom shell script & perl scripts that I use for monitoring different things here - i.e. - checking whether default routes have changed on devices where they shouldn't have, or pulling web pages back through a proxy, etc. I was hoping that I could convert these scripts to work with Nagios, but I couldn't find info on how to do this. Are there any specified inputs / outputs for the plugins that I could incorporate, and my scripts would work? Thanks for any info that you have! Thanks!! Kimberly ================================================== This communication may contain privileged and/or confidential information. It is intended solely for the use of the addressee. If you are not the intended recipient, you are strictly prohibited from disclosing, copying, distributing or using any of this information. If you received this communication in error, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. This communication may contain nonpublic personal information about consumers subject to the restrictions of the Gramm-Leach-Bliley Act. You may not directly or indirectly reuse or redisclose such information for any purpose other than to provide the services for which you are receiving the information. From sghosh at sghosh.org Wed Dec 4 21:17:03 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Wed Dec 4 21:17:03 2002 Subject: [Nagiosplug-devel] Plugin Newbie In-Reply-To: Message-ID: Developer guidelines on http://nagiosplug.sf.net/ -sg On Wed, 4 Dec 2002 Kimberly_M_Graft at KeyBank.com wrote: > Hi! I am new to Nagios - I have it installed on a Solaris 8 machine, and > am using several of the default plugins successfully. I am very impressed > with it! I already have quite a few custom shell script & perl scripts > that I use for monitoring different things here - i.e. - checking whether > default routes have changed on devices where they shouldn't have, or > pulling web pages back through a proxy, etc. I was hoping that I could > convert these scripts to work with Nagios, but I couldn't find info on how > to do this. Are there any specified inputs / outputs for the plugins that > I could incorporate, and my scripts would work? Thanks for any info that > you have! Thanks!! > > Kimberly -- From ghelleks at yahoo.com Thu Dec 5 09:52:04 2002 From: ghelleks at yahoo.com (Gunnar Hellekson) Date: Thu Dec 5 09:52:04 2002 Subject: [Nagiosplug-devel] return code 139, 142 Message-ID: We've recently begun receiving "Return code 139 is out of bounds" on a number of our home-grown perl checks. "Return code 142 is out of bounds" is pretty popular, too. We've combed through the scripts -- we're not returning this, and none of the libraries are (documented to) return these error codes. What's worse, they're almost impossible to reproduce from the command line. Load, memory, etc. are all under control. We're using: SunOS 5.8 Generic_108528-16 sun4u sparc SUNW,Ultra-Enterprise Nagios 1.0b6 perl 5.6.1 DBI 1.30 DBD::Oracle 1.12 I've googled myself crosseyed on this error code, and I can't find any mention of it anywhere. Any suggestions on how to debug this? -Gunnar From james at cloud9.co.uk Thu Dec 5 10:06:02 2002 From: james at cloud9.co.uk (James Fidell) Date: Thu Dec 5 10:06:02 2002 Subject: [Nagiosplug-devel] check_ntp warning patch Message-ID: <20021205180349.F27176@avarice.corp.cloud9.co.uk> Appended is a patch for check_ntp. When xntpd starts, it can spend some time running correctly, but unsynchronised, because it may take ten minutes or more to correctly synchronise with its servers. During this period, ntpdate will report the server as being stratum 16 and give an error that no suitable servers were found. In this case, I wanted nagios to log a warning rather than an error, because (in my view) it isn't a critical problem. James --- check_ntp.pl.orig Thu Dec 5 17:55:05 2002 +++ check_ntp.pl Thu Dec 5 17:55:10 2002 @@ -147,9 +147,15 @@ exit $ERRORS{"UNKNOWN"}; } +my $stratum = -1; +my $ignoreret = 0; + while () { print if ($verbose); $msg = $_ unless ($msg); + if ( /stratum\s(\d+)/ ) { + $stratum = $1; + } if (/(offset|adjust)\s+([-.\d]+)/i) { $offset = $2; @@ -163,8 +169,14 @@ } if (/no server suitable for synchronization found/) { + if ( $stratum == 16 ) { + $ntpdate_error = $ERRORS{"WARNING"}; + $msg = "Desynchronised peer server found"; + $ignoreret = 1; + } else { $ntpdate_error = $ERRORS{"CRITICAL"}; $msg = "No suitable peer server found - "; + } } } @@ -172,7 +184,7 @@ close (NTPDATE); # declare an error if we also get a non-zero return code from ntpdate # unless already set to critical -if ( $? ) { +if ( $? && !$ignoreret ) { print "stderr = $? : $! \n" if $verbose; $ntpdate_error = $ntpdate_error == $ERRORS{"CRITICAL"} ? $ERRORS{"CRITICAL"} : $ERRORS{"UNKNOWN"} ; print "ntperr = $ntpdate_error : $!\n" if $verbose; @@ -208,7 +220,11 @@ if ($ntpdate_error != $ERRORS{'OK'}) { $state = $ntpdate_error; - $answer = $msg . "Server for ntp probably down\n"; + if ( $ntpdate_error == $ERRORS{'WARNING'} ) { + $answer = $msg . "\n"; + } else { + $answer = $msg . "Server for ntp probably down\n"; + } if (defined($offset) && abs($offset) > $critical) { $state = $ERRORS{'CRITICAL'}; $answer = "Server Error and time difference $offset seconds greater than +/- $critical sec\n"; From sghosh at sghosh.org Thu Dec 5 12:18:11 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Thu Dec 5 12:18:11 2002 Subject: [Nagiosplug-devel] return code 139, 142 In-Reply-To: Message-ID: 139 or 142 are the return codes received by Nagios from the popen process - they are usually related to the error code generated by the shell . For Bash (linux): "EXIT STATUS For the shell's purposes, a command which exits with a zero exit status has succeeded. An exit status of zero indicates success. A non-zero exit status indicates failure. When a command terminates on a fatal signal N, bash uses the value of 128+N as the exit status. If a command is not found, the child process created to execute it returns a status of 127. If a command is found but is not executable, the return status is 126." 139 = 128+11 ==> SIGSEGV - invalid memory reference 142 = 128+14 ==> SIGALRM - Timer signal from ALARM -sg On Thu, 5 Dec 2002, Gunnar Hellekson wrote: > > We've recently begun receiving "Return code 139 is out of bounds" on a > number of our home-grown perl checks. "Return code 142 is out of bounds" is > pretty popular, too. We've combed through the scripts -- we're not > returning this, and none of the libraries are (documented to) return these > error codes. What's worse, they're almost impossible to reproduce from the > command line. > > Load, memory, etc. are all under control. We're using: > > SunOS 5.8 Generic_108528-16 sun4u sparc SUNW,Ultra-Enterprise > Nagios 1.0b6 > perl 5.6.1 > DBI 1.30 > DBD::Oracle 1.12 > > I've googled myself crosseyed on this error code, and I can't find any > mention of it anywhere. Any suggestions on how to debug this? > > -Gunnar > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > -- From sghosh at sghosh.org Thu Dec 5 18:35:03 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Thu Dec 5 18:35:03 2002 Subject: [Nagiosplug-devel] Error compiling check_nt In-Reply-To: Message-ID: check patch #648273 on source forge for check_nt (1.07.0) -sg On Sun, 1 Dec 2002, Brian Ipsen wrote: > Hi, > > I'm trying to compile the 1.3.0-beta2 version of the plugins, and have > copied the check_nt.c file from NSClient 1.06.2 into the plugins directory - > then run configure - and then during "make all" the following shows up: > > gcc -O3 -march=i686 -mcpu=i686 -funroll-loops -I/opt/mysql/include/mysql -l > z -L. -L/usr/share/ssl/lib -o check_dig check_dig.o utils.o popen.o -lutil > gcc -O3 -march=i686 -mcpu=i686 -funroll-loops -I/opt/mysql/include/mysql -l > z -L. -L/usr/share/ssl/lib check_nt.c -o check_nt > /tmp/ccBGsVBk.o: In function `main': > /tmp/ccBGsVBk.o(.text+0x37): undefined reference to `strscpy' > /tmp/ccBGsVBk.o(.text+0x74): undefined reference to > `socket_timeout_alarm_handler' > /tmp/ccBGsVBk.o(.text+0xba): undefined reference to `strscpy' > /tmp/ccBGsVBk.o(.text+0xdb): undefined reference to `process_tcp_request' > /tmp/ccBGsVBk.o(.text+0xf3): undefined reference to `strscpy' > [and a lot more errors] > /tmp/ccBGsVBk.o(.text+0x1355): undefined reference to `is_numeric' > collect2: ld returned 1 exit status > make[1]: *** [check_nt] Error 1 > make[1]: Leaving directory `/var/tmp/nagios-plugins-1.3.0-beta2/plugins' > make: *** [all-recursive] Error 1 > > Any idea why ?? I didn't have the problem with the 1.3-beta1 version of the > plugins. > > Regards, > > /Brian > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > -- From karl at debisschop.net Thu Dec 5 19:24:06 2002 From: karl at debisschop.net (Karl DeBisschop) Date: Thu Dec 5 19:24:06 2002 Subject: [Nagiosplug-devel] check_dns problem In-Reply-To: <20021127162151.C4208@avarice.corp.cloud9.co.uk> References: <20021127162151.C4208@avarice.corp.cloud9.co.uk> Message-ID: <1039144909.1897.1.camel@toaster> On Wed, 2002-11-27 at 11:21, James Fidell wrote: > When started, nslookup tries to look up the hostname of the server > being used for queries. In the general case this is fine. However, > if it is being used to do a lookup on a server which doesn't allow > recursive queries and isn't authoritative for its own reverse address > then the lookup times out and check_dns reports an error when there > may be none. > > I've hacked check_dns.c to use "host" for the moment (since nslookup > is deprecated anyway). Is there an alternative work-around for this > problem (I guess check_dns should really do it's own DNS check rather > than relying on any external application). Did you try check_dig? -- Karl DeBisschop From james at cloud9.co.uk Fri Dec 6 08:00:02 2002 From: james at cloud9.co.uk (James Fidell) Date: Fri Dec 6 08:00:02 2002 Subject: [Nagiosplug-devel] check_tcp SSL problem Message-ID: <20021206155802.A9664@avarice.corp.cloud9.co.uk> On FreeBSD 4.6-STABLE using openssl 0.9.6g, using check_spop I get a core dump inside SSL_load_error_strings(). The manpage for SSL_load_error_strings implies it is optional, so I commented it out, recompiled and the plugin then worked fine (as far as I can tell at the moment). Anyone else seen this problem/know of a solution? James From michael.haro at ceres.ca.gov Fri Dec 6 16:28:03 2002 From: michael.haro at ceres.ca.gov (Michael Haro) Date: Fri Dec 6 16:28:03 2002 Subject: [Nagiosplug-devel] check_hpjd patch for net-snmp v5.0 Message-ID: <003801c29d87$6536a120$240110ac@DARKSTAR> need to change the argument order... *** check_hpjd.c.orig Fri Dec 6 16:19:50 2002 --- check_hpjd.c Fri Dec 6 16:20:21 2002 *************** *** 137,144 **** HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, HPJD_GD_STATUS_DISPLAY ); /* get the command to run */ ! sprintf (command_line, "%s -m : -v 1 %s -c %s %s", PATH_TO_SNMPGET, addr ess, ! community, query_string); /* run the command */ child_process = spopen (command_line); --- 137,144 ---- HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, HPJD_GD_STATUS_DISPLAY ); /* get the command to run */ ! sprintf (command_line, "%s -m : -v 1 -c %s %s %s", PATH_TO_SNMPGET, ! community, address, query_string); /* run the command */ child_process = spopen (command_line); Michael From sghosh at sghosh.org Fri Dec 6 20:05:01 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Fri Dec 6 20:05:01 2002 Subject: [Nagiosplug-devel] check_hpjd patch for net-snmp v5.0 In-Reply-To: <003801c29d87$6536a120$240110ac@DARKSTAR> Message-ID: Thanks -sg On Fri, 6 Dec 2002, Michael Haro wrote: > need to change the argument order... > > *** check_hpjd.c.orig Fri Dec 6 16:19:50 2002 > --- check_hpjd.c Fri Dec 6 16:20:21 2002 > *************** > *** 137,144 **** > HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, > HPJD_GD_STATUS_DISPLAY > ); > > /* get the command to run */ > ! sprintf (command_line, "%s -m : -v 1 %s -c %s %s", PATH_TO_SNMPGET, > addr > ess, > ! community, query_string); > > /* run the command */ > child_process = spopen (command_line); > --- 137,144 ---- > HPJD_GD_DOOR_OPEN, HPJD_GD_PAPER_OUTPUT, > HPJD_GD_STATUS_DISPLAY > ); > > /* get the command to run */ > ! sprintf (command_line, "%s -m : -v 1 -c %s %s %s", PATH_TO_SNMPGET, > ! community, address, query_string); > > /* run the command */ > child_process = spopen (command_line); > > > Michael > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > -- From tonvoon at mac.com Sat Dec 7 09:50:03 2002 From: tonvoon at mac.com (Ton Voon) Date: Sat Dec 7 09:50:03 2002 Subject: [Nagiosplug-devel] Mac OS X support Message-ID: <284870A6-0A0C-11D7-BFB9-000A27E41300@mac.com> Hi! Nagios has been a huge time saver for me! So here's my contribution back... Here are the changes I think are required to get Mac OS X support for the plugins. This has been tested on Mac OS 10.2.2 (gcc 3.1 automake 1.6.1, autconf 2.52). Files: -------------- next part -------------- A non-text attachment was scrubbed... Name: check_procs.c.patch Type: application/octet-stream Size: 667 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: check_vsz.c.patch Type: application/octet-stream Size: 2190 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.in.patch Type: application/octet-stream Size: 1497 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: plugins-Makefile.am.patch Type: application/octet-stream Size: 248 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: depcomp Type: application/octet-stream Size: 12123 bytes Desc: not available URL: -------------- next part -------------- depcomp was taken from the gd distribution. It is probably not required in a distribution, but was needed for automake to work. To run: cd nagios-plugins-200212071100-snapshot cp ../depcomp . patch configure.in ../configure.in.patch patch plugins/Makefile.am ../plugins-Makefile.am.patch patch plugins/check_procs.c ../check_procs.c.patch patch plugins/check_vsz.c ../check_vsz.c.patch aclocal autoconf automake ./configure make The fixes are: add Max OS X ps command ranlib required for libgetopt.a (this needs to be tested for other OSes) check_procs -p 1 (bus error) check_procs -p 1 -u 0 (wrong output) check_vsz (no error reported) check_vsz -A (two invalid option messages) check_vsz 1000 (bus error) check_vsz 100000 (always gives critical error - now highest alert is warn) check_vsz -C init (no error reported) check_vsz -c 100000 (always gives warning) Still outstanding: if a process name has a space in it, check_procs and check_vsz will not read it correctly check_disk fails on Mac OS X because of spaces in the Filesystem column (same problem as above) Ton From Jeremy.Bouse at UnderGrid.net Mon Dec 9 11:50:02 2002 From: Jeremy.Bouse at UnderGrid.net (Jeremy T. Bouse) Date: Mon Dec 9 11:50:02 2002 Subject: [Nagiosplug-devel] AF-Independent code for plugins Message-ID: <20021209194752.GA28074@UnderGrid.net> As I had mentioned before I've been working on porting the plugins to support IPv6 as well as IPv4... In doing so I'm also making sure that the code is AF-independent... One advantage I've also seen of this is the use of the my_inet_aton() function in plugins/netutils.c which made a mention that Solaris does not contain the inet_aton() function which I can verify myself as I have access to 4 Solaris 8 Ultra Sparcs to build on... In my AF-indep porting I'm moving towards using getnameinfo() and getaddrinfo() which are both in Solaris as well as all *BSD and Linux implimentations I've come across so far in doing compatibility compiles... As I'm not actually working off a branch of the CVS repository on SF.net I've got this code and the code I'm working towards IPv6 capability mixed together and would be a bit to remove the two to make a diff patch... However my question is would this patch be of value to others besides myself? If so I will get it submitted through the SF.net project site under the Patch section as soon as I've got it cleaned up and have tested it on a couple various machines (AMD K7 Debian GNU/Linux, Ultra Sparc Solaris 9, and either PIII FreeBSD 4.4 or OpenBSD 3.2-STABLE)... My code is being worked on from CVS version which I keep updated regularly while I work... Jeremy From michael.haro at ceres.ca.gov Mon Dec 9 14:05:06 2002 From: michael.haro at ceres.ca.gov (Michael Haro) Date: Mon Dec 9 14:05:06 2002 Subject: [Nagiosplug-devel] check_ups.c Message-ID: <000a01c29fce$fcb9ce70$240110ac@DARKSTAR> The default port in nut changed from 3305 to 3493 a while back. Please update the #define PORT in check_ups.c. FYI, 3493 is nut's official IANA assignment. Thanks, Michael -- Michael Haro Systems Administrator California Resources Agency / C.E.R.E.S. From dviner at yahoo-inc.com Mon Dec 9 15:03:02 2002 From: dviner at yahoo-inc.com (Dave Viner) Date: Mon Dec 9 15:03:02 2002 Subject: [Nagiosplug-devel] check_mysql cmd args fixed Message-ID: Hi, I just downloaded and compiled the awesome plugins for Nagios from sourceforge. However, whenever I run check_mysql I get a coredump. After closer examinination, I discovered that there is a subtle error in the processing of arguments from the command line. I've attached a small patch file which fixes this problem. Essentially, this patch allows a user to specify the host, user, password, database, and port in the arguments (but not in the options). I believe this is the intent of the code that is there now. This patch means that these two commands are identical: ./check_mysql -H myhost.example.com -u myuser -p mypass -d mytbl -P 3306 ./check_mysql myhost.example.com myuser mypass mytbl 3306 dave. -------------- next part -------------- A non-text attachment was scrubbed... Name: check_mysql.patch Type: application/octet-stream Size: 994 bytes Desc: not available URL: From sghosh at sghosh.org Mon Dec 9 18:35:02 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Mon Dec 9 18:35:02 2002 Subject: [Nagiosplug-devel] AF-Independent code for plugins In-Reply-To: <20021209194752.GA28074@UnderGrid.net> Message-ID: On Mon, 9 Dec 2002, Jeremy T. Bouse wrote: > As I had mentioned before I've been working on porting the > plugins to support IPv6 as well as IPv4... In doing so I'm also making > sure that the code is AF-independent... One advantage I've also seen of > this is the use of the my_inet_aton() function in plugins/netutils.c > which made a mention that Solaris does not contain the inet_aton() > function which I can verify myself as I have access to 4 Solaris 8 Ultra > Sparcs to build on... In my AF-indep porting I'm moving towards using > getnameinfo() and getaddrinfo() which are both in Solaris as well as all > *BSD and Linux implimentations I've come across so far in doing > compatibility compiles... As I'm not actually working off a branch of > the CVS repository on SF.net I've got this code and the code I'm working > towards IPv6 capability mixed together and would be a bit to remove the > two to make a diff patch... > > However my question is would this patch be of value to others > besides myself? If so I will get it submitted through the SF.net project > site under the Patch section as soon as I've got it cleaned up and have > tested it on a couple various machines (AMD K7 Debian GNU/Linux, Ultra > Sparc Solaris 9, and either PIII FreeBSD 4.4 or OpenBSD 3.2-STABLE)... > My code is being worked on from CVS version which I keep updated > regularly while I work... > > Jeremy > Thanks :) Please post patch to SF when appropriate. It also helps keep track of things that have not yet been worked on.. -sg -- From noreply at sourceforge.net Mon Dec 9 18:36:11 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Mon Dec 9 18:36:11 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-650970 ] check_oracle with dummy login Message-ID: Patches item #650970, was opened at 2002-12-09 17:07 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=650970&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Ton Voon (tonvoon) Assigned to: Nobody/Anonymous (nobody) Summary: check_oracle with dummy login Initial Comment: This is a patch to the check_oracle script so there is a -- login check. This is better than a --db and a --tns check because it makes a connection to the database, uses a dummy id, and then checks that there was a ORA-01017: invalid username/password. For example, this picks up a ORA-01033: ORACLE initialization or shutdown in progress which the standard check_oracle tests will miss. Will also get Oracle's ORA- error message in the returned output. It does not require a valid userid/password. Also moved the --help and --version higher up so that these messages will be seen before the script complains about an the ORACLE_HOME variable. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=650970&group_id=29880 From noreply at sourceforge.net Mon Dec 9 18:36:11 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Mon Dec 9 18:36:11 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-651201 ] function not closed in check_ifstatus.pl Message-ID: Bugs item #651201, was opened at 2002-12-09 16:41 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=651201&group_id=29880 Category: Parsing problem Group: CVS Status: Open Resolution: None Priority: 5 Submitted By: Matt Perry (mperry2) Assigned to: Nobody/Anonymous (nobody) Summary: function not closed in check_ifstatus.pl Initial Comment: The foreach() function on line 185 of check_ifstatus.pl doesn't have a closing brace. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=651201&group_id=29880 From Jeremy.Bouse at UnderGrid.net Mon Dec 9 21:05:05 2002 From: Jeremy.Bouse at UnderGrid.net (Jeremy T. Bouse) Date: Mon Dec 9 21:05:05 2002 Subject: [Nagiosplug-devel] AF-Independent code for plugins In-Reply-To: References: <20021209194752.GA28074@UnderGrid.net> Message-ID: <20021210050340.GA3806@UnderGrid.net> On Mon, Dec 09, 2002 at 09:34:06PM -0500, Subhendu Ghosh wrote: > > Thanks :) > > Please post patch to SF when appropriate. It also helps keep track of > things that have not yet been worked on.. > > -sg > As soon as I clear up a few run-time errors I'm encountering I will make the diff and submit it to SF... Currently all the check_tcp plugins (pop, imap, ftp, etc) work and check_ping... I'm running into some problems with check_ldap, check_http, check_dns and check_dig though but looking into them as they don't appear to use the check_tcp.c code base... Jeremy From Stephen.Lomond at gov.nf.ca Tue Dec 10 07:21:06 2002 From: Stephen.Lomond at gov.nf.ca (Stephen Lomond) Date: Tue Dec 10 07:21:06 2002 Subject: [Nagiosplug-devel] check_nwstat Plugin Modification Message-ID: I have modified the check_nwstat to determine if time is in sync on the servers. What process should I follow to get this minor modification put into the next release of this plugin? From Jeremy.Bouse at UnderGrid.net Tue Dec 10 10:44:05 2002 From: Jeremy.Bouse at UnderGrid.net (Jeremy T. Bouse) Date: Tue Dec 10 10:44:05 2002 Subject: [Nagiosplug-devel] check_dns problem In-Reply-To: <1039144909.1897.1.camel@toaster> References: <20021127162151.C4208@avarice.corp.cloud9.co.uk> <1039144909.1897.1.camel@toaster> Message-ID: <20021210184011.GA15408@UnderGrid.net> The other problem I've found with check_dns is because of it's dependency on the nslookup command. As of BIND9 the use of nslookup is deprecated in favor of using host or dig... As I'm working to make the plugins work for IPv4 and IPv6 and be AF-independent I've noticed that BIND8's nslookup doesn't even know what to do if you give it an IPv6 address (ie- 3ffe:501:4819:2000:210:f3ff:fe03:4d0 ) and BIND9's will return a SERVFAIL as it tries to lookup using bitstring notation with the ip6.arpa TLD rather than nibble notation... I will note that I do have check_dns working fine if you give it IPv6 DNS server to query against for an IPv4 host or address... Just something anyone wanting to spend time working on the check_dns plugin should prolly be aware of for compatibility and portability... Jeremy On Thu, Dec 05, 2002 at 10:21:49PM -0500, Karl DeBisschop wrote: > On Wed, 2002-11-27 at 11:21, James Fidell wrote: > > When started, nslookup tries to look up the hostname of the server > > being used for queries. In the general case this is fine. However, > > if it is being used to do a lookup on a server which doesn't allow > > recursive queries and isn't authoritative for its own reverse address > > then the lookup times out and check_dns reports an error when there > > may be none. > > > > I've hacked check_dns.c to use "host" for the moment (since nslookup > > is deprecated anyway). Is there an alternative work-around for this > > problem (I guess check_dns should really do it's own DNS check rather > > than relying on any external application). > > Did you try check_dig? > > -- > Karl DeBisschop > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel From Jeremy.Bouse at UnderGrid.net Tue Dec 10 11:16:03 2002 From: Jeremy.Bouse at UnderGrid.net (Jeremy T. Bouse) Date: Tue Dec 10 11:16:03 2002 Subject: [Nagiosplug-devel] netutils.c is_hostname() function Message-ID: <20021210191403.GB15408@UnderGrid.net> As I'm working on porting to be AF-independant code I'm looking through netutils.c... I've already created a is_ipv4_addr() and is_ipv6_addr() which replace the is_dotted_quad() which checked for an IPv4 address and then turned my attention to is_hostname()... In looking through the various calls to is_hostname throughout the plugin code I can't see any instance where is_hostname() should not be checking for a valid resolvable hostname... Can anyone think of a situation where they would need to call is_hostname with a hostname that would be syntactically correct but doesn't resolve? In that case I'll be working it to be inline with my is_*_addr() functions and let it's validity be handled by the resolver... Jeremy From Jeremy.Bouse at UnderGrid.net Tue Dec 10 18:30:01 2002 From: Jeremy.Bouse at UnderGrid.net (Jeremy T. Bouse) Date: Tue Dec 10 18:30:01 2002 Subject: [Nagiosplug-devel] RFC: netutils.c function change Message-ID: <20021211022738.GA23839@UnderGrid.net> Just wanted to get some thought on a chance in the code that I would see as helpful and personally would move towards... In netutils.c there are functions which pass the "proto" parameter around and usually it's set to either "udp" or "tcp"... Likewise in the functions there are strcmp or strcasecmp calls to check which it is... My thought would be to change the "proto" parameter from 'char *' to 'int' and then use the IPPROTO_TCP and IPPROTO_UDP defined in netinet/in.h. This makes conditions easier to test for and also makes the code cleaner... I've actually patched my local working directory to do this and it works really nicely and has less SEGV issues when relating to the proto parameter... I've been doing some general code clean-up and this would be included in a diff but I'll wait to see what of my previous patch is accepted before building another one to include these changes... If someone wants to take a second look at what I have I can try and work out a patch that applies only to this and submit it... Jeremy From dviner at yahoo-inc.com Tue Dec 10 21:45:03 2002 From: dviner at yahoo-inc.com (Dave Viner) Date: Tue Dec 10 21:45:03 2002 Subject: [Nagiosplug-devel] check_mysql cmd args fixed In-Reply-To: Message-ID: Hi all, Now that some of my cohorts have gotten this working, they are developing a check test to verify the status of mysql replication. Should I submit the code to this list or would it be easier for me to become a committer for this project? Also, has anyone had a chance to review my earlier patch to check_mysql? Not a big deal, just a minor annoyance that is fixed. thanks dave -----Original Message----- From: nagiosplug-devel-admin at lists.sourceforge.net [mailto:nagiosplug-devel-admin at lists.sourceforge.net]On Behalf Of Dave Viner Sent: Monday, December 09, 2002 3:02 PM To: Nagiosplug-devel at lists.sourceforge.net Subject: [Nagiosplug-devel] check_mysql cmd args fixed Hi, I just downloaded and compiled the awesome plugins for Nagios from sourceforge. However, whenever I run check_mysql I get a coredump. After closer examinination, I discovered that there is a subtle error in the processing of arguments from the command line. I've attached a small patch file which fixes this problem. Essentially, this patch allows a user to specify the host, user, password, database, and port in the arguments (but not in the options). I believe this is the intent of the code that is there now. This patch means that these two commands are identical: ./check_mysql -H myhost.example.com -u myuser -p mypass -d mytbl -P 3306 ./check_mysql myhost.example.com myuser mypass mytbl 3306 dave. From noreply at sourceforge.net Wed Dec 11 13:36:05 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Wed Dec 11 13:36:05 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-651369 ] check_nt added into makefile Message-ID: Patches item #651369, was opened at 2002-12-10 10:55 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=651369&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Ton Voon (tonvoon) Assigned to: Nobody/Anonymous (nobody) Summary: check_nt added into makefile Initial Comment: The configure script currently adds in the check_nt program into the makefile if the check_nt.c file exists in the plugins directory. However, the dependencies are not setup so compiling fails. This patch will put the dependencies in so that compilation will work. There is also a flag in the makefile so that check_nt.c is not distributed. A comment is added to refer to the README file which says that check_nt should be found at the relevant web site. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=651369&group_id=29880 From noreply at sourceforge.net Wed Dec 11 13:36:05 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Wed Dec 11 13:36:05 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-651617 ] AF-Independant / IPv6 patch Message-ID: Patches item #651617, was opened at 2002-12-10 12:22 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=651617&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jeremy T. Bouse (undrgrid) Assigned to: Nobody/Anonymous (nobody) Summary: AF-Independant / IPv6 patch Initial Comment: This patch is taken against the CVS today and contains updates to the following files: configure.in plugins/check_dig.c plugins/check_dns.c plugins/check_ldap.c plugins/check_ping.c plugins/netutils.c plugins/netutils.h.in plugins/utils.c plugins/utils.h.in These updates include checking for the proper ping command for IPv6 hosts (still needs some work to be portable but works on Linux), removal of AF-dependant function calls such as gethostbyname, inet_pton, inet_aton (actually my_inet_aton) in favor of using AF-independant getaddrinfo and getnameinfo routines which are portable against all operating systems including Solaris 9. is_dotted_quad() in utils was removed and replaced with is_ipv4_addr() and is_ipv6_addr(). is_hostname() was completely re-written as was my_connect() in netutils.c along with removal of my_inet_aton(). Any questions regarding this patch can be re-directed to me at Jeremy.Bouse at UnderGrid.net ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=651617&group_id=29880 From noreply at sourceforge.net Wed Dec 11 13:36:06 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Wed Dec 11 13:36:06 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-652074 ] configure.in support for Mac OS X Message-ID: Patches item #652074, was opened at 2002-12-11 15:24 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=652074&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Ton Voon (tonvoon) Assigned to: Nobody/Anonymous (nobody) Summary: configure.in support for Mac OS X Initial Comment: Adds in support for Mac OS X / Darwin for ps command syntax ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=652074&group_id=29880 From noreply at sourceforge.net Wed Dec 11 13:36:06 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Wed Dec 11 13:36:06 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-652080 ] plugins/Makefile.am: ranlib for Mac OS X Message-ID: Patches item #652080, was opened at 2002-12-11 15:32 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=652080&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Ton Voon (tonvoon) Assigned to: Nobody/Anonymous (nobody) Summary: plugins/Makefile.am: ranlib for Mac OS X Initial Comment: ranlib needs to be run for Mac OS X for the libgetopt.a archive. This has been tested for Mac OS X 10.2.2. Warning: it may affect the compile on other operating systems (Solaris will be okay as ranlib does nothing and always returns 0) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=652080&group_id=29880 From noreply at sourceforge.net Wed Dec 11 13:36:07 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Wed Dec 11 13:36:07 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-652082 ] check_procs: Message-ID: Patches item #652082, was opened at 2002-12-11 15:35 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=652082&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Ton Voon (tonvoon) Assigned to: Nobody/Anonymous (nobody) Summary: check_procs: Initial Comment: Fixes: check_procs -p 1 (bus error) check_procs -p 1 -u 0 (wrong output) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=652082&group_id=29880 From noreply at sourceforge.net Wed Dec 11 13:36:07 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Wed Dec 11 13:36:07 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-652086 ] check_vsz: various functionality fixes Message-ID: Patches item #652086, was opened at 2002-12-11 15:39 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=652086&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Ton Voon (tonvoon) Assigned to: Nobody/Anonymous (nobody) Summary: check_vsz: various functionality fixes Initial Comment: Fixes: check_vsz (no error reported) check_vsz -A (two invalid option messages) check_vsz 1000 (bus error) check_vsz 100000 (always gives critical error - now highest alert is warn) check_vsz -C init (no error reported) check_vsz -c 100000 (always gives warning) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=652086&group_id=29880 From noreply at sourceforge.net Wed Dec 11 20:41:04 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Wed Dec 11 20:41:04 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-652405 ] Add status message to check_mrtg Message-ID: Patches item #652405, was opened at 2002-12-11 19:10 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=652405&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Paul Dlug (pdlug) Assigned to: Nobody/Anonymous (nobody) Summary: Add status message to check_mrtg Initial Comment: The check_mrtg plugin is does not return OK, CRITICAL or WARNING. I added these status codes. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=652405&group_id=29880 From noreply at sourceforge.net Wed Dec 11 20:42:04 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Wed Dec 11 20:42:04 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-652468 ] check_dns return code 139 out of bounds Message-ID: Bugs item #652468, was opened at 2002-12-11 19:40 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=652468&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: check_dns return code 139 out of bounds Initial Comment: check_dns reports "(Return code of 139 is out of bounds)". /var/log/messages indicates check_dns exited on signal 11 (core dumped). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=652468&group_id=29880 From pietrob at lansystems.it Thu Dec 12 01:39:03 2002 From: pietrob at lansystems.it (Pietro Bandera) Date: Thu Dec 12 01:39:03 2002 Subject: [Nagiosplug-devel] A new plugin...a thought In-Reply-To: Message-ID: Hi all I found out a "new" or better a not well known command that could be useful to make a "check_bandwith" or something similar command..... The command is bing.....a simple command that tries to "feel" the avaible bandwith between two net nodes.... So what i only thought is that...maybe we can use this command in a similar way of the "check_ping" command.....but not in order to see if the host is reachable and how is slow....but understand, as much as the command bing can, the avaible bandwith to reach an host.......of course with -c and -w command values. This command could be useful f.e. to know if we got the right CIR on frame relay or CDN net....or whatever we want.... Unfortunatly...i'm not a coder :(((...so my message is this...if you think that my idea would be good...please take a look at it... Thanks Pietro -------------- next part -------------- A non-text attachment was scrubbed... Name: bing-1.1.3.tar.gz Type: application/x-compressed Size: 38847 bytes Desc: not available URL: From noreply at sourceforge.net Thu Dec 12 11:05:01 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Thu Dec 12 11:05:01 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-652816 ] check_mysql segmentation fault Message-ID: Bugs item #652816, was opened at 2002-12-12 10:27 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=652816&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: check_mysql segmentation fault Initial Comment: I have a problem with check_mysql plugin. It stops always with a segfmenation fault on execution. Here my configure options: ./configure \ --prefix=/usr/local \ --with-cgiurl=/nagios/cgi-bin \ --with-nagios-user=nagios \ --with-nagios-grp=nagios \ --with-mysql=/usr/local/lib \ --with-openssl=/usr/local/lib \ the mysql lib's under /usr/local/lib are: ... libmysqlclient.a -rwxr-xr-x 1 root root 652 Jul 12 15:01 libmysqlclient.la -rw-r--r-- 1 root root 200402 Jul 12 15:01 libmysqlclient_r.a -rwxr-xr-x 1 root root 678 Jul 12 15:01 libmysqlclient_r.la ... I have testet it also with shared object files of mysqllibs. The older version (beta1) of check_mysql works but not the beta2 version! My system is a linux 2.2.19 and the mysql version is a 3.23.47 - 3.23.51. The ldd says: ldd check_mysql libz.so.1 => /usr/lib/libz.so.1 (0x2aac2000) libc.so.6 => /lib/libc.so.6 (0x2aad1000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x2aaab000) whats wrong? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=652816&group_id=29880 From renders at cknxradio.com Thu Dec 12 11:08:05 2002 From: renders at cknxradio.com (Rob Enders) Date: Thu Dec 12 11:08:05 2002 Subject: [Nagiosplug-devel] DAC plugin idea In-Reply-To: Message-ID: Hi everyone.. I have had great success using the joystick button plugin that I created a couple of years ago using a standard joystick port and a couple of utilities. http://www.netsaint.org/docs/hacks/joyd.php Lately, I am finding that I need more than the 8 inputs available on two game ports. I have been looking around for hardware/software that would permit significantly more inputs and perhaps even some digital outputs or some analog inputs/outputs. I have come up with the following that is not tooooo expensive, under $200Canadian. Velleman has a electronics kit called the K8000 which is an i2c interface to 16 digital inputs/outputs, 8 analog 8 bit outputs, 1 analog 16bit output and 4 analog 16 bit inputs. One can add up to 3 more cards. These kits are available at most electronic kits sources, ie. Jameco. Keep in mind that assembly is required. There appears to be quite a bit of Linux support for this hardware. http://groups.yahoo.com/group/k8000. In addition, I have found some GPL software called KEL - K8000 Event Language and is found at http://perso.wanadoo.fr/2oo2/. I hope to implement this as a standalone system that will work as a passive service check with Nagios. Am have trouble with a segmentation fault when testing on Redhat 7.0 but I remain optimistic that this will work as I hope. I encourage anyone interested to check out the links and let us know via this list on how you are making out.. Thanks Rob Enders CKNX Radio PS Keep up the good work, Ethan.. From sghosh at sghosh.org Thu Dec 12 11:32:06 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Thu Dec 12 11:32:06 2002 Subject: [Nagiosplug-devel] check_nwstat Plugin Modification In-Reply-To: Message-ID: On Tue, 10 Dec 2002, Stephen Lomond wrote: > I have modified the check_nwstat to determine if time is in sync on the > servers. What process should I follow to get this minor modification put > into the next release of this plugin? > > Post the patch (preferably against latest release or current CVS) to the list and/or to Sourceforge. Thanks -sg -- From sghosh at sghosh.org Thu Dec 12 11:48:07 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Thu Dec 12 11:48:07 2002 Subject: [Nagiosplug-devel] check_mysql cmd args fixed In-Reply-To: Message-ID: Sorry I haven't had a chance to review the patch, but yes - the arguments should all have options... About the replication - post to the list, or sourceforge. Also mwitte had posted a check_mysqlslave tarball in October/Novemeber (perl script to look at replication...) -sg On Tue, 10 Dec 2002, Dave Viner wrote: > Hi all, > Now that some of my cohorts have gotten this working, they are developing a > check test to verify the status of mysql replication. Should I submit the > code to this list or would it be easier for me to become a committer for > this project? > > Also, has anyone had a chance to review my earlier patch to check_mysql? > Not a big deal, just a minor annoyance that is fixed. > > thanks > > dave > > > -----Original Message----- > From: nagiosplug-devel-admin at lists.sourceforge.net > [mailto:nagiosplug-devel-admin at lists.sourceforge.net]On Behalf Of Dave > Viner > Sent: Monday, December 09, 2002 3:02 PM > To: Nagiosplug-devel at lists.sourceforge.net > Subject: [Nagiosplug-devel] check_mysql cmd args fixed > > > Hi, > I just downloaded and compiled the awesome plugins for Nagios from > sourceforge. However, whenever I run check_mysql I get a coredump. After > closer examinination, I discovered that there is a subtle error in the > processing of arguments from the command line. I've attached a small patch > file which fixes this problem. Essentially, this patch allows a user to > specify the host, user, password, database, and port in the arguments (but > not in the options). I believe this is the intent of the code that is there > now. This patch means that these two commands are identical: > > ./check_mysql -H myhost.example.com -u myuser -p mypass -d mytbl -P 3306 > ./check_mysql myhost.example.com myuser mypass mytbl 3306 > > dave. > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: > With Great Power, Comes Great Responsibility > Learn to use your power at OSDN's High Performance Computing Channel > http://hpc.devchannel.org/ > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > -- From karl at debisschop.net Fri Dec 13 04:50:03 2002 From: karl at debisschop.net (Karl DeBisschop) Date: Fri Dec 13 04:50:03 2002 Subject: [Nagiosplug-devel] RFC: netutils.c function change In-Reply-To: <20021211022738.GA23839@UnderGrid.net> References: <20021211022738.GA23839@UnderGrid.net> Message-ID: <1039783666.7595.10.camel@toaster> On Tue, 2002-12-10 at 21:27, Jeremy T. Bouse wrote: > Just wanted to get some thought on a chance in the code that I > would see as helpful and personally would move towards... In netutils.c > there are functions which pass the "proto" parameter around and usually > it's set to either "udp" or "tcp"... Likewise in the functions there are > strcmp or strcasecmp calls to check which it is... My thought would be > to change the "proto" parameter from 'char *' to 'int' and then use the > IPPROTO_TCP and IPPROTO_UDP defined in netinet/in.h. This makes > conditions easier to test for and also makes the code cleaner... I've > actually patched my local working directory to do this and it works > really nicely and has less SEGV issues when relating to the proto > parameter... I assume that IPPROTO_TCP and IPPROTO_UDP are POSIX-specified and have been for some time? If they are in POSIX, in addition to generally available, I would generally strongly advocate their use. Thus a patch would be likely to go in quickly. If not in POSIX, I'd want to do more investigation. > I've been doing some general code clean-up and this would be > included in a diff but I'll wait to see what of my previous patch is > accepted before building another one to include these changes... If > someone wants to take a second look at what I have I can try and work > out a patch that applies only to this and submit it... I would suggest that waitng is the lesser amount of work for you. I'm quite enthusiastic about your earlier patch, but where I just moved I've had serious connectivity issues that have slowed my looking at it. But it sounds like good thoughtful work, and I hope we can include it very quickly. -- Karl DeBisschop From Jeremy.Bouse at UnderGrid.net Fri Dec 13 06:36:03 2002 From: Jeremy.Bouse at UnderGrid.net (Jeremy T. Bouse) Date: Fri Dec 13 06:36:03 2002 Subject: [Nagiosplug-devel] RFC: netutils.c function change In-Reply-To: <1039783666.7595.10.camel@toaster> References: <20021211022738.GA23839@UnderGrid.net> <1039783666.7595.10.camel@toaster> Message-ID: <20021213143401.GA13303@UnderGrid.net> On Fri, Dec 13, 2002 at 07:47:46AM -0500, Karl DeBisschop wrote: > I assume that IPPROTO_TCP and IPPROTO_UDP are POSIX-specified and have > been for some time? > > If they are in POSIX, in addition to generally available, I would > generally strongly advocate their use. Thus a patch would be likely to > go in quickly. > > If not in POSIX, I'd want to do more investigation. > I'm checking on it's POSIX status... I am able to confirm it is part of netinet/in.h on FreeBSD, Linux and Solaris 9... I couldn't reach the OpenBSD build machine in my cubicle at work from home as it gets it's IP via DHCP... Main reason I actually went ahead to make the change in my code and test it was because I was getting random segmentation faults when proto being declared as char *... Some functions calls to getprotobyname() were receiving the SEGV while others weren't... Also by using the IPPROTO_* defines being integers it makes conditions easier as you don't need to use strcmp or strcasecmp to test... I'll see what more I can find on it being POSIX or not... > I would suggest that waitng is the lesser amount of work for you. I'm > quite enthusiastic about your earlier patch, but where I just moved I've > had serious connectivity issues that have slowed my looking at it. But > it sounds like good thoughtful work, and I hope we can include it very > quickly. > Thank you, I've been working out of the CVS code base since around early November to get the plugins to support IPv6 as we need to be able to monitor our growing IPv6 network at work... So I'm making the migration from netsaint to nagios and doing the porting work to make it independent of protocol... The nice side affect was getting around the inet_aton() issue on Solaris as the method which I used to modify it is portable on all platforms that I can tell... Most of the notes I used on porting came from a KAME document... Jeremy From Jeremy.Bouse at UnderGrid.net Fri Dec 13 09:40:01 2002 From: Jeremy.Bouse at UnderGrid.net (Jeremy T. Bouse) Date: Fri Dec 13 09:40:01 2002 Subject: [Nagiosplug-devel] RFC: netutils.c function change In-Reply-To: <1039783666.7595.10.camel@toaster> References: <20021211022738.GA23839@UnderGrid.net> <1039783666.7595.10.camel@toaster> Message-ID: <20021213173733.GA16103@UnderGrid.net> In direct reply regarding POSIX compliance I've been digging around this morning since I got into work... I can verify that the IPPROTO_ prefix is in use on OpenBSD as well as FreeBSD, Linux and Solaris as I had mentioned in an earlier post I made before leaving home for work... What I found was that the IPPROTO_ prefix was in fact mentioned in the POSIX 1003.1-2001 Draft[1] index as the document itself is not freely available and in RFC2133, obsoleted by RFC2553[2], which describes the IPPROTO_ prefix use in addrinfo structure as: The addrinfo structure is defined as a result of including the header. struct addrinfo { int ai_flags; /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */ int ai_family; /* PF_xxx */ int ai_socktype; /* SOCK_xxx */ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ size_t ai_addrlen; /* length of ai_addr */ char *ai_canonname; /* canonical name for nodename */ struct sockaddr *ai_addr; /* binary address */ struct addrinfo *ai_next; /* next structure in linked list */ }; on page 26 of the document under Section 6.4 Protocol-Independent Nodename and Service Name Translation . If you look into the patch[3] I produced against netutils.c where these changes would need to take place it is used with getaddrinfo() to set the hints structure. So yes I believe this is POSIX compliant. The other AF-independent code changes have been modeled after documentation available[4] by Jun-ichiro itojun Itoh of the KAME Project. Jeremy [1]http://std.dkuug.dk/jtc1/sc22/open/n3232/xshindex.pdf [2]ftp://ftp.rfc-editor.org/in-notes/rfc2553.txt [3]http://sourceforge.net/tracker/download.php?group_id=29880&atid=397599&file_id=37324&aid=651617 [4]http://www.kame.net/newsletter/19980604/ On Fri, Dec 13, 2002 at 07:47:46AM -0500, Karl DeBisschop wrote: > I assume that IPPROTO_TCP and IPPROTO_UDP are POSIX-specified and have > been for some time? > > If they are in POSIX, in addition to generally available, I would > generally strongly advocate their use. Thus a patch would be likely to > go in quickly. > > If not in POSIX, I'd want to do more investigation. > From p.miquet at hafiba.fr Fri Dec 13 11:25:04 2002 From: p.miquet at hafiba.fr (Pascal Miquet) Date: Fri Dec 13 11:25:04 2002 Subject: [Nagiosplug-devel] Somes rules to respect Message-ID: <1039807407.4785.16.camel@moishe> Hi, I've discovered using the check_snmp plugin that some test seems to be not implemented. Using the check_disk, if you set some bad values from warning to critical, the check is not performed and an error is issued. Into the snmp plugin if I set -c 10 -w 60, the check is made... BUT the critical value should be greater than the warning ... Is there a specific rule, or should it be set correctly by user ? Regards Pascal Miquet From Jeremy.Bouse at UnderGrid.net Fri Dec 13 20:38:02 2002 From: Jeremy.Bouse at UnderGrid.net (Jeremy T. Bouse) Date: Fri Dec 13 20:38:02 2002 Subject: [Nagiosplug-devel] check_ssh.c update Message-ID: <20021214043626.GA25992@UnderGrid.net> I'm in the process of trying to make a diff of check_ssh.c that removes the need for ssh_resolve() and uses my_tcp_connect() from netutils.c to handle the connection code to create the socket... I cleaned up the sscanf() call and have it checking the hostname given on command line using is_host() prior to trying to connect... This patch can be applied without my other AF-independent code although once the patch to netutils.* and utils.* it will allow check_ssh to handle IPv6 hosts along with IPv4... I'll have it posted on the patches page shortly... Jeremy From Jeremy.Bouse at UnderGrid.net Fri Dec 13 20:58:03 2002 From: Jeremy.Bouse at UnderGrid.net (Jeremy T. Bouse) Date: Fri Dec 13 20:58:03 2002 Subject: [Nagiosplug-devel] Would appreciate some configure.in help Message-ID: <20021214045602.GA26323@UnderGrid.net> Attached is a small patch to configure.in that I've done to add a --with-ping6-command option similar to the already existing --with-ping-command... My problem is I'm not that great at actually generating the configure.in so I know this prolly is not too portable at this time... This is in my work to get IPv6 support and with check_ping it needs to know how to call the ping command for IPv6... The situation I ran into was that in Linux I have a /usr/sbin/ping6 that handles IPv6 pings where /usr/sbin/ping only supports IPv4... However on my Solaris 9 build machine it uses /usr/sbin/ping for both IPv6 and IPv4, you just give it the "-A inet6" option for IPv6 otherwise it uses IPv4 by default... What I have in this patch does not work for the Solaris solution but works fine for Linux... I would think the ideal solution I feel would be to have plugins avoid calling system commands at all as check_ping, check_dns and check_dig all suffer from similar issues because the call ping, nslookup and dig through system calls respectively... However until the time can be taken to make a better solution I'm working with what we have as a base... Jeremy -------------- next part -------------- Index: configure.in =================================================================== RCS file: /cvsroot/nagiosplug/nagiosplug/configure.in,v retrieving revision 1.29 diff -u -r1.29 configure.in --- configure.in 22 Nov 2002 02:46:49 -0000 1.29 +++ configure.in 14 Dec 2002 04:44:15 -0000 @@ -703,6 +703,57 @@ fi AC_DEFINE_UNQUOTED(PING_COMMAND,"$PING_COMMAND",[path and args for ping command]) +AC_PATH_PROG(PATH_TO_PING6,ping6) + +AC_ARG_WITH(ping6_command,--with-ping6-command= sets syntax for ping,PING6_COMMAND=$withval) +if test -n "$PING6_COMMAND" +then + echo " ping6 syntax... (command-line) $PING6_COMMAND" + if test -n "$PING6_PACKETS_FIRST" + then + AC_DEFINE_UNQUOTED(PING6_PACKETS_FIRST,"$PING6_COMMAND",[Define if packet count must precede host]) + fi +elif [ping6 -n -U -c 1 ::1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] +then + PING6_COMMAND="$PATH_TO_PING6 -n -U -c %d %s" + AC_DEFINE_UNQUOTED(PING6_PACKETS_FIRST,"$PING6_COMMAND",[Define if packet count must precede host]) + echo " ping6 syntax... $PATH_TO_PING6 -n -U -c " +elif [ping6 -n -c 1 ::1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] +then + PING6_COMMAND="$PATH_TO_PING6 -n -c %d %s" + AC_DEFINE_UNQUOTED(PING6_PACKETS_FIRST,"$PING6_COMMAND",[Define if packet count must precede host]) + echo " ping6 syntax... $PATH_TO_PING6 -n -c " +elif [ping6 -n ::1 -c 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] +then + PING6_COMMAND="$PATH_TO_PING6 -n %s -c %d" + echo " ping6 syntax... $PATH_TO_PING6 -n -c " +elif [ping6 ::1 -n 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] +then + PING6_COMMAND="$PATH_TO_PING6 %s -n %d" + echo " ping6 syntax... $PATH_TO_PING6 -n " +elif [ping6 -n -s ::1 56 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] +then + PING6_COMMAND="$PATH_TO_PING6 -n -s %s 56 %d" + echo " ping6 syntax... $PATH_TO_PING6 -n -s 56 " +elif [ping6 -n -h ::1 -s 56 -c 1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] +then + PING6_COMMAND="$PATH_TO_PING6 -n -h %s -s 56 -c %d" + echo " ping6 syntax... $PATH_TO_PING6 -n -h -s 56 -c " +elif [ping6 -n -s 56 -c 1 ::1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] +then + PING6_COMMAND="$PATH_TO_PING6 -n -s 56 -c %d %s" + AC_DEFINE_UNQUOTED(PING6_PACKETS_FIRST,"$PING6_COMMAND",[Define if packet count must precede host]) + echo " ping6 syntax... $PATH_TO_PING6 -n -s 56 -c " +elif [ping6 -n -c 1 ::1 2>/dev/null | egrep -i "^round-trip|^rtt" >/dev/null] +then + PING6_COMMAND="$PATH_TO_PING6 -n -c %d %s" + AC_DEFINE_UNQUOTED(PING6_PACKETS_FIRST,"$PING6_COMMAND",[Define if packet count must precede host]) + echo " ping6 syntax... $PATH_TO_PING6 -n -c " +else + AC_MSG_WARN("unable to find usable ping6 syntax") +fi +AC_DEFINE_UNQUOTED(PING6_COMMAND,"$PING6_COMMAND",[path and args for ping command]) + AC_PATH_PROG(PATH_TO_NSLOOKUP,nslookup) if test -n "$ac_cv_path_PATH_TO_NSLOOKUP" then From Brian.Ipsen at andebakken.dk Sat Dec 14 07:41:02 2002 From: Brian.Ipsen at andebakken.dk (Brian Ipsen) Date: Sat Dec 14 07:41:02 2002 Subject: [Nagiosplug-devel] check-ide_smart plugin ? Message-ID: Hi! Browsing through the CVS repository I noticed the check_ide-smart plugin. Any perticular reason for it not to be included in the "standard" distribution of plugins ?? I have tried to compile it, and maybe I'm doing something basically wrong, because I cannot get it to perform a "quiet" check.. Might be something with the getopt() call. I compiled it using: gcc -O3 -march=i686 -mcpu=i686 -funroll-loops -o check_ide-smart check_ide-smart.o -lutil Anyone ?? /Brian From noreply at sourceforge.net Sun Dec 15 09:43:03 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Sun Dec 15 09:43:03 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-653592 ] check_ssh update to revision 1.3 Message-ID: Patches item #653592, was opened at 2002-12-13 20:40 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=653592&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jeremy T. Bouse (undrgrid) Assigned to: Nobody/Anonymous (nobody) Summary: check_ssh update to revision 1.3 Initial Comment: This patch cleans up check_ssh to use the connection code from netutils.c and utils.c rather to keep in line with the rest of the plugins. See my post on the nagiosplug-devel list for more insight into it although it should be fairly self-evident. Jeremy ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=653592&group_id=29880 From noreply at sourceforge.net Sun Dec 15 09:43:03 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Sun Dec 15 09:43:03 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-654009 ] check_ftp seg fault Message-ID: Patches item #654009, was opened at 2002-12-14 23:46 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=654009&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: check_ftp seg fault Initial Comment: using check_ftp gives me a seg fault (after appearing to work) However check_tcp seems to work fine. What gives? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=654009&group_id=29880 From dviner at yahoo-inc.com Mon Dec 16 20:35:05 2002 From: dviner at yahoo-inc.com (Dave Viner) Date: Mon Dec 16 20:35:05 2002 Subject: [Nagiosplug-devel] check_mysql_replication program Message-ID: Here's a little plugin that checks the status of MySQL replication between a master and a slave MySQL db. I've tried it with both version 3 and version 4 instances of MySQL, and as far as I can tell it works properly. I'm attaching the code itself, and the patch file which adds it to the configure.in and the plugins/Makefile.am. Please let me know what you think of it. I think its pretty cool and useful, especially since the current check_mysql doesn't handle replication. What do you think ? Thanks Dave Viner -------------- next part -------------- A non-text attachment was scrubbed... Name: check_mysql_replication.c Type: application/octet-stream Size: 11019 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: check_mysql_replication.patch Type: application/octet-stream Size: 2571 bytes Desc: not available URL: From rhys at ananzi.co.za Tue Dec 17 06:05:02 2002 From: rhys at ananzi.co.za (Rhys McWilliams) Date: Tue Dec 17 06:05:02 2002 Subject: [Nagiosplug-devel] check_ntp plugin Message-ID: <200212171403.gBHE3VcA032483@ibhubesi.kcc.co.za> Hi, I have recently downloaded Nagios and am busy configuring it to monitor my network. I must say that so far I am extremely impressed with Nagios, excellent utility. However, I have just run into one minor problem with the check_ntp plugin. It seems that the plugin does not like the underscore character in the hostname specified with the -H option. Am I just being stupid about this (I use the underscore in quite a few of my host names in the /etc/hosts)? If not, is there a chance of this being fixed? I see that the check_ntp plugin is a perl script. Unfortunately I'm not up to scratch on perl else I would try fix it myself. Thank you. Regards ------------------------ Rhys McWilliams Kerridge Computer Company Ltd. (S.A.) Johannesburg, South Africa Tel: +27 11 796 1000 Fax: +27 11 796 1100 http://www.kerridge.co.za/ mailto:rhys at kcc.co.za ********************************************************************* Disclaimer This e-mail transmission is confidential and intended solely for the person or organization to whom it is addressed. If you are not the intended recipient, you must not copy, distribute or disseminate the information, or take any action in reliance of it. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of any organization or employer. If you have received this message in error, do not open any attachment but please notify the sender (above) deleting this message >from your system. Please rely on your own virus check no responsibility is taken by the sender for any damage arising out of any bug or virus infection. ********************************************************************* From noreply at sourceforge.net Tue Dec 17 17:20:11 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Tue Dec 17 17:20:11 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-655268 ] check_real segmentation fault Message-ID: Bugs item #655268, was opened at 2002-12-17 16:38 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=655268&group_id=29880 Category: Argument proccessing Group: v1.0 (example) Status: Open Resolution: None Priority: 5 Submitted By: Kevin Geddie (klgeddie) Assigned to: Nobody/Anonymous (nobody) Summary: check_real segmentation fault Initial Comment: The check_real plugin does not work as distributed. The code attempts to check the server assigned to the host_name variable, but the host_name variable is never assigned a value. The following patch will fix the code: *** check_real.c Mon Dec 16 13:21:50 2002 --- check_real.c.orig Thu Nov 14 20:04:51 2002 *************** *** 400,413 **** int validate_arguments (void) { - int rc = OK; - - if ( server_address && *server_address ) - { - host_name = server_address; - } else { - rc = ERROR; - } return OK; } --- 400,405 ---- ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=655268&group_id=29880 From dviner at yahoo-inc.com Wed Dec 18 16:21:02 2002 From: dviner at yahoo-inc.com (Dave Viner) Date: Wed Dec 18 16:21:02 2002 Subject: [Nagiosplug-devel] check_mysql_replication program In-Reply-To: Message-ID: Hi, I took a look at the check_mysqlslave.pl script that's posted in Sourceforge. I think this C program has several important differences. First, it checks both MySQL v3 and v4 replication. Second, it checks that the mysql slave is up to date with relation to the master. (The threshold for determining "up to date" is passed as an argument.) Third, this check_mysql_replication is written in C and is not dependent upon the perl installation. How do we choose which one (if either) get added to the distribution? Thanks dave -----Original Message----- From: nagiosplug-devel-admin at lists.sourceforge.net [mailto:nagiosplug-devel-admin at lists.sourceforge.net]On Behalf Of Dave Viner Sent: Monday, December 16, 2002 8:34 PM To: nagiosplug-devel at lists.sourceforge.net Subject: [Nagiosplug-devel] check_mysql_replication program Here's a little plugin that checks the status of MySQL replication between a master and a slave MySQL db. I've tried it with both version 3 and version 4 instances of MySQL, and as far as I can tell it works properly. I'm attaching the code itself, and the patch file which adds it to the configure.in and the plugins/Makefile.am. Please let me know what you think of it. I think its pretty cool and useful, especially since the current check_mysql doesn't handle replication. What do you think ? Thanks Dave Viner From mario.witte at chengfu.net Wed Dec 18 16:21:03 2002 From: mario.witte at chengfu.net (Mario Witte) Date: Wed Dec 18 16:21:03 2002 Subject: [Nagiosplug-devel] Re: check_mysql_replication program In-Reply-To: References: Message-ID: <1040197333.886.15.camel@moehre> Dave Viner wrote: > Here's a little plugin that checks the status of MySQL replication between a > master and a slave MySQL db. I've tried it with both version 3 and version > 4 instances of MySQL, and as far as I can tell it works properly. I'm > attaching the code itself, and the patch file which adds it to the > configure.in and the plugins/Makefile.am. > > Please let me know what you think of it. I think its pretty cool and > useful, especially since the current check_mysql doesn't handle replication. > > What do you think ? Hello Dave, In fact I submitted a similar skript (which has worked fine for several months now) and an appropriate patch file several weeks ago. Until now nobody semms to have taken notice, but it can be found in the bug tracker: http://sourceforge.net/tracker/index.php?func=detail&aid=619255&group_id=29880&atid=397599 Hopefully somebody will integrate one of our two solutions into the next release. Bye, -- Mario Witte | | http://www.chengfu.net/ GnuPG fingerprint = 1C46 FF8F 661F 69B6 410E 9B1B 1EA5 6B20 BD30 AEA3 User error; replace user and press any key to continue. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From nixon at nsc.liu.se Wed Dec 18 16:21:03 2002 From: nixon at nsc.liu.se (Leif Nixon) Date: Wed Dec 18 16:21:03 2002 Subject: [Nagiosplug-devel] check_ntp plugin In-Reply-To: <200212171403.gBHE3VcA032483@ibhubesi.kcc.co.za> References: <200212171403.gBHE3VcA032483@ibhubesi.kcc.co.za> Message-ID: Rhys McWilliams writes: > However, I have just run into one minor problem with the check_ntp plugin. > It seems that the plugin does not like the underscore character in the > hostname specified with the -H option. > > Am I just being stupid about this (I use the underscore in quite a few of my > host names in the /etc/hosts)? > If not, is there a chance of this being fixed? Underscores are illegal in DNS, so it is generally not a good idea to use underscores in hostnames. Anyway, Nagios should give the host IP to the plugin, not the hostname, shouldn't it? -- Leif Nixon Systems expert ------------------------------------------------------------ National Supercomputer Centre Linkoping University ------------------------------------------------------------ From daniel.geske at yoc.de Wed Dec 18 16:21:04 2002 From: daniel.geske at yoc.de (Daniel Geske) Date: Wed Dec 18 16:21:04 2002 Subject: [Nagiosplug-devel] check_mysql cmd args fixed In-Reply-To: Message-ID: Hi all, I think this patch should be added to the cvs, as it fixes my problem with the command exiting with a segmentation fault instead of a test result. Thank you Dave! Greetings Daniel -----Original Message----- From: nagiosplug-devel-admin at lists.sourceforge.net [mailto:nagiosplug-devel-admin at lists.sourceforge.net]On Behalf Of Dave Viner Sent: Tuesday, December 10, 2002 12:02 AM To: Nagiosplug-devel at lists.sourceforge.net Subject: [Nagiosplug-devel] check_mysql cmd args fixed Hi, I just downloaded and compiled the awesome plugins for Nagios from sourceforge. However, whenever I run check_mysql I get a coredump. After closer examinination, I discovered that there is a subtle error in the processing of arguments from the command line. I've attached a small patch file which fixes this problem. Essentially, this patch allows a user to specify the host, user, password, database, and port in the arguments (but not in the options). I believe this is the intent of the code that is there now. This patch means that these two commands are identical: ./check_mysql -H myhost.example.com -u myuser -p mypass -d mytbl -P 3306 ./check_mysql myhost.example.com myuser mypass mytbl 3306 dave. From nagios at cerbernet.co.uk Wed Dec 18 16:21:04 2002 From: nagios at cerbernet.co.uk (Tony) Date: Wed Dec 18 16:21:04 2002 Subject: [Nagiosplug-devel] Automatic Re-enbling Notifications Message-ID: <008901c2a68f$c69dce00$f81fc3c1@TONYS> Hi all I was trying to find out if there is a way of getting Nagios to automatically re-enabling notifications of a check for a host/service when Nagios finds the host/service is back up? When a problem occurs on our network and it is passed to an engineer to fix we would disable notifications of the check but still let Nagios run the checks. When the problem is fixed the engineer would phone to let us know only so we could re-enable the notifications, it would be better if Nagios would re-enable the notifications itself. Has anyone written anything to do this? TIA Tony _______________________________ From pkrzystofiak at endeavors.com Wed Dec 18 16:21:04 2002 From: pkrzystofiak at endeavors.com (Peter Krzystofiak) Date: Wed Dec 18 16:21:04 2002 Subject: [Nagiosplug-devel] check_http is flakey / doesn't work all the time Message-ID: <53109A46D4F58F458B18D009EAEEDC830E6331@mail.endeavorstech.com> Hello all, My check_http plugin is flakey. For example if yahoo.com is up and I run a check_http against it, Nagios will state that it is not online and I will receive an Error recv() message. Other times, the plugin works just fine. Is there a source update, or a fix for this. Has anyone else experienced this or have a solution to get around this problem? Thanks, Peter K. From noreply at sourceforge.net Wed Dec 18 16:21:05 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Wed Dec 18 16:21:05 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Support Requests-655903 ] check_mysql segfault on RH7.3 Message-ID: Support Requests item #655903, was opened at 2002-12-18 10:41 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=655903&group_id=29880 Category: None Group: None Status: Open Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: check_mysql segfault on RH7.3 Initial Comment: Check_mysql causes Segmentation fault on RH 7.3. I've tried both tar.gz and rpm - it is all the same. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=655903&group_id=29880 From pkrzystofiak at endeavors.com Wed Dec 18 16:21:05 2002 From: pkrzystofiak at endeavors.com (Peter Krzystofiak) Date: Wed Dec 18 16:21:05 2002 Subject: [Nagiosplug-devel] compiling check_http Message-ID: <53109A46D4F58F458B18D009EAEEDC830E6339@mail.endeavorstech.com> I modified the check_http.c code. How exactly do I compile this? Thanks, Peter From russell at quadrix.com Wed Dec 18 16:21:06 2002 From: russell at quadrix.com (Russell Scibetti) Date: Wed Dec 18 16:21:06 2002 Subject: [Nagiosplug-devel] check_tcp bug Message-ID: <3E00FF1A.6090007@quadrix.com> I've noticed two small problems with the check_tcp plugin (nagiosplug 1.3b2) that prevent it from doing its proper default expect string checking (i.e - if you are running check_smtp, by default you expect a "220" return, etc). First, the expect value for check_pop (and check_spop) is incorrect. The expect is set to "110", which is just the port for POP. This never actually gets returned when to do a tcp connect to POP. What you need to get back to know that POP is working is "+OK". Secondly, there is a bug in that, unless the user gives uses the -e argument, none of the default expects will every be checked. Here is a piece of the check_tcp code: /* use default expect if none listed in process_arguments() */ if (EXPECT && server_expect_count == 0) { ! server_expect = malloc (1); server_expect[server_expect_count - 1] = EXPECT; } Well, unless you are doing a check_nntp or the user gave a -e , the value of server_expect_count going into this is 0. So server_expect[-1] is being stored and server_expect_count doesn't get set to 1 anywhere. So later, when the code decides if it needs to check against any expect strings, it sees that server_expect_count = 0, and doesn't do any comparisons. The way around this is: /* use default expect if none listed in process_arguments() */ if (EXPECT && server_expect_count == 0) { ! server_expect = malloc (++server_expect_count); server_expect[server_expect_count - 1] = EXPECT; } Now, server_expect_count is increased to 1 and the value is stored in server_expect[0]. This will actually make check_tcp check the default expect values. If you compare, this looks just like the section of code where you set a user-defined expect string. I have included a context diff that can be used as a patch. If you have any questions, just email me back. Thanks. -Russell Scibetti -- Russell Scibetti Quadrix Solutions, Inc. http://www.quadrix.com (732) 235-2335, ext. 7038 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: checktcp-diff.patch URL: From Jeremy.Bouse at UnderGrid.net Wed Dec 18 18:20:03 2002 From: Jeremy.Bouse at UnderGrid.net (Jeremy T. Bouse) Date: Wed Dec 18 18:20:03 2002 Subject: [Nagiosplug-devel] check_ntp plugin In-Reply-To: References: <200212171403.gBHE3VcA032483@ibhubesi.kcc.co.za> Message-ID: <20021219021811.GA3201@UnderGrid.net> On Wed, Dec 18, 2002 at 11:21:26AM +0100, Leif Nixon wrote: > Rhys McWilliams writes: > > > However, I have just run into one minor problem with the check_ntp plugin. > > It seems that the plugin does not like the underscore character in the > > hostname specified with the -H option. > > > > Am I just being stupid about this (I use the underscore in quite a few of my > > host names in the /etc/hosts)? > > If not, is there a chance of this being fixed? > > Underscores are illegal in DNS, so it is generally not a good idea > to use underscores in hostnames. > > Anyway, Nagios should give the host IP to the plugin, not the > hostname, shouldn't it? > I was gonna make the comment that underscores are illegal in DNS but figured someone else would do so as well... As for whether the plugin is given the IP or the hostname depends on how you declare your hosts in the configuration... If you give it a hostname it will try to check the hostname, while if you give it an IP address it takes it as the literal address... I really worked on this in my AF-independent code as it would add interesting side effects... If you gave it an IPv4 address it was obvious which protocol to use; likewise if you gave it an IPv6 address it would know which protocol you were using... The fun began if you gave it a hostname which could be either IPv4 only, IPv6 only or both IPv4 and IPv6... Jeremy From alexander.haderer at charite.de Thu Dec 19 03:16:02 2002 From: alexander.haderer at charite.de (Alexander Haderer) Date: Thu Dec 19 03:16:02 2002 Subject: [Nagiosplug-devel] patch: update for fetchlog in contrib Message-ID: <5.1.0.14.1.20021218173802.01bde0e0@postamt1.charite.de> hi, I have written fetchlog, a tool for monitoring local or remote logfiles. fetchlog is part of the contrib tarballs in the nagios plugins 1.3.0-beta2. Meanwhile I fixed some bugs in fetchlog and updated the docs (Netsaint --> Nagios). Please find attached two files: 1. readme.patch A patch for readme.txt in the contrib dir. This patch is for version 1.3.0-beta2. This patch was made using "diff -U 3 oldfile newfile" 2. fetchlog-0.94.tar.gz These new sources replace the old version fetchlog-0.92.tar.gz found in contrib/tarballs. With best regards Alexander Haderer -------------- next part -------------- A non-text attachment was scrubbed... Name: fetchlog-0.94.tar.gz Type: application/octet-stream Size: 23179 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: readme.patch Type: application/octet-stream Size: 937 bytes Desc: not available URL: -------------- next part -------------- -- Alexander Haderer Charite Berlin - Germany From alexander.haderer at charite.de Thu Dec 19 03:27:02 2002 From: alexander.haderer at charite.de (Alexander Haderer) Date: Thu Dec 19 03:27:02 2002 Subject: [Nagiosplug-devel] patch: update for fetchlog in contrib (2nd) Message-ID: <5.1.0.14.1.20021219122102.01bcbeb0@postamt1.charite.de> hi, Sorry for mailing binaries into this list. This was done by accident, my previous mail was ment to go to Subhendu Ghosh directly. with best regards, Alexander Haderer -- Alexander Haderer Charite Berlin - Germany From mat at avedya.com Thu Dec 19 03:42:03 2002 From: mat at avedya.com (Matthieu Parisot) Date: Thu Dec 19 03:42:03 2002 Subject: [Nagiosplug-devel] Plugin proposal Message-ID: Hi list, Attached is a small python plugin which allows to create what I call "metaservices"; A metaservice is a service which status is determined by the status of other services. For exemple, imagining that you have 2 DNS (DNS1 and DNS2), you can say: [DNS] critical=((DNS1 == CRITICAL)and(DNS2 == CRITICAL)) warning =((DNS1 != OK)or(DNS2 != OK)) ok=((DNS1 == OK) and (DNS2 == OK)) For now it's only dedicated to services, but if I see any interest in that plugin, I'll be glad to enhance it... If you can have a look to it and tell me if it's good enough to be incorporated in the standard plugin distribution; Best regards, Matthieu -------------- next part -------------- A non-text attachment was scrubbed... Name: check_meta.tgz Type: application/x-compressed Size: 3327 bytes Desc: not available URL: From sz at bytecamp.net Thu Dec 19 05:15:03 2002 From: sz at bytecamp.net (Sirko Zidlewitz) Date: Thu Dec 19 05:15:03 2002 Subject: [Nagiosplug-devel] another SNMP plugin in perl Message-ID: <20021219131319.GC9879@kallisti.bytecamp.net> Hi, I've seen too late there is already a snmp plugin for nagios. So, here is another one, this time in perl. http://www.bytecamp.net/download/check_snmp_load.pl -- ../7\.. bytecamp GmbH / Sirko Zidlewitz Magdeburger Str. 15, 14770 Brandenburg a.d. Havel tel +49 3381 3159052 (Mo-Fr 13-17 Uhr), fax +49 3381 3358018 mail sz at bytecamp.net, web http://bytecamp.net/ From jbuehler at hekimian.com Thu Dec 19 06:13:04 2002 From: jbuehler at hekimian.com (Joe Buehler) Date: Thu Dec 19 06:13:04 2002 Subject: [Nagiosplug-devel] patches for HPUX for plugins 1.3.0 beta2 Message-ID: <3E01D3B3.8030103@hekimian.com> I ran into two problems under HPUX 10/11 with the 1.3.0 beta2 plugins just downloaded from the net: 1. The output of df is not all on one line if the /dev device name is long. My patch is quick and dirty and should be made a little more robust. 2. The configure check for "swapinfo" is not correct -- "swapinfo -k" returns a usage message that includes the word "disk" so configure thinks that "swapinfo -k" is the way to go and it is not -- "swapinfo -d" is correct for HPUX. The patch just moves the "swapinfo -d" test before the "swapinfo -k" test (though that's not obvious by looking at it!). As far as df goes, it is not very portable -- output format varies between systems. The author of check_disk might look at the "di" utility on the net, which is a portable df replacement. The code could probably be integrated into the plugin -- license allowing. Another comment -- there is a /bin/sh 'some command' invocation below. I don't think this is portable. The way to do it is /bin/sh -c 'some command'. -- Joe Buehler --- plugins/check_disk.c Mon Nov 18 02:23:15 2002 +++ plugins/check_disk.c Wed Dec 18 16:29:54 2002 @@ -70,6 +70,7 @@ char mntp[MAX_INPUT_BUFFER] = ""; char outbuf[MAX_INPUT_BUFFER] = ""; char *output = ""; + int start = 0; if (process_arguments (argc, argv) != OK) usage ("Could not parse arguments\n"); @@ -90,10 +91,18 @@ printf ("Could not open stderr for %s\n", command_line); } - while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_process)) { + while (fgets (input_buffer+start, MAX_INPUT_BUFFER - 1 - start, child_process)) { if (!index (input_buffer, '/')) continue; + + if (!index (input_buffer, ' ')) { + start = strlen(input_buffer); + while (start > 0 && input_buffer[start - 1] == '\n') { + --start; + } + continue; + } if (sscanf (input_buffer, "%s %d %d %d %d%% %s", file_system, &total_disk, --- configure Fri Nov 22 05:26:29 2002 +++ configure Wed Dec 18 15:53:16 2002 @@ -6645,9 +6645,8 @@ echo " using Solaris format" fi EXTRAS="$EXTRAS check_swap" -elif swapinfo -k 2>&1 | egrep -i "Device" >/dev/null +elif swapinfo -d 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null then - echo "found swapinfo command" cat >> confdefs.h <<\EOF #define HAVE_SWAP 1 EOF @@ -6655,7 +6654,7 @@ # Extract the first word of "swapinfo", so it can be a program name with args. set dummy swapinfo; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6659: checking for $ac_word" >&5 +echo "configure:6713: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PATH_TO_SWAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6688,20 +6687,17 @@ fi cat >> confdefs.h </dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null - then - cat >> confdefs.h <> confdefs.h </dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null + echo " using HP-UX format HP-UX" +elif swapinfo -k 2>&1 | egrep -i "Device" >/dev/null then + echo "found swapinfo command" cat >> confdefs.h <<\EOF #define HAVE_SWAP 1 EOF @@ -6709,7 +6705,7 @@ # Extract the first word of "swapinfo", so it can be a program name with args. set dummy swapinfo; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:6713: checking for $ac_word" >&5 +echo "configure:6659: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PATH_TO_SWAP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -6742,14 +6738,18 @@ fi cat >> confdefs.h <> confdefs.h </dev/null | egrep -i "^Device +1K-blocks +Used +Avail" >/dev/null + then + cat >> confdefs.h < The attached patch was necessary for nagios 1.0 -- AIX 4.3.3 machines use type 22 for PPP links. Joe Buehler --- check_ifstatus.~1~ Tue Dec 17 10:04:04 2002 +++ check_ifstatus Tue Dec 17 14:59:49 2002 @@ -188,6 +188,7 @@ if ($ifStatus{$key}{$snmpIfAdminStatus} == 1 ) { # check only if interface is not of type 23 aka PPP interface if ($ifStatus{$key}{$snmpIfType} != 23 ) { + if ($ifStatus{$key}{$snmpIfType} != 22 ) { if ($ifStatus{$key}{$snmpIfOperStatus} == 1 ) { $ifup++ ;} if ($ifStatus{$key}{$snmpIfOperStatus} == 2 ) { $ifdown++ ; @@ -197,6 +198,7 @@ } if ($ifStatus{$key}{$snmpIfOperStatus} == 5 ) { $ifdormant++ ;} } + } } @@ -217,6 +219,7 @@ $ifdown, $ifdormant); } +} print ("$state: $answer"); exit $ERRORS{$state}; From mario.witte at chengfu.net Thu Dec 19 10:07:02 2002 From: mario.witte at chengfu.net (Mario Witte) Date: Thu Dec 19 10:07:02 2002 Subject: [Nagiosplug-devel] check_mysql_replication program In-Reply-To: References: Message-ID: <1040321155.30626.4.camel@moehre> > I took a look at the check_mysqlslave.pl script that's posted in > Sourceforge. I think this C program has several important differences. > First, it checks both MySQL v3 and v4 replication. Second, it checks that > the mysql slave is up to date with relation to the master. (The threshold > for determining "up to date" is passed as an argument.) Third, this > check_mysql_replication is written in C and is not dependent upon the perl installation. > How do we choose which one (if either) get added to the distribution? The skript was my solution for the problem and it fitted quite fine because until now we only use Mysql 3. (And I must admit that I don't know any C) As your program obviously has better capabilities I wouldn't recommend choosing my solution :-) So, if anyboy decides to add a plugin for Mysql replication to nagiosplug, my vote goes to Daves solution. Bye, -- Mario Witte | | http://www.chengfu.net/ GnuPG fingerprint = 1C46 FF8F 661F 69B6 410E 9B1B 1EA5 6B20 BD30 AEA3 cd /pub ; more beer -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From kdebisschop at mail.debisschop.net Thu Dec 19 11:33:09 2002 From: kdebisschop at mail.debisschop.net (Karl DeBisschop) Date: Thu Dec 19 11:33:09 2002 Subject: [Nagiosplug-devel] Re: check_tcp bug In-Reply-To: <3E00FF1A.6090007@quadrix.com> References: <3E00FF1A.6090007@quadrix.com> Message-ID: Russell Scibetti writes: > I've noticed two small problems with the check_tcp plugin (nagiosplug > 1.3b2) that prevent it from doing its proper default expect string > checking (i.e - if you are running check_smtp, by default you expect a > "220" return, etc). > > First, the expect value for check_pop (and check_spop) is incorrect. The > expect is set to "110", which is just the port for POP. This never > actually gets returned when to do a tcp connect to POP. What you need to > get back to know that POP is working is "+OK". > > Secondly, there is a bug in that, unless the user gives uses the -e > argument, none of the default expects will every be checked. Here is a > piece of the check_tcp code: patch applied and CVS committed. Thanks. Karl From kdebisschop at mail.debisschop.net Thu Dec 19 11:38:03 2002 From: kdebisschop at mail.debisschop.net (Karl DeBisschop) Date: Thu Dec 19 11:38:03 2002 Subject: [Nagiosplug-devel] Re: check_http is flakey / doesn't work all the time In-Reply-To: <53109A46D4F58F458B18D009EAEEDC830E6331@mail.endeavorstech.com> References: <53109A46D4F58F458B18D009EAEEDC830E6331@mail.endeavorstech.com> Message-ID: Peter Krzystofiak writes: > Hello all, > > My check_http plugin is flakey. For example if yahoo.com is up and I run > a check_http against it, Nagios will state that it is not online and I will > receive an Error recv() message. > > Other times, the plugin works just fine. Is there a source update, > or a fix for this. Has anyone else experienced this or have > a solution to get around this problem? A separate thread turned up a bug caused by spurious CRLF in check_http. I wonder if yahoo has slightly differing software in their hardware pool, and thus some might be sensitive to the bug and others not. I'd be interested to know if the current CVS fixes your problem. -- Karl From russell at quadrix.com Thu Dec 19 15:28:06 2002 From: russell at quadrix.com (Russell Scibetti) Date: Thu Dec 19 15:28:06 2002 Subject: [Nagiosplug-devel] check_dns bug Message-ID: <3E02569C.9060400@quadrix.com> I found a bug in check_dns in the 1.3b2 release. It occurs when you run "check_dns -H " without specifying a "-s ". It resuts in a segmentation fault There is code in check_dns that, after going through the know args, checks to see if the user has given anything at the commandline without a tag. For example, if you run: ./check_dns -H -> no -s tag used it will work because check_dns looks for extra information in the argv array. However, before it looks, there is no check to make sure that there is anything else in the argv array. So when if looks for the when none is specified, it causes a segmentation fault (argv[c] is undefined). In the contect-diff patch I have included, I added a check to make sure that there are more arguments provided before trying to use them. Personally, I think it might be a better idea to remove that section entirely and force people to use the actual tags (-H, -s, etc). It forces users to stick to the defined nagiosplug standard. Just my opinion. One last note. I have been doing a lot of work looking at the plugins lately (I'm actually going to investigate a problem I've have with check_ifstatus next). If there is anything I can do to help the nagiosplug project, please let me know. I would love to do whatever is in my power to help out. Thanks! -Russell Scibetti -- Russell Scibetti Quadrix Solutions, Inc. http://www.quadrix.com (732) 235-2335, ext. 7038 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: checkdns_diff.patch URL: From r.allen at awayweb.com Thu Dec 19 23:25:03 2002 From: r.allen at awayweb.com (Rodger Allen) Date: Thu Dec 19 23:25:03 2002 Subject: [Nagiosplug-devel] A different ping Message-ID: <3E02C5AD.8070700@awayweb.com> Hello plugin developers I have written a different type of tcp ping plugin which some may find useful for "check-host-alive" type host checking commands, particularly in firewalled DMZ environment. We found the normal check_ping to be inadequate in our firewalled environment, where ICMP (and other traffic) is heavily restricted. We needed to know whether a machine was actually alive, even though all of the services defined in nagios may be down. This plugin will attempt to connect on a designated tcp port, and will return CRITICAL if it fails, but, importantly, it will return OK if the connection is refused. If the machine is refusing connections, it means that at least the IP stack is alive. There is also a switch "-w" that will issue a WARNING if the plugin receives a connection refused, which some may also find useful, but should not be used in a host check command. Some caveats: If it used as a host-alive-check then you may need to turn on "use_agressive_host_checking" in your nagios.cfg, as nagios appears to define a host as down if it cannot access any of its services without this option set. Alternatively, you can use it as separate service check (probably with the "-w" option), and point it at a port that another service check is using, but even then I haven't found that nagios is all that reliable at determining that a host has come back up again. Usage: check_tcp_ping [-w] [-t timeout] [-p port] check_tcp_ping -V prints version info check_tcp_ping -h prints more detailed help Options: -w issue warning if connection refused (default is OK) by default, port is 22 by default, timeout is 10 Attached are: check_tcp_ping.c put it into the plugins directory patch-plugins_Makefile.am apply as "patch -p0 < patch-..." I submit this for the other nagios plugin developers consideration. It should integrate easily into the main plugin schema if the patch to plugins/Makefile.am is applied. Hopefully, its worst fault is the name - check_tcp_ping. This is mainly a hack on the check_ssh plugin written by Remi Paulmier, and should compile and work on the same systems that that plugin does. Rodger -- Rodger Allen - Security Consultant | "te occidere possunt sed r.allen at awayweb.com | te edere non possunt nefas Mob: +61 402 209 256 | est" DFW GPG fingerprint = 958F 256F 5327 D14E 49EA 0681 05E6 2EC3 62E8 793F Thawte fingerprint = 96:09:A2:3B:67:9F:B4:AE:C8:50:BC:2F:31:00:AB:14 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: patch-plugins_Makefile.am URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: check_tcp_ping.c URL: From karl at debisschop.net Fri Dec 20 04:49:01 2002 From: karl at debisschop.net (Karl DeBisschop) Date: Fri Dec 20 04:49:01 2002 Subject: [Nagiosplug-devel] A different ping In-Reply-To: <3E02C5AD.8070700@awayweb.com> References: <3E02C5AD.8070700@awayweb.com> Message-ID: <1040388327.16174.21.camel@toaster> On Fri, 2002-12-20 at 02:24, Rodger Allen wrote: > Hello plugin developers > > > I have written a different type of tcp ping plugin which some may find > useful for "check-host-alive" type host checking commands, particularly > in firewalled DMZ environment. > > We found the normal check_ping to be inadequate in our firewalled > environment, where ICMP (and other traffic) is heavily restricted. We > needed to know whether a machine was actually alive, even though all of > the services defined in nagios may be down. > > > This plugin will attempt to connect on a designated tcp port, and will > return CRITICAL if it fails, but, importantly, it will return OK if the > connection is refused. If the machine is refusing connections, it means > that at least the IP stack is alive. > > There is also a switch "-w" that will issue a WARNING if the plugin > receives a connection refused, which some may also find useful, but > should not be used in a host check command. Since this shares most of its code with check_tcp, it seems to me that another approach might be implmenting it as another mode for the existing plugin. Have you considered that approach? Might it be viable? The benefit would be less installed footprint and less code to maintain. -- Karl DeBisschop From Stephen.Lomond at gov.nf.ca Fri Dec 20 07:54:03 2002 From: Stephen.Lomond at gov.nf.ca (Stephen Lomond) Date: Fri Dec 20 07:54:03 2002 Subject: [Nagiosplug-devel] check_nwstat update Message-ID: I have updated the nwstat plugin to retrieve time sync status and also free space in megs. I would like to make this available to those interested but don't know how. I am new to contributing to Open Source but want to contribute my little part. Please help!! From dviner at yahoo-inc.com Fri Dec 20 10:17:02 2002 From: dviner at yahoo-inc.com (Dave Viner) Date: Fri Dec 20 10:17:02 2002 Subject: [Nagiosplug-devel] RE: [Nagios-users] checking memory and cpu consumption of procs In-Reply-To: <53104E20A25CD411B556009027E50636064D503A@pnnemp02.pn.egg.com> Message-ID: I completely agree with the KISS principle. And you are correct in assuming that this change would be using for calling 3rd party commands (or commands over which the person who handles monitoring has little control). I also found access to a solaris machine, so i should be able to help solving this problem. dave -----Original Message----- From: Voon, Ton [mailto:Ton.Voon at egg.com] Sent: Friday, December 20, 2002 9:49 AM To: 'Dave Viner'; nagios-users at lists.sourceforge.net; nagiosplug-devel at lists.sourceforge.net Subject: RE: [Nagios-users] checking memory and cpu consumption of procs Copying onto nagiosplug-devel list. Future replies will only be to the nagiosplug-devel list. I would go with "Keep it simple". If a plugin reports a failure, then it is the manual investigation that will show up the stderr failures. I would think a ps failure is fairly catastrophic ;o) Then again, maybe it is just the initial pain of a new model. I can see the model makes more sense for plugins that call 3rd party commands. Maybe Karl would be interested in adding runcmd in utils.c? If your friends are going to look at this on Solaris, here's some of the pain I discovered: strsep is not supported on Solaris. A portable version is: /*************************************************************************** *** * This is a replacement for strsep which is not portable (missing on Solaris). * From Wine code by Fran?ois Gouget */ static char* getToken(char** str, const char* delims) { char* token; if (*str==NULL) { /* No more tokens */ return NULL; } token=*str; while (**str!='\0') { if (strchr(delims,**str)!=NULL) { **str='\0'; (*str)++; return token; } (*str)++; } /* There is no other token */ *str=NULL; return token; } INFTIM is not supported either. Add this in check_cpu.c #ifndef INFTIM #define INFTIM (-1) #endif Here's my diff of configure.in. CPU_COMMAND should be defined within the ps syntax checks, not at the end in your patch. *** configure.in.beta2 Fri Dec 20 17:31:00 2002 --- configure.in Fri Dec 20 17:31:08 2002 *************** *** 260,265 **** --- 260,266 ---- AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h unistd.h uio.h errno.h regex.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h) AC_CHECK_HEADERS(stdarg.h sys/unistd.h unistd.h ctype.h sys/wait.h stdlib.h) + AC_CHECK_HEADERS(poll.h sys/poll.h asm/poll.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST *************** *** 528,533 **** --- 529,536 ---- AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'",[]) AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) + AC_DEFINE_UNQUOTED(CPU_COMMAND,"$PATH_TO_PS -Ao 'pcpu comm'",[]) + AC_DEFINE_UNQUOTED(CPU_FORMAT,"%f %s",[]) echo " ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'" elif [ps -Ao 'status comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null] then Here's how I put includes in plugins/common.h: *** common.h.in.beta2 Fri Dec 20 12:29:51 2002 --- common.h.in Fri Dec 20 12:49:38 2002 *************** *** 66,71 **** --- 66,81 ---- #include #endif + #ifdef HAVE_POLL_H + #include + #endif + #ifdef HAVE_SYS_POLL_H + #include + #endif + #ifdef HAVE_ASM_POLL_H + #include + #endif + /* #ifdef HAVE_GETOPT_H */ #include /* #endif */ Ton > -----Original Message----- > From: Dave Viner [SMTP:dviner at yahoo-inc.com] > Sent: Friday, December 20, 2002 5:09 PM > To: Voon, Ton; nagios-users at lists.sourceforge.net > Subject: RE: [Nagios-users] checking memory and cpu consumption of > procs > > Hi Ton, > I don't think I currently have access to a Solaris machine, but I'll > try to > ask some folks I know who do solaris development. I think using poll() or > select() or something like that can provide functionality that the > spopen()/fgets() strategy can't. In particular, imagine code that uses > the > spopen()/fgets() model and the popen_timeout_alarm_handler(). The command > that is executed doesn't output anything to STDOUT, but spews lots of > error > messages to STDERR. Since the first fgets() call blocks on STDOUT, the > whole plugin just times out and the only thing reported is from the > SIGALRM > saying the plugin timed out. Using a poll() or select() model instead, > the > plugin can capture all output from STDOUT _and_ STDERR simultaneously. > Then > if any timeouts happen, at least there was a chance to see some activity > and > take some action. Does that make sense? Let me know what you think about > this as a model of plugin invocation. > > Thanks > dave > > > > > -----Original Message----- > From: nagios-users-admin at lists.sourceforge.net > [mailto:nagios-users-admin at lists.sourceforge.net]On Behalf Of Voon, Ton > Sent: Friday, December 20, 2002 6:08 AM > To: 'Dave Viner'; nagios-users at lists.sourceforge.net > Subject: RE: [Nagios-users] checking memory and cpu consumption of procs > > > Dave, > > I've tried to run your program on Solaris but I'm not having any joy. I > managed to add in the poll checks for configure, but when running, it goes > into an infinite loop. It seems that the line: > > n = poll (fdarray, 2, INFTIM); > > is returning 2, but the condition > > (fdarray[0].revents & readable) > > is not true and so the read_size never gets set to 0 and the loop never > ends. > > I don't know if this is a Solaris limitation (uname: SunOS 2.6). > > Is there any particular reason you wanted to use poll? I think for a > simple > subcommand, the spopen and fgets used in check_procs is probably > sufficient. > > Ton > > > -----Original Message----- > > From: Dave Viner [SMTP:dviner at yahoo-inc.com] > > Sent: Thursday, December 19, 2002 6:00 PM > > To: Voon, Ton; nagios-users at lists.sourceforge.net > > Subject: RE: [Nagios-users] checking memory and cpu consumption of > > procs > > > > Here's my first stab at a check_cpu.c program. I want to use poll() to > > watch both stdout and stderr of the child process, but I can't get it to > > compile on both FreeBSD and Linux. FreeBSD just needs: > > #include > > but Linux needs: > > #include > > #include > > > > Unfortunately this means that it requires a new definition in > > configure.in. > > I'm not quite sure how to handle that, but I'll also look into make > those > > changes. Can anyone help me with that? > > > > Other than that, this program works very well (I think). > > > > thanks > > > > dave > > > > -----Original Message----- > > From: nagios-users-admin at lists.sourceforge.net > > [mailto:nagios-users-admin at lists.sourceforge.net]On Behalf Of Dave Viner > > Sent: Wednesday, December 18, 2002 9:38 AM > > To: Voon, Ton; nagios-users at lists.sourceforge.net > > Subject: RE: [Nagios-users] checking memory and cpu consumption of procs > > > > > > I'll make one for FreeBSD and Linux. I'll post it to the list when I > have > > it ready. Unforunately, I don't really understand autoconf/automake and > > configure.in/makefile.am, so I don't know that I'll be able to help much > > there.... > > > > Thanks ! > > > > dave > > > > > > -----Original Message----- > > From: Voon, Ton [mailto:Ton.Voon at egg.com] > > Sent: Wednesday, December 18, 2002 1:33 AM > > To: 'Dave Viner'; Voon, Ton; nagios-users at lists.sourceforge.net > > Subject: RE: [Nagios-users] checking memory and cpu consumption of procs > > > > > > A check_cpu, based on check_vsz, would be useful. However, it would > > require > > quite a few non-trivial changes to the configure.in and makefile.am to > > pick > > up various flags for the ps command to make it portable. If you want to > > make > > a start, I'd be happy to add in other OSes. > > > > > -----Original Message----- > > > From: Dave Viner [SMTP:dviner at yahoo-inc.com] > > > Sent: Tuesday, December 17, 2002 6:23 PM > > > To: Voon, Ton; nagios-users at lists.sourceforge.net > > > Subject: RE: [Nagios-users] checking memory and cpu consumption of > > > procs > > > > > > Hi, > > > > > > Thanks for pointing me to check_vsz. This is a really great utility. > > > From > > > looking at the usage message and the code itself, it looks to me like > > this > > > monitors virtual memory consumption. Are there any hooks to monitor > > %cpu > > > consumption ? Perhaps something like > > > ps waxco 'vsz %cpu command' > > > ? I'm happy to try to add this in if it sounds useful. > > > > > > dave > > > > > > -----Original Message----- > > > From: Voon, Ton [mailto:Ton.Voon at egg.com] > > > Sent: Tuesday, December 17, 2002 1:31 AM > > > To: 'Dave Viner'; nagios-users at lists.sourceforge.net > > > Subject: RE: [Nagios-users] checking memory and cpu consumption of > procs > > > > > > > > > Dave, > > > > > > Take a look at check_vsz for the virtual size of memory usage on a > > process > > > level. I've put lot of functionality patches on sourceforge, so you'll > > > need > > > to apply those. > > > > > > Ton > > > > > > > -----Original Message----- > > > > From: Dave Viner [SMTP:dviner at yahoo-inc.com] > > > > Sent: Tuesday, December 17, 2002 6:56 AM > > > > To: nagios-users at lists.sourceforge.net > > > > Subject: [Nagios-users] checking memory and cpu consumption > of procs > > > > > > > > Hi, > > > > I want to ensure that no process on a machine consumes more > than x % > > > > of the > > > > cpu, and y MB memory. Is there an existing plugin that handles > this? > > I > > > > saw > > > > that check_procs will monitor the number of processes on a machine > > > > (including ones that match a certain name), and check_load will > > examine > > > > the > > > > machine's overall load averages as reported by uptime. But I can't > > seem > > > > to > > > > find anything that monitors cpu consumption or memory consumption. > Is > > > > there > > > > a plugin for this already? > > > > > > > > thanks > > > > dave > This private and confidential e-mail has been sent to you by Egg. The Egg group of companies includes Egg Banking plc (registered no. 2999842), Egg Financial Products Ltd (registered no. 3319027) and Egg Investments Ltd (registered no. 3403963) which carries out investment business on behalf of Egg and is regulated by the Financial Services Authority. Registered in England and Wales. Registered offices: 1 Waterhouse Square, 138-142 Holborn, London EC1N 2NA. If you are not the intended recipient of this e-mail and have received it in error, please notify the sender by replying with 'received in error' as the subject and then delete it from your mailbox. From Ton.Voon at egg.com Fri Dec 20 10:40:11 2002 From: Ton.Voon at egg.com (Voon, Ton) Date: Fri Dec 20 10:40:11 2002 Subject: [Nagiosplug-devel] RE: [Nagios-users] checking memory and cpu consumption of procs Message-ID: <53104E20A25CD411B556009027E50636064D503A@pnnemp02.pn.egg.com> Copying onto nagiosplug-devel list. Future replies will only be to the nagiosplug-devel list. I would go with "Keep it simple". If a plugin reports a failure, then it is the manual investigation that will show up the stderr failures. I would think a ps failure is fairly catastrophic ;o) Then again, maybe it is just the initial pain of a new model. I can see the model makes more sense for plugins that call 3rd party commands. Maybe Karl would be interested in adding runcmd in utils.c? If your friends are going to look at this on Solaris, here's some of the pain I discovered: strsep is not supported on Solaris. A portable version is: /*************************************************************************** *** * This is a replacement for strsep which is not portable (missing on Solaris). * From Wine code by Fran?ois Gouget */ static char* getToken(char** str, const char* delims) { char* token; if (*str==NULL) { /* No more tokens */ return NULL; } token=*str; while (**str!='\0') { if (strchr(delims,**str)!=NULL) { **str='\0'; (*str)++; return token; } (*str)++; } /* There is no other token */ *str=NULL; return token; } INFTIM is not supported either. Add this in check_cpu.c #ifndef INFTIM #define INFTIM (-1) #endif Here's my diff of configure.in. CPU_COMMAND should be defined within the ps syntax checks, not at the end in your patch. *** configure.in.beta2 Fri Dec 20 17:31:00 2002 --- configure.in Fri Dec 20 17:31:08 2002 *************** *** 260,265 **** --- 260,266 ---- AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(signal.h strings.h string.h syslog.h unistd.h uio.h errno.h regex.h sys/types.h sys/time.h sys/socket.h sys/loadavg.h) AC_CHECK_HEADERS(stdarg.h sys/unistd.h unistd.h ctype.h sys/wait.h stdlib.h) + AC_CHECK_HEADERS(poll.h sys/poll.h asm/poll.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST *************** *** 528,533 **** --- 529,536 ---- AC_DEFINE_UNQUOTED(VSZ_FORMAT,"%d %s",[]) AC_DEFINE_UNQUOTED(RSS_COMMAND,"$PATH_TO_PS -Ao 'rss comm'",[]) AC_DEFINE_UNQUOTED(RSS_FORMAT,"%d %s",[]) + AC_DEFINE_UNQUOTED(CPU_COMMAND,"$PATH_TO_PS -Ao 'pcpu comm'",[]) + AC_DEFINE_UNQUOTED(CPU_FORMAT,"%f %s",[]) echo " ps syntax... $PATH_TO_PS -Ao 's comm vsz rss'" elif [ps -Ao 'status comm vsz rss uid user ppid args' 2>/dev/null | egrep -i "^S[TAUES]* +C[OMDNA]+ +V[SIZE]+ +RSS +UID +USER +PPID +[RGSCOMDNA]+" >/dev/null] then Here's how I put includes in plugins/common.h: *** common.h.in.beta2 Fri Dec 20 12:29:51 2002 --- common.h.in Fri Dec 20 12:49:38 2002 *************** *** 66,71 **** --- 66,81 ---- #include #endif + #ifdef HAVE_POLL_H + #include + #endif + #ifdef HAVE_SYS_POLL_H + #include + #endif + #ifdef HAVE_ASM_POLL_H + #include + #endif + /* #ifdef HAVE_GETOPT_H */ #include /* #endif */ Ton > -----Original Message----- > From: Dave Viner [SMTP:dviner at yahoo-inc.com] > Sent: Friday, December 20, 2002 5:09 PM > To: Voon, Ton; nagios-users at lists.sourceforge.net > Subject: RE: [Nagios-users] checking memory and cpu consumption of > procs > > Hi Ton, > I don't think I currently have access to a Solaris machine, but I'll > try to > ask some folks I know who do solaris development. I think using poll() or > select() or something like that can provide functionality that the > spopen()/fgets() strategy can't. In particular, imagine code that uses > the > spopen()/fgets() model and the popen_timeout_alarm_handler(). The command > that is executed doesn't output anything to STDOUT, but spews lots of > error > messages to STDERR. Since the first fgets() call blocks on STDOUT, the > whole plugin just times out and the only thing reported is from the > SIGALRM > saying the plugin timed out. Using a poll() or select() model instead, > the > plugin can capture all output from STDOUT _and_ STDERR simultaneously. > Then > if any timeouts happen, at least there was a chance to see some activity > and > take some action. Does that make sense? Let me know what you think about > this as a model of plugin invocation. > > Thanks > dave > > > > > -----Original Message----- > From: nagios-users-admin at lists.sourceforge.net > [mailto:nagios-users-admin at lists.sourceforge.net]On Behalf Of Voon, Ton > Sent: Friday, December 20, 2002 6:08 AM > To: 'Dave Viner'; nagios-users at lists.sourceforge.net > Subject: RE: [Nagios-users] checking memory and cpu consumption of procs > > > Dave, > > I've tried to run your program on Solaris but I'm not having any joy. I > managed to add in the poll checks for configure, but when running, it goes > into an infinite loop. It seems that the line: > > n = poll (fdarray, 2, INFTIM); > > is returning 2, but the condition > > (fdarray[0].revents & readable) > > is not true and so the read_size never gets set to 0 and the loop never > ends. > > I don't know if this is a Solaris limitation (uname: SunOS 2.6). > > Is there any particular reason you wanted to use poll? I think for a > simple > subcommand, the spopen and fgets used in check_procs is probably > sufficient. > > Ton > > > -----Original Message----- > > From: Dave Viner [SMTP:dviner at yahoo-inc.com] > > Sent: Thursday, December 19, 2002 6:00 PM > > To: Voon, Ton; nagios-users at lists.sourceforge.net > > Subject: RE: [Nagios-users] checking memory and cpu consumption of > > procs > > > > Here's my first stab at a check_cpu.c program. I want to use poll() to > > watch both stdout and stderr of the child process, but I can't get it to > > compile on both FreeBSD and Linux. FreeBSD just needs: > > #include > > but Linux needs: > > #include > > #include > > > > Unfortunately this means that it requires a new definition in > > configure.in. > > I'm not quite sure how to handle that, but I'll also look into make > those > > changes. Can anyone help me with that? > > > > Other than that, this program works very well (I think). > > > > thanks > > > > dave > > > > -----Original Message----- > > From: nagios-users-admin at lists.sourceforge.net > > [mailto:nagios-users-admin at lists.sourceforge.net]On Behalf Of Dave Viner > > Sent: Wednesday, December 18, 2002 9:38 AM > > To: Voon, Ton; nagios-users at lists.sourceforge.net > > Subject: RE: [Nagios-users] checking memory and cpu consumption of procs > > > > > > I'll make one for FreeBSD and Linux. I'll post it to the list when I > have > > it ready. Unforunately, I don't really understand autoconf/automake and > > configure.in/makefile.am, so I don't know that I'll be able to help much > > there.... > > > > Thanks ! > > > > dave > > > > > > -----Original Message----- > > From: Voon, Ton [mailto:Ton.Voon at egg.com] > > Sent: Wednesday, December 18, 2002 1:33 AM > > To: 'Dave Viner'; Voon, Ton; nagios-users at lists.sourceforge.net > > Subject: RE: [Nagios-users] checking memory and cpu consumption of procs > > > > > > A check_cpu, based on check_vsz, would be useful. However, it would > > require > > quite a few non-trivial changes to the configure.in and makefile.am to > > pick > > up various flags for the ps command to make it portable. If you want to > > make > > a start, I'd be happy to add in other OSes. > > > > > -----Original Message----- > > > From: Dave Viner [SMTP:dviner at yahoo-inc.com] > > > Sent: Tuesday, December 17, 2002 6:23 PM > > > To: Voon, Ton; nagios-users at lists.sourceforge.net > > > Subject: RE: [Nagios-users] checking memory and cpu consumption of > > > procs > > > > > > Hi, > > > > > > Thanks for pointing me to check_vsz. This is a really great utility. > > > From > > > looking at the usage message and the code itself, it looks to me like > > this > > > monitors virtual memory consumption. Are there any hooks to monitor > > %cpu > > > consumption ? Perhaps something like > > > ps waxco 'vsz %cpu command' > > > ? I'm happy to try to add this in if it sounds useful. > > > > > > dave > > > > > > -----Original Message----- > > > From: Voon, Ton [mailto:Ton.Voon at egg.com] > > > Sent: Tuesday, December 17, 2002 1:31 AM > > > To: 'Dave Viner'; nagios-users at lists.sourceforge.net > > > Subject: RE: [Nagios-users] checking memory and cpu consumption of > procs > > > > > > > > > Dave, > > > > > > Take a look at check_vsz for the virtual size of memory usage on a > > process > > > level. I've put lot of functionality patches on sourceforge, so you'll > > > need > > > to apply those. > > > > > > Ton > > > > > > > -----Original Message----- > > > > From: Dave Viner [SMTP:dviner at yahoo-inc.com] > > > > Sent: Tuesday, December 17, 2002 6:56 AM > > > > To: nagios-users at lists.sourceforge.net > > > > Subject: [Nagios-users] checking memory and cpu consumption > of procs > > > > > > > > Hi, > > > > I want to ensure that no process on a machine consumes more > than x % > > > > of the > > > > cpu, and y MB memory. Is there an existing plugin that handles > this? > > I > > > > saw > > > > that check_procs will monitor the number of processes on a machine > > > > (including ones that match a certain name), and check_load will > > examine > > > > the > > > > machine's overall load averages as reported by uptime. But I can't > > seem > > > > to > > > > find anything that monitors cpu consumption or memory consumption. > Is > > > > there > > > > a plugin for this already? > > > > > > > > thanks > > > > dave > This private and confidential e-mail has been sent to you by Egg. The Egg group of companies includes Egg Banking plc (registered no. 2999842), Egg Financial Products Ltd (registered no. 3319027) and Egg Investments Ltd (registered no. 3403963) which carries out investment business on behalf of Egg and is regulated by the Financial Services Authority. Registered in England and Wales. Registered offices: 1 Waterhouse Square, 138-142 Holborn, London EC1N 2NA. If you are not the intended recipient of this e-mail and have received it in error, please notify the sender by replying with 'received in error' as the subject and then delete it from your mailbox. From r.allen at awayweb.com Fri Dec 20 17:09:15 2002 From: r.allen at awayweb.com (Rodger Allen) Date: Fri Dec 20 17:09:15 2002 Subject: [Nagiosplug-devel] A different ping References: <3E02C5AD.8070700@awayweb.com> <1040388327.16174.21.camel@toaster> Message-ID: <3E03BEEB.9080900@awayweb.com> Karl DeBisschop wrote: > >>This plugin will attempt to connect on a designated tcp port, and will >>return CRITICAL if it fails, but, importantly, it will return OK if the >>connection is refused. If the machine is refusing connections, it means >>that at least the IP stack is alive. >> >>There is also a switch "-w" that will issue a WARNING if the plugin >>receives a connection refused, which some may also find useful, but >>should not be used in a host check command. > > > Since this shares most of its code with check_tcp, it seems to me that > another approach might be implmenting it as another mode for the > existing plugin. Have you considered that approach? Might it be viable? > > The benefit would be less installed footprint and less code to maintain. The plugin arose out of looking into the check_ssh plugin, and the code more or less just happened. It was adequate for our task (getting an OK on refused connections), so left it there. Afterwards, I did take a look at the check_tcp plugin, and in particular the netutils.* files, and realized that, as you say, this is the better place for it, but was a little intimidated, thinking I would have to pass parameters down in the my_connect function and worried that this would break many other things. I've taken another look this morning, and it isn't as bad as all that. Second sight and a kick in the pants are a wonderful thing, and I have just made some changes to the relevant files to incorporate this into check_tcp plugin. So use/don't use the other submission at your pleasure, and I'll post the patches for check_tcp/netutils in a day or so, as the SO is calling out to go Xmas shopping right now. regards Rodger -- Rodger Allen - Security Consultant | "te occidere possunt sed r.allen at awayweb.com | te edere non possunt nefas Mob: +61 402 209 256 | est" DFW GPG fingerprint = 958F 256F 5327 D14E 49EA 0681 05E6 2EC3 62E8 793F Thawte fingerprint = 96:09:A2:3B:67:9F:B4:AE:C8:50:BC:2F:31:00:AB:14 From karl at debisschop.net Sun Dec 22 05:54:03 2002 From: karl at debisschop.net (Karl DeBisschop) Date: Sun Dec 22 05:54:03 2002 Subject: [Nagiosplug-devel] RE: [Nagios-users] checking memory and cpu consumption of procs In-Reply-To: <53104E20A25CD411B556009027E50636064D503A@pnnemp02.pn.egg.com> References: <53104E20A25CD411B556009027E50636064D503A@pnnemp02.pn.egg.com> Message-ID: <1040565088.396.7.camel@toaster> On Fri, 2002-12-20 at 12:49, Voon, Ton wrote: > Copying onto nagiosplug-devel list. Future replies will only be to the > nagiosplug-devel list. > > I would go with "Keep it simple". If a plugin reports a failure, then it is > the manual investigation that will show up the stderr failures. I would > think a ps failure is fairly catastrophic ;o) > > Then again, maybe it is just the initial pain of a new model. I can see the > model makes more sense for plugins that call 3rd party commands. Maybe Karl > would be interested in adding runcmd in utils.c? I would be willing to add/replace the spopen model with polling. I sort of tried to get part way there by scanning stderr, way back when I first implemented spopen. I didn't really think about blocking at the time, I just figured a 3rd party util that used stderr needed to at least note that, usually by throwing a warning. I will look at transition/implementation issues later. I think this souns like a 1.4 issue, however. > If your friends are going to look at this on Solaris, here's some of the > pain I discovered: Thanks. I think most of this can go right into 1.3. Except I am hesitant to add a new plugin at this point, so maybe check_cpu itself can get added just after 1.3 is released. > > strsep is not supported on Solaris. A portable version is: > /*************************************************************************** Sound reasonable? -- Karl DeBisschop From noreply at sourceforge.net Sun Dec 22 18:36:01 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Sun Dec 22 18:36:01 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-656169 ] New check_df nagios plugin submission Message-ID: Patches item #656169, was opened at 2002-12-19 07:14 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=656169&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jason Dixon (fuzzyping) Assigned to: Nobody/Anonymous (nobody) Summary: New check_df nagios plugin submission Initial Comment: Here is a check_df (diskfree) plugin that I wrote in perl. Feel free to use... or destroy. ;-) -J. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=656169&group_id=29880 From noreply at sourceforge.net Sun Dec 22 18:36:01 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Sun Dec 22 18:36:01 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-656170 ] New check_cpu nagios plugin submission Message-ID: Patches item #656170, was opened at 2002-12-19 07:15 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=656170&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jason Dixon (fuzzyping) Assigned to: Nobody/Anonymous (nobody) Summary: New check_cpu nagios plugin submission Initial Comment: Here is a check_cpu (load averages) plugin that I wrote in perl. Feel free to use... or destroy. ;-) -J. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=656170&group_id=29880 From noreply at sourceforge.net Sun Dec 22 18:36:02 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Sun Dec 22 18:36:02 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-656173 ] New check_pfstate nagios plugin Message-ID: Patches item #656173, was opened at 2002-12-19 07:16 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=656173&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jason Dixon (fuzzyping) Assigned to: Nobody/Anonymous (nobody) Summary: New check_pfstate nagios plugin Initial Comment: Here is a check_pfstate plugin for nagios on *OPENBSD* that I wrote in perl. It gathers the number of current state entries (pfctl -s info). -J. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=656173&group_id=29880 From noreply at sourceforge.net Sun Dec 22 18:36:02 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Sun Dec 22 18:36:02 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-656175 ] Regarding my 3 submissions above... Message-ID: Patches item #656175, was opened at 2002-12-19 07:22 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=656175&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jason Dixon (fuzzyping) Assigned to: Nobody/Anonymous (nobody) Summary: Regarding my 3 submissions above... Initial Comment: These all use a standard pre-shared ssh key connection to connect and gather the relevant info. There will need to be a public ssh key for the local nagios user in the remote users' ~/.ssh/authorized_keys file, in addition to a copy of the public host key from the remote system in the local nagios user's ~/.ssh/known_hosts file. Very similar to check_by_ssh configuration. -J. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=656175&group_id=29880 From noreply at sourceforge.net Sun Dec 22 18:36:02 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Sun Dec 22 18:36:02 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-656237 ] check_ntp: dispersion error Message-ID: Bugs item #656237, was opened at 2002-12-19 03:08 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=656237&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: check_ntp: dispersion error Initial Comment: I got a lot of dispersion errors with check_ntp. When starting check_ntp with the option "-v" (verbose) I discovered somtimes lines with a dispersion of 16.0000: 1. If the last line has this value, check_ntp reports a dispersion error. If the dispersion value of the last line is low, then no dispersion error is reported. I think this behaviour is wrong. A dispersion error should be reported if any of the lines (not only the last) has a dispersion value which is to high. 2. I don't know the NTP-Protokoll very well. But I think it would make sense, to take only output lines from "ntpdc -s" into account, which start with * or +. From the xntpdc man-page: Characters only appear beside peers which were included in the final stage of the clock selection algorithm. A . indicates that this peer was cast off in the falseticker detection, while a + indi- cates that the peer made it through. A * denotes the peer with which the server is currently synchronizing. Here is a patch of check_ntp that works for me: diff -Naur plugins-scripts/check_ntp.pl plugins-scripts-new/check_ntp.pl --- plugins-scripts/check_ntp.pl Mon Oct 28 14:05:07 2002 +++ plugins-scripts-new/check_ntp.pl Thu Dec 19 11:05:38 2002 @@ -189,15 +189,19 @@ if ( open(NTPDC,"$utils::PATH_TO_NTPDC -s $host 2>&1 |") ) { while () { print $_ if ($verbose); - if (/([^\s]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) { + if (/([+*][^\s]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)\s+([-0-9.]+)/) { if ($8 gt $critical) { print "Dispersion_crit = $8 :$critical\n" if ($verbose); $dispersion_error = $ERRORS{'CRITICAL'}; } elsif ($8 gt $warning ) { print "Dispersion_warn = $8 :$warning \n" if ($verbose); - $dispersion_error = $ERRORS{'WARNING'}; + if ($dispersion_error != $ERRORS{'CRITICAL'}) { + $dispersion_error = $ERRORS{'WARNING'}; + } } else { - $dispersion_error = $ERRORS{'OK'}; + if ($dispersion_error != $ERRORS{'CRITICAL'} and $dispersion_error != $ERRORS{'WARNING'}) { + $dispersion_error = $ERRORS{'OK'}; + } } } } -- Ingo Rogalsky rogalskyiis.fhg.de ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=656237&group_id=29880 From noreply at sourceforge.net Sun Dec 22 18:36:03 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Sun Dec 22 18:36:03 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Support Requests-656247 ] check_pop segfault Message-ID: Support Requests item #656247, was opened at 2002-12-19 03:44 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=656247&group_id=29880 Category: None Group: None Status: Open Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: check_pop segfault Initial Comment: On RH 7.3 and nagios-plugins-1.3.0-beta2 check_pop exits with segfault: POP OK - 0.132 second response time on port 110|time= 0.132 Segmentation fault ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=656247&group_id=29880 From noreply at sourceforge.net Sun Dec 22 18:36:03 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Sun Dec 22 18:36:03 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-656754 ] check_procs (not cmd longer that 15char) Message-ID: Bugs item #656754, was opened at 2002-12-20 04:11 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=656754&group_id=29880 Category: Parsing problem Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: check_procs (not cmd longer that 15char) Initial Comment: "check_procs -C rendering_server" doesn't find any process but "check_procs -C rendering_serve" does. '/bin/ps -axo "stat uid ppid comm args"' clips the comm argument at 15chars in my system. (Redhat 7.0 linux 2.4.9). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=656754&group_id=29880 From noreply at sourceforge.net Sun Dec 22 18:36:04 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Sun Dec 22 18:36:04 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-656924 ] configure swapinfo bad check HP-UX Message-ID: Bugs item #656924, was opened at 2002-12-20 13:31 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=656924&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Sebastien Masson (sabey) Assigned to: Nobody/Anonymous (nobody) Summary: configure swapinfo bad check HP-UX Initial Comment: The configure script try to find the good swapinfo command for specific OS and check the SWAP_FORMAT. In the test, configure type swapinfo - k option and check if output with DEVICE word. on HP- UX the -k option doesn't exist and swapinfo give list of all options and the word DEVICE is in the output so configure thinhk the swapinfo is with -k option... I just replace 2>&1 by 2>/dev/null on line 6648 1.3.0-beta2 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=656924&group_id=29880 From jtinley at unirez.com Mon Dec 23 07:13:01 2002 From: jtinley at unirez.com (Jeremy Tinley) Date: Mon Dec 23 07:13:01 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-656754 ] check_procs (not cmd longer that 15char) In-Reply-To: Message-ID: <000f01c2aa95$a43ff860$b201a8c0@unirez.com> Probably needs to include a "ww" to get the rest of the line: - /bin/ps -axo "stat uid ppid comm args" + /bin/ps -axwwo "stat uid ppid comm args" -----Original Message----- From: nagiosplug-devel-admin at lists.sourceforge.net [mailto:nagiosplug-devel-admin at lists.sourceforge.net] On Behalf Of noreply at sourceforge.net Sent: Friday, December 20, 2002 6:11 AM To: noreply at sourceforge.net Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-656754 ] check_procs (not cmd longer that 15char) Bugs item #656754, was opened at 2002-12-20 04:11 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=656754&group_id=2 9880 Category: Parsing problem Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: check_procs (not cmd longer that 15char) Initial Comment: "check_procs -C rendering_server" doesn't find any process but "check_procs -C rendering_serve" does. '/bin/ps -axo "stat uid ppid comm args"' clips the comm argument at 15chars in my system. (Redhat 7.0 linux 2.4.9). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=656754&group_id=2 9880 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Nagiosplug-devel mailing list Nagiosplug-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel From russell at quadrix.com Mon Dec 23 09:38:06 2002 From: russell at quadrix.com (Russell Scibetti) Date: Mon Dec 23 09:38:06 2002 Subject: [Nagiosplug-devel] check_ifstatus.pl and check_ifoperstatus.pl Message-ID: <3E074B65.4060606@quadrix.com> I have found a definite bug in check_ifstatus.pl from Nagiosplug 1.3b2. There is a closing curly brace missing to end the foreach $key (keys %ifStatus) { loop that starts at line 185. This is a definite problem that's easy to fix. There is also a potential other problem with this and the check_ifoperstatus.pl plugin. Both have the line "use POSIX;" in the plugin. However, with this line in, I get this error: PROMPT:/usr/local/nagios/infra/libexec> ./check_ifoperstatus Prototype mismatch: sub main::NULL vs () at /usr/lib/perl5/5.6.0/Exporter.pm line 57. Exporter::import('INTEGER', 'INTEGER32', 'OCTET_STRING', 'NULL', 'OBJECT_IDENTIFIER', 'IPADDRESS', 'COUNTER', 'COUNTER32', ...) called at ./check_ifoperstatus line 40 main::BEGIN() called at /usr/lib/perl5/site_perl/5.6.0/Net/SNMP.pm line 40 require 0 called at /usr/lib/perl5/site_perl/5.6.0/Net/SNMP.pm line 4 When I comment out that line (and fix the missing curly brace), both plugins work fine. So, my question is, what is the use POSIX line supposed to be doing, and is it necessary? I have included a context diff patch that adds the curly brace and comments out the use POSIX line in check_ifstatus.pl. Thanks. -Russell Scibetti -- Russell Scibetti Quadrix Solutions, Inc. http://www.quadrix.com (732) 235-2335, ext. 7038 From russell at fcfcn.org Mon Dec 23 12:27:02 2002 From: russell at fcfcn.org (Russell Scibetti) Date: Mon Dec 23 12:27:02 2002 Subject: [Nagiosplug-devel] [Nagios-devel] check_ifstatus.pl and check_ifoperstatus.pl Message-ID: <3E074B65.4060606@quadrix.com> I have found a definite bug in check_ifstatus.pl from Nagiosplug 1.3b2. There is a closing curly brace missing to end the foreach $key (keys %ifStatus) { loop that starts at line 185. This is a definite problem that's easy to fix. There is also a potential other problem with this and the check_ifoperstatus.pl plugin. Both have the line "use POSIX;" in the plugin. However, with this line in, I get this error: PROMPT:/usr/local/nagios/infra/libexec> ./check_ifoperstatus Prototype mismatch: sub main::NULL vs () at /usr/lib/perl5/5.6.0/Exporter.pm line 57. Exporter::import('INTEGER', 'INTEGER32', 'OCTET_STRING', 'NULL', 'OBJECT_IDENTIFIER', 'IPADDRESS', 'COUNTER', 'COUNTER32', ...) called at ./check_ifoperstatus line 40 main::BEGIN() called at /usr/lib/perl5/site_perl/5.6.0/Net/SNMP.pm line 40 require 0 called at /usr/lib/perl5/site_perl/5.6.0/Net/SNMP.pm line 4 When I comment out that line (and fix the missing curly brace), both plugins work fine. So, my question is, what is the use POSIX line supposed to be doing, and is it necessary? I have included a context diff patch that adds the curly brace and comments out the use POSIX line in check_ifstatus.pl. Thanks. -Russell Scibetti -- Russell Scibetti Quadrix Solutions, Inc. http://www.quadrix.com (732) 235-2335, ext. 7038 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Nagios-devel mailing list Nagios-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-devel From russell at fcfcn.org Mon Dec 23 12:27:03 2002 From: russell at fcfcn.org (Russell Scibetti) Date: Mon Dec 23 12:27:03 2002 Subject: [Nagiosplug-devel] [Nagios-devel] check_ifstatus.pl and check_ifoperstatus.pl Message-ID: <3E074B65.4060606@quadrix.com> I have found a definite bug in check_ifstatus.pl from Nagiosplug 1.3b2. There is a closing curly brace missing to end the foreach $key (keys %ifStatus) { loop that starts at line 185. This is a definite problem that's easy to fix. There is also a potential other problem with this and the check_ifoperstatus.pl plugin. Both have the line "use POSIX;" in the plugin. However, with this line in, I get this error: PROMPT:/usr/local/nagios/infra/libexec> ./check_ifoperstatus Prototype mismatch: sub main::NULL vs () at /usr/lib/perl5/5.6.0/Exporter.pm line 57. Exporter::import('INTEGER', 'INTEGER32', 'OCTET_STRING', 'NULL', 'OBJECT_IDENTIFIER', 'IPADDRESS', 'COUNTER', 'COUNTER32', ...) called at ./check_ifoperstatus line 40 main::BEGIN() called at /usr/lib/perl5/site_perl/5.6.0/Net/SNMP.pm line 40 require 0 called at /usr/lib/perl5/site_perl/5.6.0/Net/SNMP.pm line 4 When I comment out that line (and fix the missing curly brace), both plugins work fine. So, my question is, what is the use POSIX line supposed to be doing, and is it necessary? I have included a context diff patch that adds the curly brace and comments out the use POSIX line in check_ifstatus.pl. Thanks. -Russell Scibetti -- Russell Scibetti Quadrix Solutions, Inc. http://www.quadrix.com (732) 235-2335, ext. 7038 ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Nagios-devel mailing list Nagios-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-devel From beaker at beakerware.net Mon Dec 23 14:09:04 2002 From: beaker at beakerware.net (Michael Kingsbury) Date: Mon Dec 23 14:09:04 2002 Subject: [Nagiosplug-devel] Patch for plugins/check_disk.c - string change. Message-ID: <7B716C4BC69B63428F30B58B1045782C1F1A@dsl092-067-229.bos1.dsl.speakeasy.net> Attached is a patch for the check_disk, as the help incorrectly describes the usage when percents are used as arguments. Instead of: "Exit with WARNING status if more than PERCENT of disk space is free", we change the message to: "Exit with WARNING status if less than PERCENT of disk space is free" -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.check_disk Type: application/octet-stream Size: 900 bytes Desc: patch.check_disk URL: From Stanley.Hopcroft at IPAustralia.Gov.AU Wed Dec 25 02:09:04 2002 From: Stanley.Hopcroft at IPAustralia.Gov.AU (Stanley Hopcroft) Date: Wed Dec 25 02:09:04 2002 Subject: [Nagiosplug-devel] Re: [Nagios-devel] check_ifstatus.pl and check_ifoperstatus.pl In-Reply-To: <3E074B65.4060606@quadrix.com>; from russell@quadrix.com on Mon, Dec 23, 2002 at 12:44:05PM -0500 References: <3E074B65.4060606@quadrix.com> Message-ID: <20021225210819.A217@IPAustralia.Gov.AU> Dear Sir, I am writing to thank you for your letter, wish you and your family a happy Christmas and say, On Mon, Dec 23, 2002 at 12:44:05PM -0500, Russell Scibetti wrote: > I have found a definite bug in check_ifstatus.pl from Nagiosplug 1.3b2. > There is a closing curly brace missing to end the > > foreach $key (keys %ifStatus) { > > loop that starts at line 185. This is a definite problem that's easy to > fix. > Yep. > There is also a potential other problem with this and the > check_ifoperstatus.pl plugin. Both have the line "use POSIX;" in the > plugin. However, with this line in, I get this error: > This however is a little more controversial, modulo no experience with Net::SNMP. 1 That is not my experience with the POSIX module of an older Perl (5.00503). The plugin compiles fine with the POSIX module (but without Net::SNMP since I don't have it). pc09011> perl -c check_ifstatus check_ifstatus syntax OK pc09011> perl -v This is perl, version 5.005_03 built for i386-freebsd That said, I think the POSIX module should not be imported since it is a humungous module most often used to import only nominated POSIX functions such as strftime, and more importantly is not AFAIK used by either of these checks. > PROMPT:/usr/local/nagios/infra/libexec> ./check_ifoperstatus > > Prototype mismatch: sub main::NULL vs () at > /usr/lib/perl5/5.6.0/Exporter.pm line 57. > Exporter::import('INTEGER', 'INTEGER32', 'OCTET_STRING', 'NULL', > 'OBJECT_IDENTIFIER', 'IPADDRESS', 'COUNTER', 'COUNTER32', ...) called at > ./check_ifoperstatus line 40 > main::BEGIN() called at > /usr/lib/perl5/site_perl/5.6.0/Net/SNMP.pm line 40 > require 0 called at /usr/lib/perl5/site_perl/5.6.0/Net/SNMP.pm > line 4 what this looks like to me is a problem with the use statement for Net::SNMP, especially since line 40 is the line referring to that module and the names 'INTEGER' etc are the standard exports for Net::SNMP. Does your version of the plugin have 'use Net::SNMP;' or 'use Net::SNMP();' ? > > > When I comment out that line (and fix the missing curly brace), both > plugins work fine. So, my question is, what is the use POSIX line > supposed to be doing, and is it necessary? > > I have included a context diff patch that adds the curly brace and > comments out the use POSIX line in check_ifstatus.pl. Thanks. > > -Russell Scibetti > > -- > Russell Scibetti > Quadrix Solutions, Inc. > http://www.quadrix.com > (732) 235-2335, ext. 7038 Yours sincerely. -- ------------------------------------------------------------------------ Stanley Hopcroft ------------------------------------------------------------------------ '...No man is an island, entire of itself; every man is a piece of the continent, a part of the main. If a clod be washed away by the sea, Europe is the less, as well as if a promontory were, as well as if a manor of thy friend's or of thine own were. Any man's death diminishes me, because I am involved in mankind; and therefore never send to know for whom the bell tolls; it tolls for thee...' from Meditation 17, J Donne. From noreply at sourceforge.net Sat Dec 28 09:06:03 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Sat Dec 28 09:06:03 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Support Requests-659415 ] ldd statusmap.cgi show can't find libgd. Message-ID: Support Requests item #659415, was opened at 2002-12-28 08:48 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=659415&group_id=29880 Category: Install Problem (example) Group: v1.0 (example) Status: Open Priority: 5 Submitted By: ApiaTech Support (apiatech) Assigned to: Nobody/Anonymous (nobody) Summary: ldd statusmap.cgi show can't find libgd. Initial Comment: I have successfully installed all prerequisites for libgd and the statusmap.cgi but statusmap.cgi, trends.cgi. and histogram.cgi are unable to find the libgd.so.2 libraries. I have even specified the --with options with the path to the libgd libraries but it seems to have no effect. What more can be done? ./configure --prefix=/home/apps/nagios --with-cgiurl=/cgi- bin/nagios --with-htmurl=/nagios --with-nagios- user=nagios --with-nagios-grp=nagios --with-gd- lib=/usr/local/lib --with-gd-inc=/usr/local/lib I have tried the ./configure with and without the --with-gd- inc option. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=659415&group_id=29880 From sghosh at sghosh.org Mon Dec 30 09:38:02 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Mon Dec 30 09:38:02 2002 Subject: [Nagiosplug-devel] check_ntp plugin In-Reply-To: <20021219021811.GA3201@UnderGrid.net> Message-ID: On Wed, 18 Dec 2002, Jeremy T. Bouse wrote: > On Wed, Dec 18, 2002 at 11:21:26AM +0100, Leif Nixon wrote: > > Rhys McWilliams writes: > > > > > However, I have just run into one minor problem with the check_ntp plugin. > > > It seems that the plugin does not like the underscore character in the > > > hostname specified with the -H option. > > > > > > Am I just being stupid about this (I use the underscore in quite a few of my > > > host names in the /etc/hosts)? > > > If not, is there a chance of this being fixed? > > > > Underscores are illegal in DNS, so it is generally not a good idea > > to use underscores in hostnames. > > > > Anyway, Nagios should give the host IP to the plugin, not the > > hostname, shouldn't it? > > > I was gonna make the comment that underscores are illegal in > DNS but figured someone else would do so as well... As for whether the > plugin is given the IP or the hostname depends on how you declare your > hosts in the configuration... If you give it a hostname it will try to > check the hostname, while if you give it an IP address it takes it as > the literal address... > > I really worked on this in my AF-independent code as it would > add interesting side effects... If you gave it an IPv4 address it was > obvious which protocol to use; likewise if you gave it an IPv6 address > it would know which protocol you were using... The fun began if you gave > it a hostname which could be either IPv4 only, IPv6 only or both IPv4 > and IPv6... > > Jeremy I think for the IPv6/IPv4 address resolution we should have the plugins accept a -4/-6 optarg to know which address resolution is preferred and call the appropriate routine. Should prbably add -4/-6 to the set of reserved options inn the guidelines.. -- -sg From Jeremy.Bouse at UnderGrid.net Mon Dec 30 13:28:03 2002 From: Jeremy.Bouse at UnderGrid.net (Jeremy T. Bouse) Date: Mon Dec 30 13:28:03 2002 Subject: [Nagiosplug-devel] check_ntp plugin In-Reply-To: References: <20021219021811.GA3201@UnderGrid.net> Message-ID: <20021230212558.GA7097@UnderGrid.net> That would bee a good idea but my thought would be if it's not specified to use whichever one... Otherwise you would end up having to specify -4/-6 for all commands... I think -4 for IPv4 only, -6 for IPv6 only or neither for whichever comes first... would be best... Jeremy On Mon, Dec 30, 2002 at 12:37:23PM -0500, Subhendu Ghosh wrote: > I think for the IPv6/IPv4 address resolution we should have the plugins > accept a -4/-6 optarg to know which address resolution is preferred and > call the appropriate routine. > > Should prbably add -4/-6 to the set of reserved options inn the > guidelines.. > -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From Jeremy.Bouse at UnderGrid.net Mon Dec 30 13:40:04 2002 From: Jeremy.Bouse at UnderGrid.net (Jeremy T. Bouse) Date: Mon Dec 30 13:40:04 2002 Subject: [Nagiosplug-devel] check_ntp plugin In-Reply-To: <20021230212558.GA7097@UnderGrid.net> References: <20021219021811.GA3201@UnderGrid.net> <20021230212558.GA7097@UnderGrid.net> Message-ID: <20021230213745.GC7097@UnderGrid.net> Sorry to reply to my own post... But I wanted to add that in the patches I make the option of having it pick whichever is easy as that is the default of the getaddrinfo() function to grab any AAAA, A6 or A RRs for a hostname or IP address... The difference would be in setting the AF Family value prior to the call to getaddrinfo() or getnameinfo() which I can modify all my patches to do so if I have a variable to look for... As I tried to do these calls in one function that all other functions needing it could call would limit the changes needed to be made I think... Is this worth working alongside someone to accomplish? Jeremy On Mon, Dec 30, 2002 at 01:25:58PM -0800, Jeremy T. Bouse wrote: > That would bee a good idea but my thought would be if it's not > specified to use whichever one... Otherwise you would end up having to > specify -4/-6 for all commands... I think -4 for IPv4 only, -6 for IPv6 > only or neither for whichever comes first... would be best... > > Jeremy > > On Mon, Dec 30, 2002 at 12:37:23PM -0500, Subhendu Ghosh wrote: > > I think for the IPv6/IPv4 address resolution we should have the plugins > > accept a -4/-6 optarg to know which address resolution is preferred and > > call the appropriate routine. > > > > Should prbably add -4/-6 to the set of reserved options inn the > > guidelines.. > > -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From Jeremy.Bouse at UnderGrid.net Mon Dec 30 14:17:03 2002 From: Jeremy.Bouse at UnderGrid.net (Jeremy T. Bouse) Date: Mon Dec 30 14:17:03 2002 Subject: [Nagiosplug-devel] check_ntp plugin In-Reply-To: <20021230213745.GC7097@UnderGrid.net> References: <20021219021811.GA3201@UnderGrid.net> <20021230212558.GA7097@UnderGrid.net> <20021230213745.GC7097@UnderGrid.net> Message-ID: <20021230221521.GA7932@UnderGrid.net> I think to get this working off the patches I've submit'd we'd be looking at modifing is_host() in utils.c a lil bit so instead of: int is_host (char *address) { if (is_ipv4_addr (address) || is_ipv6_addr (address) || is_hostname (address)) return (TRUE); return (FALSE); } we'd have something along the lines of: int is_host (char *address) { if (naf_family == AF_IPV4) if (is_ipv4_addr (address) || is_hostname (address)) return (TRUE); else if (naf_family == AF_IPV6) if (is_ipv6_addr (address) || is_hostname (address)) return (TRUE); else if (is_ipv4_addr (address) || is_ipv6_addr (address) || is_hostname (address)) return (TRUE); return (FALSE); } Of course is_hostname could be modified as well to add a naf_family parameter so it only checks for IPv4 or IPv6 hostnames... in netutils.c it would mean adding the parameter to the calls and then resolve_host_or_addr() is already written to handle an AF family parameter... Jeremy -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: