From tim.verhoeven.be at gmail.com Fri Mar 2 11:19:10 2007 From: tim.verhoeven.be at gmail.com (Tim Verhoeven) Date: Fri, 2 Mar 2007 11:19:10 +0100 Subject: [Nagiosplug-devel] Patch for check_cpu Message-ID: <2a7fce340703020219s692d2601y73114e935eab50b@mail.gmail.com> Hi, I'm using the check_cpu plugin on my system. To make it even more usefull I've added performance data output to it so I can use the check to also create graphs etc. Could the attached patch be applied ? Thanks, Tim -- Tim Verhoeven - dj at rootshell.be - 0479 / 88 11 83 Hoping the problem magically goes away by ignoring it is the "microsoft approach to programming" and should never be allowed. (Linus Torvalds) -------------- next part -------------- A non-text attachment was scrubbed... Name: check_cpu.patch Type: text/x-patch Size: 1907 bytes Desc: not available URL: From noreply at sourceforge.net Sun Mar 4 07:10:42 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Sat, 03 Mar 2007 22:10:42 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1673315 ] MAKEINSTALLDIRS not set correctly in po/Makefile Message-ID: Bugs item #1673315, was opened at 2007-03-04 00:10 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1673315&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Compilation Group: Release (specify) Status: Open Resolution: None Priority: 5 Private: No Submitted By: Brian J Kolden (bkolden) Assigned to: Nobody/Anonymous (nobody) Summary: MAKEINSTALLDIRS not set correctly in po/Makefile Initial Comment: Compiling nagios-plugins-1.4.6 on Ununtu Linux 6.06 ./configure make make[1]: Entering directory `/usr/src/nagios-plugins-1.4.6/po' /bin/sh @MKINSTALLDIRS@ /usr/local/nagios/share /bin/sh: @MKINSTALLDIRS@: No such file or directory make[1]: *** [install-data-yes] Error 127 make[1]: Leaving directory `/usr/src/nagios-plugins-1.4.6/po' make: *** [install-recursive] Error 1 diff po/Makefile po/Makefile.fix 33c33 < MKINSTALLDIRS = @MKINSTALLDIRS@ --- > MKINSTALLDIRS = ../mkinstalldirs This seemed to fix the problem. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1673315&group_id=29880 From noreply at sourceforge.net Sun Mar 4 17:08:49 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Sun, 04 Mar 2007 08:08:49 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1673315 ] MAKEINSTALLDIRS not set correctly in po/Makefile Message-ID: Bugs item #1673315, was opened at 2007-03-04 07:10 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1673315&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Compilation Group: Release (specify) >Status: Closed Resolution: None Priority: 5 Private: No Submitted By: Brian J Kolden (bkolden) Assigned to: Nobody/Anonymous (nobody) Summary: MAKEINSTALLDIRS not set correctly in po/Makefile Initial Comment: Compiling nagios-plugins-1.4.6 on Ununtu Linux 6.06 ./configure make make[1]: Entering directory `/usr/src/nagios-plugins-1.4.6/po' /bin/sh @MKINSTALLDIRS@ /usr/local/nagios/share /bin/sh: @MKINSTALLDIRS@: No such file or directory make[1]: *** [install-data-yes] Error 127 make[1]: Leaving directory `/usr/src/nagios-plugins-1.4.6/po' make: *** [install-recursive] Error 1 diff po/Makefile po/Makefile.fix 33c33 < MKINSTALLDIRS = @MKINSTALLDIRS@ --- > MKINSTALLDIRS = ../mkinstalldirs This seemed to fix the problem. ---------------------------------------------------------------------- >Comment By: Holger Weiss (hweiss) Date: 2007-03-04 17:08 Message: Logged In: YES user_id=759506 Originator: NO Yes, this was fixed in CVS some time ago. Thanks, Holger ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1673315&group_id=29880 From nagios at nagios.org Mon Mar 5 21:33:07 2007 From: nagios at nagios.org (Ethan Galstad) Date: Mon, 05 Mar 2007 14:33:07 -0600 Subject: [Nagiosplug-devel] --with-nagios-user/group options Message-ID: <45EC7E83.7060809@nagios.org> Hi Developers - I've been write a quick install guide for Nagios 3 (http://nagios.cvs.sourceforge.net/*checkout*/nagios/nagios/html/docs/quickstart.html) and noticed some issues when installing the latest stable release of the plugins (1.4.6). The --with-nagios-user/group configure script options have disappeared and cause some problems if you install the plugins as the root user (which you have to do for the check_dhcp and check_icmp plugins). The ownership on the plugins is root.root, which would normally be fine, except for the face that the check_dhcp and check_icmp have to (1) be setuid root and (2) be executable by the nagios user. The perms can't get set properly now that the --with-nagios-user/group options are gone. For the time being I've written instructions on how to fix the permissions, but that isn't optimal. Is there are reason why these configure script options were removed? Ethan Galstad, Nagios Developer --- Email: nagios at nagios.org Website: http://www.nagios.org From ton.voon at altinity.com Tue Mar 6 12:00:48 2007 From: ton.voon at altinity.com (Ton Voon) Date: Tue, 6 Mar 2007 11:00:48 +0000 Subject: [Nagiosplug-devel] --with-nagios-user/group options In-Reply-To: <45EC7E83.7060809@nagios.org> References: <45EC7E83.7060809@nagios.org> Message-ID: <75C5C039-27AC-413F-90B7-D73EA248FCCC@altinity.com> Hi Ethan, On 5 Mar 2007, at 20:33, Ethan Galstad wrote: > The --with-nagios-user/group configure script options have disappeared > and cause some problems if you install the plugins as the root user > (which you have to do for the check_dhcp and check_icmp plugins). > > The ownership on the plugins is root.root, which would normally be > fine, > except for the face that the check_dhcp and check_icmp have to (1) be > setuid root and (2) be executable by the nagios user. The perms can't > get set properly now that the --with-nagios-user/group options are > gone. > > For the time being I've written instructions on how to fix the > permissions, but that isn't optimal. Is there are reason why these > configure script options were removed? > My reasoning for the removal of the --with-nagios-user/group was to be more like GNU coreutils. I think this is more packaging friendly, since a user does not need to be created on the packaging server. It also seems to be how other projects handle installs: I've downloaded Apache and GNU coreutils and a "make install" shows that files are installed by the current user. Mysql's documentation also suggests that setting user/group permissions are a separate task: http:// dev.mysql.com/doc/refman/5.1/en/quick-install.html I think it is a packager or an implementor's job to tie down any permissions to be as secure as they wish (change all plugins to be nagios user executable only, setup sudo instead, etc). I concede that the root plugins are not useable immediately. Checking coreutils, they run "chmod a=rx,u+s" and "chown root" for the su binary, which we should do as well for the root plugins. I've just committed that to CVS and updated various docs to try and make this clearer. For your quick start guide, the "make install-root" step is not required as all the plugin compile and install steps are done as the root user. The chown and chmod steps can also be removed (though permissions are open). However, there is quite a bit of confusion about this, probably due to the plugins "doing it how other projects are doing it", rather than "how Nagios does it" - this is not a complaint, just an observation. Any other thoughts? I'd be especially interested from packagers if this way makes it easier or not. If not, then maybe switching back to --with-nagios-user/group is preferable. One possibility is that the default behaviour is as current, but if --with-nagios-user/group is set, to specifically use those settings. Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon From noreply at sourceforge.net Tue Mar 6 18:28:05 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 06 Mar 2007 09:28:05 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1660953 ] check_disk.t - test 36 exiting non ok but should be ok Message-ID: Bugs item #1660953, was opened at 2007-02-15 21:50 Message generated for change (Comment added) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1660953&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: CVS >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Matthias Eble (psychotrahe) >Assigned to: Ton Voon (tonvoon) Summary: check_disk.t - test 36 exiting non ok but should be ok Initial Comment: hi all, I was just setting up a testing environment for the nagios plugins when I noticed a false positive. check_disk claims / 4641 MB (75% inode=97%); /var 2369 MB (57% inode=93%) which is right. but test case #36 exits non ok executing ./check_disk -e -W 95% -K 0% -p /var -W 95% -K 95% -p / not ok 36 - Has ignored / as not a problem # Failed test 'Has ignored / as not a problem' # at t/check_disk.t line 201. # 'DISK WARNING - free space: /var 2485 MB (60% inode=93%);' # matches '(?-xism:/)' imo because /var matches /. Finding / means there's a problem with the test. Everything works fine if / has less free inodes than /var. changing unlike( $result->only_output, qr/$more_inode_free/, "Has ignored $more_inode_free as not a problem"); to unlike( $result->only_output, qr/$more_inode_free\s/, "Has ignored $more_inode_free as not a problem"); helps. Maybe there are more expressions like this in check_disk.t. I did no further examinations. matthias P.S. The test can't be executed using Reiser filesystems since check_disk can't determine inode usage on reiserfs (at least on my notebook) and exits. ---------------------------------------------------------------------- >Comment By: Ton Voon (tonvoon) Date: 2007-03-06 17:28 Message: Logged In: YES user_id=664364 Originator: NO Matthias, Good spot. Fixed in CVS. Thanks. Ton P.S. I don't have reiserfs on any of my systems. Please bring up the discussion on the mailing list to work out what should be done in the case of inode checks. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1660953&group_id=29880 From noreply at sourceforge.net Tue Mar 6 18:31:24 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 06 Mar 2007 09:31:24 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1666601 ] Solaris 8 check_procs plugin hangs until timeout Message-ID: Bugs item #1666601, was opened at 2007-02-22 23:33 Message generated for change (Comment added) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1666601&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None >Status: Pending >Resolution: Fixed Priority: 5 Private: No Submitted By: John R. Taisto (jtaisto) >Assigned to: Ton Voon (tonvoon) Summary: Solaris 8 check_procs plugin hangs until timeout Initial Comment: check_procs (nagios-plugins 1.4.6) 1.57 Always exits with a timeout no matter how long it's given. Example 1: $plugins/check_procs -w 10 -c 20 --metric=CPU -t 10 CRITICAL - Plugin timed out after 10 seconds Example 2: plugins/check_procs -w 10 -c 20 --metric=CPU -t 60 CRITICAL - Plugin timed out after 60 seconds Solaris 8 (Generic kernel -44) Compiled with gcc 3.4.6 (SPARC) (-O2 -m64) No errors reported and binary gets created: Other plugins seem to work fine: No missing libraries: $ ldd plugins/check_procs libnsl.so.1 => /usr/lib/64/libnsl.so.1 libsocket.so.1 => /usr/lib/64/libsocket.so.1 libc.so.1 => /usr/lib/64/libc.so.1 libdl.so.1 => /usr/lib/64/libdl.so.1 libmp.so.2 => /usr/lib/64/libmp.so.2 /usr/platform/SUNW,Sun-Blade-100/lib/sparcv9/libc_psr.so.1 Truss output: truss -c ./plugins/check_procs -w 10 -c 20 --metric=CPU -t 10 CRITICAL - Plugin timed out after 10 seconds signals ------------ SIGALRM 1 total: 1 syscall seconds calls errors _exit .00 1 fork .00 1 read 2.04 138822 write .00 1 open .00 12 1 close .00 13 brk .00 4 stat .00 40 29 lseek .00 3 2 getpid .00 1 alarm .00 1 fstat .00 1 kill .01 1 pipe .00 2 ioctl .00 2 1 execve .00 1 sigaction .00 1 mmap .00 32 munmap .00 5 setrlimit .00 1 getrlimit .00 1 memcntl .00 4 resolvepath .00 12 ------- ------ ---- sys totals: 2.05 138962 33 usr time: .53 elapsed: 10.04 ---------------------------------------------------------------------- >Comment By: Ton Voon (tonvoon) Date: 2007-03-06 17:31 Message: Logged In: YES user_id=664364 Originator: NO John, Can you please try the snapshot at http://nagiosplug.sf.net/snapshot. The ps command has changed from pst3 to /usr/ucb/ps for Solaris. I've marked this call in pending. Please update if there is still a problem. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1666601&group_id=29880 From noreply at sourceforge.net Tue Mar 6 18:35:21 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 06 Mar 2007 09:35:21 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1495828 ] pst3 failure on solaris 10 x86 Message-ID: Bugs item #1495828, was opened at 2006-05-27 02:40 Message generated for change (Comment added) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1495828&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: CVS >Status: Pending >Resolution: Fixed Priority: 5 Private: No Submitted By: edward dertouzas (ophten) >Assigned to: Ton Voon (tonvoon) Summary: pst3 failure on solaris 10 x86 Initial Comment: https://sourceforge.net/tracker/index.php?func=detail&aid=1476451&group_id=29880&atid=397597 check_procs fails on Solaris 10 x86: root at infdb4.prodqa.coremetrics.com # ./check_procs -vvv CMD: /usr/local/nagios_new/libexec/pst3 CRITICAL - Plugin timed out after 10 seconds truss shows this just spinning through a read, finding nothing, then eventually trapping a SIGALRM. Onward! root at infdb4.prodqa.coremetrics.com # /usr/local/nagios_new/libexec/pst3 /usr/local/nagios_new/libexec/pst3: /dev/ksyms is not a 32-bit kernel namelist pst3: Failed to open kernel memory: Error 0 It appears we're using a 32-bit version of libkvm. I assume the generic /usr/lib/libkvm.so is a 32-bit version while /usr/lib/amd64/libkvm.so is 64-bit. At least the ELF class for libkvm.so is 64-bit. I can't seem to find the write linking magic to make this work. ---------------------------------------------------------------------- >Comment By: Ton Voon (tonvoon) Date: 2007-03-06 17:35 Message: Logged In: YES user_id=664364 Originator: NO Hi! Can you please try the snapshot at http://nagiosplug.sf.net/snapshot. The ps command has changed from pst3 to /usr/ucb/ps for Solaris. I've marked this call in pending. Please update if there is still a problem. Ton ---------------------------------------------------------------------- Comment By: Ade Rixon (aderixon) Date: 2006-11-02 20:55 Message: Logged In: YES user_id=145082 Update to my previous comment: you must compile all the plugins in their entirety as 32 bit or 64 bit, and the supporting libraries must match, due to the interdependencies between object files. For Solaris, this effectively means 64 bit throughout only. The alternative is to bodge config.h to use the builtin ps command instead. ---------------------------------------------------------------------- Comment By: Ade Rixon (aderixon) Date: 2006-11-02 15:44 Message: Logged In: YES user_id=145082 pst3 needs to be compiled to match the Solaris kernel in use, either 32 bit or 64 bit (usually the latter on recent SPARC hardware). For the Sun Studio compiler, add -xarch=v9a to the CFLAGS. For GCC, add -m64. However, this may not be correct for other plugins since it depends what bit size the supporting libraries were compiled for (e.g. compiling in 64 bit mode against a 32 bit OpenSSL library won't work). I'd suggest adding the extra parameters only to CFLAGS in plugin-root/Makefile. This looks like something that needs detecting at configure time. ---------------------------------------------------------------------- Comment By: Duncan Ferguson (duncan_ferguson) Date: 2006-10-09 11:27 Message: Logged In: YES user_id=865292 This problem also occurs on Solaris 10 (06/06) sparc ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1495828&group_id=29880 From noreply at sourceforge.net Tue Mar 6 18:36:22 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 06 Mar 2007 09:36:22 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1541340 ] check_procs won't execute on Solaris 9 x86 Message-ID: Bugs item #1541340, was opened at 2006-08-16 15:43 Message generated for change (Comment added) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1541340&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None >Status: Pending Resolution: None Priority: 5 Private: No Submitted By: maemigh (maemigh) >Assigned to: Ton Voon (tonvoon) Summary: check_procs won't execute on Solaris 9 x86 Initial Comment: check_procs (from latest snapshot) just hangs and exits with a timeout error on Solaris 9 x86. It tries to use the pst3 command. I modified config.h to point to the location of pst3 and verbose mode shows the correct location. I was able to fix it by changing config.h to use the regular ps command as suggested in another bug post. pst3 runs fine with executed from the shell prompt. ---------------------------------------------------------------------- >Comment By: Ton Voon (tonvoon) Date: 2007-03-06 17:36 Message: Logged In: YES user_id=664364 Originator: NO Hi! Can you please try the snapshot at http://nagiosplug.sf.net/snapshot. The ps command has changed from pst3 to /usr/ucb/ps for Solaris. I've marked this call in pending. Please update if there is still a problem. Ton ---------------------------------------------------------------------- Comment By: Ade Rixon (aderixon) Date: 2006-11-02 15:48 Message: Logged In: YES user_id=145082 See bug 1495828 (pst3 failure on solaris 10 x86) for info. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1541340&group_id=29880 From ton.voon at altinity.com Tue Mar 6 18:36:38 2007 From: ton.voon at altinity.com (Ton Voon) Date: Tue, 6 Mar 2007 17:36:38 +0000 Subject: [Nagiosplug-devel] Solaris problems (check_procs resolution in CVS) In-Reply-To: <57065.216.49.181.128.1165605394.squirrel@webmail.netshel.net> References: <200612081518.kB8FIbe8010410@mx1.cs.umb.edu> <57065.216.49.181.128.1165605394.squirrel@webmail.netshel.net> Message-ID: <42197634-11FE-4B25-B544-2F71267CDD0C@altinity.com> On 8 Dec 2006, at 19:16, bobi at netshel.net wrote: > Apparently nothing is wrong with "/usr/ucb/ps -uaxwww" except my > ignorance > of it... > > Assuming that it exists and works the same way on Solaris 9 and > upwards, I > vote that pst3 get removed from the distro ASAP and the ps string > in the > configration for Solaris be replaced with "/usr/ucb/ps -uaxwww" > I have only just got round to this as there have been lots of emails recently about check_procs not working satisfactorily on Solaris. On my 32 bit Solaris 9 server, I'm using the ps command /usr/ucb/ps - alxwwn. The reason is that -l gives us the PPID field, which is not available otherwise, and -n gives us the numeric userid, as on other ps commands. According to the docs, -ww is sufficient for long output (http://docs.sun.com/app/docs/doc/816-0210/6m6nb7mif?a=view). If /usr/ucb/ps is not available, ./configure will drop down to using the previous ps command spec (with the command argument limitations). The only issue seems to be that I cannot get the procprog variable to be set because the ps command does not output the command name field (command arguments are okay). I guess we could add code into check_procs to calculate procprog based on procargs, but that's not always true. I haven't removed pst3 completely from the distribution, because if this doesn't work out, then maybe some more time devoted to pst3 in 64 bit mode would be beneficial. The new ps detection is in CVS now. If you are interested in Solaris functionality, I'd appreciate any feedback. Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon From seanius at seanius.net Tue Mar 6 19:55:38 2007 From: seanius at seanius.net (sean finney) Date: Tue, 06 Mar 2007 19:55:38 +0100 Subject: [Nagiosplug-devel] --with-nagios-user/group options In-Reply-To: <75C5C039-27AC-413F-90B7-D73EA248FCCC@altinity.com> References: <45EC7E83.7060809@nagios.org> <75C5C039-27AC-413F-90B7-D73EA248FCCC@altinity.com> Message-ID: <1173207338.5546.8.camel@localhost> hey guys, On Tue, 2007-03-06 at 11:00 +0000, Ton Voon wrote: > However, there is quite a bit of confusion about this, probably due > to the plugins "doing it how other projects are doing it", rather > than "how Nagios does it" - this is not a complaint, just an > observation. > > Any other thoughts? I'd be especially interested from packagers if > this way makes it easier or not. If not, then maybe switching back to > --with-nagios-user/group is preferable. One possibility is that the > default behaviour is as current, but if --with-nagios-user/group is > set, to specifically use those settings. i don't really have a strong opinion on this one way or the other. fwiw the debian plugins currently don't install with the suid bit set at all (directions on doing so are provided in the package docs though). sean -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: This is a digitally signed message part URL: From noreply at sourceforge.net Tue Mar 6 22:30:30 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 06 Mar 2007 13:30:30 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1675279 ] [SMTP] Broken 'EHLO (null)' request Message-ID: Bugs item #1675279, was opened at 2007-03-06 22:30 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1675279&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: CVS Status: Open Resolution: None Priority: 5 Private: No Submitted By: Enrico Scholz (ensc) Assigned to: Nobody/Anonymous (nobody) Summary: [SMTP] Broken 'EHLO (null)' request Initial Comment: The check_smtp plugin was broken by CVS release 1.55 and generates | EHLO (null) commands which are rejected by the MTA. This is caused by the removal of | if(!hp) helocmd = localhostname; | else helocmd = hp->h_name; in the 'if (! localhost)' clause causing an unset 'helocmd'. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1675279&group_id=29880 From noreply at sourceforge.net Tue Mar 6 22:37:42 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 06 Mar 2007 13:37:42 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1675286 ] The "-S" flag on the check_by_ssh plugin does not work Message-ID: Bugs item #1675286, was opened at 2007-03-06 16:37 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1675286&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Hector (higles2000) Assigned to: Nobody/Anonymous (nobody) Summary: The "-S" flag on the check_by_ssh plugin does not work Initial Comment: The "-S" flag on the check_by_ssh plugin does not work in versions 1.4.3 and 1.4.6, it does work when I run version 1.4.2. Not sure what changed from one version to the next. Suppressing stderr altogether for this plugin would also resolve the issue. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1675286&group_id=29880 From Thomas at zango.com Tue Mar 6 22:41:11 2007 From: Thomas at zango.com (Thomas Guyot-Sionnest) Date: Tue, 6 Mar 2007 13:41:11 -0800 Subject: [Nagiosplug-devel] Check_disk_smb thresholds Message-ID: <804160344192334BB21922E8082EA6C0622B73@seaex01.180solutions.com> Hey there, I'm using check_disk_smb for monitoring samba but I do not want to set thresholds as I'm already monitoring the disk. What do you guys think about making the thresholds optionnal? Also warning can't be equal to critical and I thing it shouldn't be the case. If one want to report only critical then the only way is to have -w == -c (or being able to omit thresholds; setting both to the same value leave no doubt about what you expect) If no one has objections I'll fix the equality, but what is your thoughts about optionnal warning/critical? Since the plugin set default values automatically maybe setting them to 0 or <0 could do the trick without brealing compatibility? Another oprion is to symlink 'check_samba' to it and default to no thresholds if we're called as check_samba. Thomas -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3076 bytes Desc: not available URL: From noreply at sourceforge.net Tue Mar 6 23:11:09 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 06 Mar 2007 14:11:09 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1675306 ] [DHCP] Does not add mandatory 'end' option Message-ID: Bugs item #1675306, was opened at 2007-03-06 23:11 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1675306&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: CVS Status: Open Resolution: None Priority: 5 Private: No Submitted By: Enrico Scholz (ensc) Assigned to: Nobody/Anonymous (nobody) Summary: [DHCP] Does not add mandatory 'end' option Initial Comment: RFC 2131 states in 4.1 "Constructing and sending DHCP messages": | The last option must always be the 'end' option. The check-dhcp plugin does not add such an end (0xff) option. This might be rejected by DHCP servers/forwarders causing false positives. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1675306&group_id=29880 From noreply at sourceforge.net Tue Mar 6 23:18:10 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 06 Mar 2007 14:18:10 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1675279 ] [SMTP] Broken 'EHLO (null)' request Message-ID: Bugs item #1675279, was opened at 2007-03-06 21:30 Message generated for change (Comment added) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1675279&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: CVS >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Enrico Scholz (ensc) >Assigned to: Ton Voon (tonvoon) Summary: [SMTP] Broken 'EHLO (null)' request Initial Comment: The check_smtp plugin was broken by CVS release 1.55 and generates | EHLO (null) commands which are rejected by the MTA. This is caused by the removal of | if(!hp) helocmd = localhostname; | else helocmd = hp->h_name; in the 'if (! localhost)' clause causing an unset 'helocmd'. ---------------------------------------------------------------------- >Comment By: Ton Voon (tonvoon) Date: 2007-03-06 22:18 Message: Logged In: YES user_id=664364 Originator: NO Enrico, Thanks for the report. This is fixed in CVS now. Please try the snapshot at http://nagiosplug.sf.net/snapshot Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1675279&group_id=29880 From noreply at sourceforge.net Tue Mar 6 23:46:22 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 06 Mar 2007 14:46:22 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1657280 ] Fix option handling for check_http Message-ID: Patches item #1657280, was opened at 2007-02-11 12:49 Message generated for change (Comment added) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1657280&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bugfix Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Nobuhiro Ban (ban_nobuhiro) >Assigned to: Ton Voon (tonvoon) Summary: Fix option handling for check_http Initial Comment: check_http does not recognize some long options. I read the source file, and found longopts[] was * Missing: --port --authorization --expect, * Dup: --verbose, * Not-used: -F --file, and `-L' option takes no argument but help-message says that it takes one argument. ---------------------------------------------------------------------- >Comment By: Ton Voon (tonvoon) Date: 2007-03-06 22:46 Message: Logged In: YES user_id=664364 Originator: NO Nobuhiro, Thanks. Patch applied to CVS. Ton ---------------------------------------------------------------------- Comment By: Nobuhiro Ban (ban_nobuhiro) Date: 2007-02-11 12:58 Message: Logged In: YES user_id=1699577 Originator: YES File Added: check_http.c.diff ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1657280&group_id=29880 From gavin at openfusion.com.au Wed Mar 7 00:32:02 2007 From: gavin at openfusion.com.au (Gavin Carr) Date: Wed, 7 Mar 2007 10:32:02 +1100 Subject: [Nagiosplug-devel] --with-nagios-user/group options In-Reply-To: <75C5C039-27AC-413F-90B7-D73EA248FCCC@altinity.com> References: <45EC7E83.7060809@nagios.org> <75C5C039-27AC-413F-90B7-D73EA248FCCC@altinity.com> Message-ID: <20070306233202.GA29270@openfusion.com.au> On Tue, Mar 06, 2007 at 11:00:48AM +0000, Ton Voon wrote: > On 5 Mar 2007, at 20:33, Ethan Galstad wrote: > > > The --with-nagios-user/group configure script options have disappeared > > and cause some problems if you install the plugins as the root user > > (which you have to do for the check_dhcp and check_icmp plugins). > > > > The ownership on the plugins is root.root, which would normally be > > fine, > > except for the face that the check_dhcp and check_icmp have to (1) be > > setuid root and (2) be executable by the nagios user. The perms can't > > get set properly now that the --with-nagios-user/group options are > > gone. > > > > For the time being I've written instructions on how to fix the > > permissions, but that isn't optimal. Is there are reason why these > > configure script options were removed? > > > > My reasoning for the removal of the --with-nagios-user/group was to > be more like GNU coreutils. I think this is more packaging friendly, > since a user does not need to be created on the packaging server. It > also seems to be how other projects handle installs: I've downloaded > Apache and GNU coreutils and a "make install" shows that files are > installed by the current user. Mysql's documentation also suggests > that setting user/group permissions are a separate task: http:// > dev.mysql.com/doc/refman/5.1/en/quick-install.html > > I think it is a packager or an implementor's job to tie down any > permissions to be as secure as they wish (change all plugins to be > nagios user executable only, setup sudo instead, etc). > > I concede that the root plugins are not useable immediately. At least, they're not _directly_ usable immediately. I always use them via sudo, for instance - that use case works fine, of course. > Checking > coreutils, they run "chmod a=rx,u+s" and "chown root" for the su > binary, which we should do as well for the root plugins. I've just > committed that to CVS and updated various docs to try and make this > clearer. > > For your quick start guide, the "make install-root" step is not > required as all the plugin compile and install steps are done as the > root user. The chown and chmod steps can also be removed (though > permissions are open). > > However, there is quite a bit of confusion about this, probably due > to the plugins "doing it how other projects are doing it", rather > than "how Nagios does it" - this is not a complaint, just an > observation. > > Any other thoughts? I'd be especially interested from packagers if > this way makes it easier or not. If not, then maybe switching back to > --with-nagios-user/group is preferable. One possibility is that the > default behaviour is as current, but if --with-nagios-user/group is > set, to specifically use those settings. Packaging is definitely cleaner if there is no _requirement_ that a nagios user or group exist at build time. So I think we want the current behaviour available, but supporting --with-nagios-user/group seems useful behaviour too, for the direct-install case. I'm ambivalent about automatically installing setuid. I guess it's really a judgement call on paranoia vs. convenience. I'd probably tend to to err on the side of paranoia and make the default install not do any setuid magic, and have an alternative install target for the extra-convenience version. If you go the other way, you should probably have a paranoia-target for those that don't want or need the setuid versions? And clearly non-root installs should continue to work as they do currently, with no ownership or setuid munging. Cheers, Gavin From BELLMR at ldschurch.org Wed Mar 7 17:45:00 2007 From: BELLMR at ldschurch.org (Marlo Bell) Date: Wed, 07 Mar 2007 09:45:00 -0700 Subject: [Nagiosplug-devel] Enhancement Patch for check_icmp Message-ID: <45EE899C.9C8C.0013.0@ldschurch.org> We had a need to use check_icmp to check redundant links and report back on the total availability (end-user perspective). Thus if one of the links was up, we needed the plugin to return an OK. To do this our now defunct developer (he left for another job) altered check_icmp to allow us to specify (-m) the minimum number of hosts which must return ok to report an OK to nagios. I moved the changes into nagios-plugins-1.4.6 and created the diff file and universal patch file. I have attached them-can we get this or a better implementation of this into CVS? Can anyone else benefit from it? Marlo Marlo ---------------------------------------------------------------------- NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: check_icmp.diff Type: application/octet-stream Size: 665 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: check_icmp.patch URL: From Thomas at zango.com Wed Mar 7 19:59:02 2007 From: Thomas at zango.com (Thomas Guyot-Sionnest) Date: Wed, 7 Mar 2007 10:59:02 -0800 Subject: [Nagiosplug-devel] Enhancement Patch for check_icmp In-Reply-To: <45EE899C.9C8C.0013.0@ldschurch.org> References: <45EE899C.9C8C.0013.0@ldschurch.org> Message-ID: <804160344192334BB21922E8082EA6C0622DA0@seaex01.180solutions.com> > -----Original Message----- > From: nagiosplug-devel-bounces at lists.sourceforge.net > [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On > Behalf Of Marlo Bell > Sent: March 7, 2007 11:45 > To: nagiosplug-devel at lists.sourceforge.net > Subject: [Nagiosplug-devel] Enhancement Patch for check_icmp > > We had a need to use check_icmp to check redundant links and > report back on the total availability (end-user perspective). > Thus if one of the links was up, we needed the plugin to return an OK. > > To do this our now defunct developer (he left for another > job) altered check_icmp to allow us to specify (-m) the > minimum number of hosts which must return ok to report an OK > to nagios. > > I moved the changes into nagios-plugins-1.4.6 and created the > diff file and universal patch file. I have attached them-can > we get this or a better implementation of this into CVS? Can > anyone else benefit from it? Indeed this is an interesting feature. I'll rework it a bit and commit it into CVS shortly. What I will change: 1. minHostsOk will be set to NULL initially 2. minHostsOk data type does not match with strtoul() 3. Return WARNING if at least minHostsOk hosts are in OK or WARNING state. 4. Will possibly add sanity checking 5. Add a testcase Thomas -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3076 bytes Desc: not available URL: From rmcgarry at sdbor.edu Wed Mar 7 23:31:43 2007 From: rmcgarry at sdbor.edu (McGarry, Ryan) Date: Wed, 7 Mar 2007 16:31:43 -0600 Subject: [Nagiosplug-devel] NRPE Issues Message-ID: Hi, Please excuse me if this is posted to the wrong list... I encountered an error compiling NRPE that I couldn't find a solution to on any of the mailing lists or Google. I thought I'd post how I fixed it. I'm installing NRPE 2.7 for the first time on an AIX host without GCC. After a successful configure, my first time doing a "make all" came back with this error. -------------------------------------------------------------------- utils.c: cc -g -I/usr/local/include/openssl -I/usr/local/include -DHAVE_CONFIG_H -o check_nrpe check_nrpe.c utils.c -L/usr/local/lib -lssl -lcrypto -lnsl check_nrpe.c: "check_nrpe.c", line 437.32: 1506-046 (S) Syntax error. utils.c: make: 1254-004 The error code from the last command is 1. Stop. make: 1254-004 The error code from the last command is 2. Stop. -------------------------------------------------------------------- On a hunch, I looked in check_nrpe, and noticed that this line was #437: shutdown(sd,SHUT_WR); // Send FIN packet So, I changed the comment to a C-style comment (/* Send FIN packet */), and it compiled successfully. I'm having a similar problem with Nagios-Plugins.. Thanks, Ryan McGarry Systems Software Specialist Regents Information Systems South Dakota Board of Regents From nagios at nagios.org Thu Mar 8 02:41:49 2007 From: nagios at nagios.org (Ethan Galstad) Date: Wed, 07 Mar 2007 19:41:49 -0600 Subject: [Nagiosplug-devel] NRPE Issues In-Reply-To: References: Message-ID: <45EF69DD.8060709@nagios.org> McGarry, Ryan wrote: > Hi, > > Please excuse me if this is posted to the wrong list... I encountered > an error compiling NRPE that I couldn't find a solution to on any of the > mailing lists or Google. I thought I'd post how I fixed it. > > I'm installing NRPE 2.7 for the first time on an AIX host without GCC. > > After a successful configure, my first time doing a "make all" came back > with this error. > > -------------------------------------------------------------------- > > utils.c: > cc -g -I/usr/local/include/openssl -I/usr/local/include > -DHAVE_CONFIG_H -o check_nrpe check_nrpe.c utils.c -L/usr/local/lib > -lssl -lcrypto -lnsl > check_nrpe.c: > "check_nrpe.c", line 437.32: 1506-046 (S) Syntax error. > utils.c: > make: 1254-004 The error code from the last command is 1. > > > Stop. > make: 1254-004 The error code from the last command is 2. > > > Stop. > -------------------------------------------------------------------- > > On a hunch, I looked in check_nrpe, and noticed that this line was #437: > shutdown(sd,SHUT_WR); // Send FIN packet > > So, I changed the comment to a C-style comment (/* Send FIN packet */), > and it compiled successfully. I'm having a similar problem with > Nagios-Plugins.. > > Thanks, > Ryan McGarry > Systems Software Specialist > Regents Information Systems > South Dakota Board of Regents > Thanks for the note! I'll patch the CVS code shortly and release a 2.7.1 in a day or two with new docs as well. Ethan Galstad, Nagios Developer --- Email: nagios at nagios.org Website: http://www.nagios.org From dermoth at aei.ca Thu Mar 8 07:14:02 2007 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Thu, 08 Mar 2007 01:14:02 -0500 Subject: [Nagiosplug-devel] NRPE Issues In-Reply-To: <45EF69DD.8060709@nagios.org> References: <45EF69DD.8060709@nagios.org> Message-ID: <45EFA9AA.6010704@aei.ca> On 07/03/07 08:41 PM, Ethan Galstad wrote: > McGarry, Ryan wrote: >> Hi, >> >> Please excuse me if this is posted to the wrong list... I encountered >> an error compiling NRPE that I couldn't find a solution to on any of the >> mailing lists or Google. I thought I'd post how I fixed it. >> >> I'm installing NRPE 2.7 for the first time on an AIX host without GCC. >> >> After a successful configure, my first time doing a "make all" came back >> with this error. >> >> -------------------------------------------------------------------- >> >> utils.c: >> cc -g -I/usr/local/include/openssl -I/usr/local/include >> -DHAVE_CONFIG_H -o check_nrpe check_nrpe.c utils.c -L/usr/local/lib >> -lssl -lcrypto -lnsl >> check_nrpe.c: >> "check_nrpe.c", line 437.32: 1506-046 (S) Syntax error. >> utils.c: >> make: 1254-004 The error code from the last command is 1. >> >> >> Stop. >> make: 1254-004 The error code from the last command is 2. >> >> >> Stop. >> -------------------------------------------------------------------- >> >> On a hunch, I looked in check_nrpe, and noticed that this line was #437: >> shutdown(sd,SHUT_WR); // Send FIN packet >> >> So, I changed the comment to a C-style comment (/* Send FIN packet */), >> and it compiled successfully. I'm having a similar problem with >> Nagios-Plugins.. >> >> Thanks, >> Ryan McGarry >> Systems Software Specialist >> Regents Information Systems >> South Dakota Board of Regents >> > > Thanks for the note! I'll patch the CVS code shortly and release a > 2.7.1 in a day or two with new docs as well. All occurrences in Nagios-plugins are fixed in CVS as well. Thomas From dermoth at aei.ca Thu Mar 8 10:15:00 2007 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Thu, 08 Mar 2007 04:15:00 -0500 Subject: [Nagiosplug-devel] Enhancement Patch for check_icmp In-Reply-To: <804160344192334BB21922E8082EA6C0622DA0@seaex01.180solutions.com> References: <45EE899C.9C8C.0013.0@ldschurch.org> <804160344192334BB21922E8082EA6C0622DA0@seaex01.180solutions.com> Message-ID: <45EFD414.3060206@aei.ca> On 07/03/07 01:59 PM, Thomas Guyot-Sionnest wrote: > > Indeed this is an interesting feature. I'll rework it a bit and commit it > into CVS shortly. > > What I will change: > > 1. minHostsOk will be set to NULL initially > 2. minHostsOk data type does not match with strtoul() > 3. Return WARNING if at least minHostsOk hosts are in OK or WARNING state. > 4. Will possibly add sanity checking > 5. Add a testcase This is in CVS. #1: I use -1 for unset as I expect some users may want to use 0. #2 was me reading too fast the patch, non-issue :) #5: There is no test folder there (Ton?) Thanks, Thomas From ton.voon at altinity.com Thu Mar 8 11:07:43 2007 From: ton.voon at altinity.com (Ton Voon) Date: Thu, 8 Mar 2007 10:07:43 +0000 Subject: [Nagiosplug-devel] Enhancement Patch for check_icmp In-Reply-To: <45EFD414.3060206@aei.ca> References: <45EE899C.9C8C.0013.0@ldschurch.org> <804160344192334BB21922E8082EA6C0622DA0@seaex01.180solutions.com> <45EFD414.3060206@aei.ca> Message-ID: <259DAFB9-6A72-4B2E-A63B-4C361610A736@altinity.com> On 8 Mar 2007, at 09:15, Thomas Guyot-Sionnest wrote: > On 07/03/07 01:59 PM, Thomas Guyot-Sionnest wrote: >> >> Indeed this is an interesting feature. I'll rework it a bit and >> commit it >> into CVS shortly. >> >> What I will change: >> >> 1. minHostsOk will be set to NULL initially >> 2. minHostsOk data type does not match with strtoul() >> 3. Return WARNING if at least minHostsOk hosts are in OK or >> WARNING state. >> 4. Will possibly add sanity checking >> 5. Add a testcase > > This is in CVS. > > #1: I use -1 for unset as I expect some users may want to use 0. > #2 was me reading too fast the patch, non-issue :) > #5: There is no test folder there (Ton?) I haven't put in any tests for the root plugins. We should do, but I'm not sure how we can cater for those. I'm guessing we need a test variable that says if sudo is allowed, so we can execute the compiled plugins as root. Then a build server can decide if they want to allow root testing or not. Leave it with me - I'll see if I can get some basic testing in there by end tomorrow. Thanks Marlo and good work Thomas. Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon From michael_luebben at web.de Thu Mar 8 15:18:15 2007 From: michael_luebben at web.de (=?iso-8859-15?Q?Michael_L=FCbben?=) Date: Thu, 08 Mar 2007 15:18:15 +0100 Subject: [Nagiosplug-devel] Idea for a new feature Message-ID: <986835147@web.de> Hi @all, on the webinterface from nagios, i can't see when freshness-option goes on. An idea was a little icon in the webinterfac,e what displays that the frehness-option goes on. Bye Michael ______________________________________________________________________ XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club! Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130 From Thomas at zango.com Thu Mar 8 18:27:21 2007 From: Thomas at zango.com (Thomas Guyot-Sionnest) Date: Thu, 8 Mar 2007 09:27:21 -0800 Subject: [Nagiosplug-devel] Check_http and web-based checks Message-ID: <804160344192334BB21922E8082EA6C062300C@seaex01.180solutions.com> Hi list, I just found out it could make my life much simpler if I could use web applications to do checks for me. I can with check_http (-s, -R), but I'd also like the ability to print what the script returned. I'd like to add two switches, -z (--print) -Z (--print-all). The former would replace check_http's result with the body of the page preserving check_http's performance data, while the latter would only print the page body. Used together with -s, -r or -R you can effectively write web plugins and use check_http to run them and gather the results. Additionally, if check_http already has code for handling this I could make a symlink (i.e. check_web) that would induce the -Z behavior, set -s to 'OK' and disable warn/crit thresholds (i.e. make them == to timeout). I could also add a warning switch (-W --warn-string ?) for warning, so that web-based checks would have full functionality. What do you think? Any objection? Comments? Better suggestions for switch names? Arguably this could be granted a new check plugin, but I'd like to use all check_http's features like SSL, authentication, regexps. Thomas -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3076 bytes Desc: not available URL: From dermoth at aei.ca Sat Mar 10 17:42:30 2007 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Sat, 10 Mar 2007 11:42:30 -0500 Subject: [Nagiosplug-devel] [Nagios-users] about Compiling Error In-Reply-To: References: Message-ID: <45F2DFF6.80101@aei.ca> On 10/03/07 03:46 AM, yokoyoko at rd.aisin.co.jp wrote: > > Hi ! > > I got the following errors when compiling nagios plugins (1.4.6) > > check_snmp.c: In function `main': > check_snmp.c:187: `PATH_TO_SNMPGETNEXT' undeclared (first use in this > function) > check_snmp.c:187: (Each undeclared identifier is reported only once > check_snmp.c:187: for each function it appears in.) > make[2]: *** [check_snmp.o] Error 1 > make[2]: Leaving directory `/usr/local/src/nagios-plugins-1.4.6/plugins' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/usr/local/src/nagios-plugins-1.4.6' > make: *** [all] Error 2 > > What do I do ? > Please help me ! > Best Regards. [Moving the thread to nagiosplug-devel mailing list...] Looks like a problem with configure not detecting properly your SNMP installation. Could you please provide me: - The os name and version - The version of SNMP on that server - Full path of the following commands: - snmpget - snmpgetnext - The config.log file from the build directory (please compress it with gzip or bzip2 first) Thanks, Thomas From ton.voon at altinity.com Sun Mar 11 02:08:17 2007 From: ton.voon at altinity.com (Ton Voon) Date: Sun, 11 Mar 2007 01:08:17 +0000 Subject: [Nagiosplug-devel] --with-nagios-user/group options In-Reply-To: <20070306233202.GA29270@openfusion.com.au> References: <45EC7E83.7060809@nagios.org> <75C5C039-27AC-413F-90B7-D73EA248FCCC@altinity.com> <20070306233202.GA29270@openfusion.com.au> Message-ID: On 6 Mar 2007, at 23:32, Gavin Carr wrote: >> Any other thoughts? I'd be especially interested from packagers if >> this way makes it easier or not. If not, then maybe switching back to >> --with-nagios-user/group is preferable. One possibility is that the >> default behaviour is as current, but if --with-nagios-user/group is >> set, to specifically use those settings. > > Packaging is definitely cleaner if there is no _requirement_ that a > nagios user or group exist at build time. So I think we want the > current behaviour available, but supporting --with-nagios-user/group > seems useful behaviour too, for the direct-install case. I've had a long think about this and I think it is stupid to *not* support --with-nagios-user/group. Currently I run post-install commands of: find /usr/local/nagios/libexec ! -perm -4000 -exec chown nagios:nagios {} find /usr/local/nagios/libexec -perm -4000 | while read file; do chgrp nagios $file; chmod u+s $file; done to set the permissions afterwards. But this is a very common use case (in Gavin's terms, the direct-install case). The whole point about configure scripts is to make common cases work by selecting appropriate flags. So my current thinking is to do this: - if you leave out with-nagios-user/group, it will install with the user that runs "make install". If user is root, then the setuid plugins will get installed in addition. This mimics coreutils, apache and mysql's behaviour - if you choose --with-nagios-user, then the normal plugins will be given ownership of the executables - if you choose --with-nagios-group, then the normal and root plugins will be given group ownership of the executables - if you choose a new --without-world-permissions, then normal and root plugins will not have world read or execute permissions So you gain most security by running ./configure --with-nagios-user=X --with-nagios-group=Y --without-world-permissions. Any other fine tuning of this would be left as an exercise to the user. The decision to install root plugins is made by whether you decide to install as root. I've had a quick look whether I can do this within the autoconf/ automake/libtool build chain and I can't find a supported method (the old AM_INSTALL_PROGRAM_FLAGS in plugins/Makefile.am in release 1.4.2 doesn't appear to work anymore). I've sent an email to the automake mailing list to see what is the recommended way of doing this. Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon From ton.voon at altinity.com Sun Mar 11 03:30:41 2007 From: ton.voon at altinity.com (Ton Voon) Date: Sun, 11 Mar 2007 02:30:41 +0000 Subject: [Nagiosplug-devel] Enhancement Patch for check_icmp In-Reply-To: <259DAFB9-6A72-4B2E-A63B-4C361610A736@altinity.com> References: <45EE899C.9C8C.0013.0@ldschurch.org> <804160344192334BB21922E8082EA6C0622DA0@seaex01.180solutions.com> <45EFD414.3060206@aei.ca> <259DAFB9-6A72-4B2E-A63B-4C361610A736@altinity.com> Message-ID: Hi Thomas, On 8 Mar 2007, at 10:07, Ton Voon wrote: > I haven't put in any tests for the root plugins. We should do, but > I'm not sure how we can cater for those. I'm guessing we need a test > variable that says if sudo is allowed, so we can execute the compiled > plugins as root. Then a build server can decide if they want to allow > root testing or not. Leave it with me - I'll see if I can get some > basic testing in there by end tomorrow. A test case for check_icmp has been added now. This requires sudo to be setup to allow the user to run the test executable as root. I couldn't see a way of limiting the execution of commands to just check_icmp in sudo (without a fixed path, which is not possible for the tinderbox build servers), so it is an exposure if you allow this to be run. Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon From ton.voon at altinity.com Sun Mar 11 03:42:28 2007 From: ton.voon at altinity.com (Ton Voon) Date: Sun, 11 Mar 2007 02:42:28 +0000 Subject: [Nagiosplug-devel] Check_http and web-based checks In-Reply-To: <804160344192334BB21922E8082EA6C062300C@seaex01.180solutions.com> References: <804160344192334BB21922E8082EA6C062300C@seaex01.180solutions.com> Message-ID: Hi Thomas, On 8 Mar 2007, at 17:27, Thomas Guyot-Sionnest wrote: > I just found out it could make my life much simpler if I could use web > applications to do checks for me. I can with check_http (-s, -R), > but I'd > also like the ability to print what the script returned. > > I'd like to add two switches, -z (--print) -Z (--print-all). The > former > would replace check_http's result with the body of the page preserving > check_http's performance data, while the latter would only print > the page > body. Used together with -s, -r or -R you can effectively write web > plugins > and use check_http to run them and gather the results. > > Additionally, if check_http already has code for handling this I > could make > a symlink (i.e. check_web) that would induce the -Z behavior, set - > s to 'OK' > and disable warn/crit thresholds (i.e. make them == to timeout). > > I could also add a warning switch (-W --warn-string ?) for warning, > so that > web-based checks would have full functionality. > > What do you think? Any objection? Comments? Better suggestions for > switch > names? Arguably this could be granted a new check plugin, but I'd > like to > use all check_http's features like SSL, authentication, regexps. This sounds like a good idea. I guess it is effectively moving a lot of the check logic from the plugin to the app server, which makes sense in a lot of cases. However, I'm tempted not to add this to check_http because the amount of current options in this plugin is just too confusing. And the thought of doing "hacks" to stop threshold alerts doesn't sound good. Ideally, the "web connection stuff" should be moved "lower down", to a lib/utils_http.c file, which is then available to other plugins, like your check_web (check_webapp? check_webapp_text? check_webapp_response?). There is a sslutils.c, done by Sean Finney, which handles a lot of the SSL connection stuff. Regexps is already provided from gnulib. I guess authentication is an option to "move lower". FYI, Karl was thinking about using libcurl's library for providing the web connection, rather than our own home grown one, though this is a long way off as no-one has expressed an interest in getting it working. Sorry, probably not the reply you wanted to hear :( Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon From dermoth at aei.ca Sun Mar 11 04:51:09 2007 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Sat, 10 Mar 2007 22:51:09 -0500 Subject: [Nagiosplug-devel] Check_http and web-based checks In-Reply-To: References: <804160344192334BB21922E8082EA6C062300C@seaex01.180solutions.com> Message-ID: <45F37CAD.3040606@aei.ca> On 10/03/07 09:42 PM, Ton Voon wrote: > On 8 Mar 2007, at 17:27, Thomas Guyot-Sionnest wrote: >> What do you think? Any objection? Comments? Better suggestions for >> switch >> names? Arguably this could be granted a new check plugin, but I'd >> like to >> use all check_http's features like SSL, authentication, regexps. > > This sounds like a good idea. I guess it is effectively moving a lot > of the check logic from the plugin to the app server, which makes > sense in a lot of cases. > > However, I'm tempted not to add this to check_http because the amount > of current options in this plugin is just too confusing. And the > thought of doing "hacks" to stop threshold alerts doesn't sound good. > > Ideally, the "web connection stuff" should be moved "lower down", to > a lib/utils_http.c file, which is then available to other plugins, I think this is a wise idea. I haven't though of moving functions but that could effectively allow a standalone check without duplicating too Much code > like your check_web (check_webapp? check_webapp_text? > check_webapp_response?). To stay consistent with what we already have I'd suggest check_by_web. And one thing that comes to my mind then is a simple extension to this check(i.e. symlink), check_by_xmlrpc that could do xml-rpc calls and get the answer wrapped in XML (i.e. return code, status test, extended status text (multi-line, Nagios 3), performance data). That would be a real "interface" to do web checks, though most ppl that can't ask a team of experienced web developers will likely choose the "simpler" way of doing web checks :). > There is a sslutils.c, done by Sean Finney, > which handles a lot of the SSL connection stuff. Regexps is already > provided from gnulib. I guess authentication is an option to "move > lower". I could try that, though I'm not totally sure what has to be done. As I understand it I'd have to move function to a new file in /lib making sure they don't use any global variables, create a header file with the prototypes (is it written by hand or can be done automatically with some command?) and include the header file in check_http.c. I guess there's some additions to do in Makefile.in... Maybe configure.in too? > FYI, Karl was thinking about using libcurl's library for providing > the web connection, rather than our own home grown one, though this > is a long way off as no-one has expressed an interest in getting it > working. Maybe I could try that for check_web. Or use a library shared with check_http so we can eventually replace the code in that library by libcurl functions. While it would likely be safer to do so it might not be wise to end up with a useless wrapper lib. > Sorry, probably not the reply you wanted to hear :( Quite the opposite! I'm open to suggestions and you made interesting ones :) Thomas From rouilj at cs.umb.edu Sun Mar 11 16:01:55 2007 From: rouilj at cs.umb.edu (John P. Rouillard) Date: Sun, 11 Mar 2007 10:01:55 -0500 Subject: [Nagiosplug-devel] Check_http and web-based checks In-Reply-To: Your message of "Sat, 10 Mar 2007 22:51:09 EST." <45F37CAD.3040606@aei.ca> Message-ID: <200703111501.l2BF1tXG001339@mx1.cs.umb.edu> In message <45F37CAD.3040606 at aei.ca>, Thomas Guyot-Sionnest writes: >On 10/03/07 09:42 PM, Ton Voon wrote: >> On 8 Mar 2007, at 17:27, Thomas Guyot-Sionnest wrote: >>> What do you think? Any objection? Comments? Better suggestions for >>> switch >>> names? Arguably this could be granted a new check plugin, but I'd >>> like to >>> use all check_http's features like SSL, authentication, regexps. >> >> This sounds like a good idea. I guess it is effectively moving a lot >> of the check logic from the plugin to the app server, which makes >> sense in a lot of cases. >> >> However, I'm tempted not to add this to check_http because the amount >> of current options in this plugin is just too confusing. And the >> thought of doing "hacks" to stop threshold alerts doesn't sound good. >> >> Ideally, the "web connection stuff" should be moved "lower down", to >> a lib/utils_http.c file, which is then available to other plugins, > >I think this is a wise idea. I haven't though of moving functions but >that could effectively allow a standalone check without duplicating too >Much code > >> like your check_web (check_webapp? check_webapp_text? >> check_webapp_response?). > >To stay consistent with what we already have I'd suggest check_by_web. >And one thing that comes to my mind then is a simple extension to this >check(i.e. symlink), check_by_xmlrpc that could do xml-rpc calls and get >the answer wrapped in XML (i.e. return code, status test, extended >status text (multi-line, Nagios 3), performance data). That would be a >real "interface" to do web checks, though most ppl that can't ask a team >of experienced web developers will likely choose the "simpler" way of >doing web checks :). You may want to look at webinject for ideas on that. I have some patches for it for making it lay nicer with nagios. I use it for xml verification and other application checks as it can do cookie based logins etc.. -- rouilj John Rouillard =========================================================================== My employers don't acknowledge my existence much less my opinions. From gavin at openfusion.com.au Sun Mar 11 23:43:05 2007 From: gavin at openfusion.com.au (Gavin Carr) Date: Mon, 12 Mar 2007 09:43:05 +1100 Subject: [Nagiosplug-devel] --with-nagios-user/group options In-Reply-To: References: <45EC7E83.7060809@nagios.org> <75C5C039-27AC-413F-90B7-D73EA248FCCC@altinity.com> <20070306233202.GA29270@openfusion.com.au> Message-ID: <20070311224305.GA10093@openfusion.com.au> On Sun, Mar 11, 2007 at 01:08:17AM +0000, Ton Voon wrote: > The whole point about configure scripts is to make common cases work > by selecting appropriate flags. So my current thinking is to do this: > > - if you leave out with-nagios-user/group, it will install with the > user that runs "make install". If user is root, then the setuid > plugins will get installed in addition. This mimics coreutils, apache > and mysql's behaviour > - if you choose --with-nagios-user, then the normal plugins will be > given ownership of the executables > - if you choose --with-nagios-group, then the normal and root > plugins will be given group ownership of the executables > - if you choose a new --without-world-permissions, then normal and > root plugins will not have world read or execute permissions This all looks good to me. > So you gain most security by running ./configure --with-nagios-user=X > --with-nagios-group=Y --without-world-permissions. Any other fine > tuning of this would be left as an exercise to the user. > > The decision to install root plugins is made by whether you decide to > install as root. Do you mean 'install' or 'install setuid'? If the former, then non-root packagers are still going to want a way of installing those plugins, so we still will need a 'make install-root' or some such eh? I actually prefer the 'install setuid' option - always install everything, and then make root plugins setuid if effective user is root. That does the right thing in the direct-install case, and makes life easy for packagers too. Cheers, Gavin From nagios at nagios.org Mon Mar 12 21:40:25 2007 From: nagios at nagios.org (Ethan Galstad) Date: Mon, 12 Mar 2007 14:40:25 -0600 Subject: [Nagiosplug-devel] --with-nagios-user/group options In-Reply-To: <20070311224305.GA10093@openfusion.com.au> References: <45EC7E83.7060809@nagios.org> <75C5C039-27AC-413F-90B7-D73EA248FCCC@altinity.com> <20070306233202.GA29270@openfusion.com.au> <20070311224305.GA10093@openfusion.com.au> Message-ID: <45F5BAB9.3020002@nagios.org> Gavin Carr wrote: > On Sun, Mar 11, 2007 at 01:08:17AM +0000, Ton Voon wrote: >> The whole point about configure scripts is to make common cases work >> by selecting appropriate flags. So my current thinking is to do this: >> >> - if you leave out with-nagios-user/group, it will install with the >> user that runs "make install". If user is root, then the setuid >> plugins will get installed in addition. This mimics coreutils, apache >> and mysql's behaviour >> - if you choose --with-nagios-user, then the normal plugins will be >> given ownership of the executables >> - if you choose --with-nagios-group, then the normal and root >> plugins will be given group ownership of the executables >> - if you choose a new --without-world-permissions, then normal and >> root plugins will not have world read or execute permissions > > This all looks good to me. > >> So you gain most security by running ./configure --with-nagios-user=X >> --with-nagios-group=Y --without-world-permissions. Any other fine >> tuning of this would be left as an exercise to the user. >> >> The decision to install root plugins is made by whether you decide to >> install as root. > > Do you mean 'install' or 'install setuid'? If the former, then non-root > packagers are still going to want a way of installing those plugins, so > we still will need a 'make install-root' or some such eh? > > I actually prefer the 'install setuid' option - always install everything, > and then make root plugins setuid if effective user is root. That does > the right thing in the direct-install case, and makes life easy for > packagers too. > > Cheers, > Gavin > > Both of these options sound good by me too. Ethan Galstad, Nagios Developer --- Email: nagios at nagios.org Website: http://www.nagios.org From injinerisanthosh at gmail.com Wed Mar 14 14:03:26 2007 From: injinerisanthosh at gmail.com (Santhosh Injineri) Date: Wed, 14 Mar 2007 18:33:26 +0530 Subject: [Nagiosplug-devel] Error when executing check_ifoperstatus plugin Message-ID: Hi - I am new to nagios so thanks in advance for any assistance, we have been haing real problems with this. when i execute the command ./check_ifoperstatus -k 22 -H localhost i am getting out put as OUTPUT: Can't locate object method "session" via package "Net::SNMP" (perhaps you forgot to load "Net::SNMP"?) at ./check_ifoperstatus line 443. where Line No 443 is 442 if ( $snmp_version =~ /[12]/ ) { 443 ($session, $error) = Net::SNMP->session( 444 -hostname => $hostname, 445 -community => $community, 446 -port => $port, 447 -version => $snmp_version, 448 -maxmsgsize => $maxmsgsize 449 ); 450 Can any one please assist me how to come resolve this problem and please tell me if any set up is needed for Net::SNMP???? Please help me in this regard.. --Thanks in Advance SANTHOSH -------------- next part -------------- An HTML attachment was scrubbed... URL: From gavin at openfusion.com.au Wed Mar 14 23:42:04 2007 From: gavin at openfusion.com.au (Gavin Carr) Date: Thu, 15 Mar 2007 09:42:04 +1100 Subject: [Nagiosplug-devel] Error when executing check_ifoperstatus plugin In-Reply-To: References: Message-ID: <20070314224204.GA5312@openfusion.com.au> Hi Santhosh, On Wed, Mar 14, 2007 at 06:33:26PM +0530, Santhosh Injineri wrote: > Hi - I am new to nagios so thanks in advance for any assistance, we have > been haing real problems with this. > > when i execute the command ./check_ifoperstatus -k 22 -H localhost i am > getting out put as > > OUTPUT: Can't locate object method "session" via package "Net::SNMP" > (perhaps you forgot to load "Net::SNMP"?) at ./check_ifoperstatus line 443. > > where Line No 443 is > > 442 if ( $snmp_version =~ /[12]/ ) { > 443 ($session, $error) = Net::SNMP->session( > 444 -hostname => $hostname, > 445 -community => $community, > 446 -port => $port, > 447 -version => $snmp_version, > 448 -maxmsgsize => $maxmsgsize > 449 ); > 450 > > Can any one please assist me how to come resolve this problem and please > tell me if any set up is needed for Net::SNMP???? Is that the first error you get? It looks like there's a problem with your Net::SNMP, but I'd have expected it to blow up on the 'use Net::SNMP' line earlier. What does the following give you? perl -MNet::SNMP -e 'printf "%vd\n", $Net::SNMP::VERSION' Cheers, Gavin From noreply at sourceforge.net Thu Mar 15 14:50:20 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 15 Mar 2007 06:50:20 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1681482 ] check_ifstatus - SNMPv3 - bug line 307 Message-ID: Bugs item #1681482, was opened at 2007-03-15 14:50 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1681482&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: Release (specify) Status: Open Resolution: None Priority: 5 Private: No Submitted By: Geoffrey Lemaire (geolem) Assigned to: Nobody/Anonymous (nobody) Summary: check_ifstatus - SNMPv3 - bug line 307 Initial Comment: RHEL 4 - nagios 2.8 (via up2date) RHEL 4 - check_ifstatus version : check_ifstatus (nagios-plugins 1.4.5) 1.9 Hi, I have a problem with check_ifstatus and SNMPv3 at line 307. When I do a : --- ./check_ifstatus -H 127.0.0.1 -v 3 -L authNoPriv -a MD5 -U mylogin -A mypassword --- I have the message : --- Missing arguments! check_ifstatus -C -p -H Copyright (C) 2000 Christoph Kron Updates 5/2002 Subhendu Ghosh --- I put a lot of "printf" and I found a problem on the line 307 : --- unless ($seclevel eq ('noAuthNoPriv' || 'authNoPriv' || 'authPriv' ) ) { --- It forward me to the "usage();". When I do a (for testing my SNMPv3) : --- snmpget -v 3 -u mylogin -l authNoPriv -a MD5 -A mypassword localhost sysUpTime.0 SNMPv2-MIB::sysUpTime.0 = Timeticks: (196856) 0:32:48.56 --- It's look ok... So, what we can do ? (started topic : http://forums.opsyx.com/viewtopic.php?p=21709#21709) Very thanks ! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1681482&group_id=29880 From noreply at sourceforge.net Thu Mar 15 15:45:26 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 15 Mar 2007 07:45:26 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1681516 ] output too verbose for various checks Message-ID: Bugs item #1681516, was opened at 2007-03-15 16:45 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1681516&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Christof Hanke (hanki_pank) Assigned to: Nobody/Anonymous (nobody) Summary: output too verbose for various checks Initial Comment: Hi, Release 1.4.6. I wanted to deploy check_http of a https-server which requires a valid client-certificate. Due to hardcoded printf's in sslutils.c:np_net_ssl_init() I get CRITICAL - Cannot make SSL connection 25575:error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure:s3_pkt.c:1052:SSL alert number 40 OK - Certificate will expire on 02/18/2008 07:50. What happens is that the check_http cannot do the handshake, because it has no valid client cerificate, which is correct. But it _can_ verify the certificate presented by the server, which it succesfully does. However, the correct output "OK -..." is overwritten by the "CRITICAL - Cannot make SSL connection". I have a fix, but maybe you guys want to introduce a kind of message passing from the lower-level functions in netutils.c and sslutils.c to the actual test, so that they can give a nice output, if necessary. E.g. if you do check_http -H NOTEXISTENT.NODOMAIN the output is also 2 lines and not very appealling IMHO. Christof ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1681516&group_id=29880 From injinerisanthosh at gmail.com Fri Mar 16 03:34:36 2007 From: injinerisanthosh at gmail.com (Santhosh Injineri) Date: Fri, 16 Mar 2007 08:04:36 +0530 Subject: [Nagiosplug-devel] Error when executing check_ifoperstatus plugin (Gavin) Message-ID: Hi Gavin, Thank you for your assistance ... I tried with somany options but still the same result ... I executed that command also but no output o/p is empty.... I am here with sending you the check_ifoperstatus file attached along with this mail ... Thanks once agian.... --Regards Santhosh ------------------------------------------------------------------ Message: 1 Date: Thu, 15 Mar 2007 09:42:04 +1100 From: Gavin Carr Subject: Re: [Nagiosplug-devel] Error when executing check_ifoperstatus plugin To: Nagios Plugin Development Mailing List Message-ID: <20070314224204.GA5312 at openfusion.com.au> Content-Type: text/plain; charset=us-ascii Hi Santhosh, On Wed, Mar 14, 2007 at 06:33:26PM +0530, Santhosh Injineri wrote: > Hi - I am new to nagios so thanks in advance for any assistance, we have > been haing real problems with this. > > when i execute the command ./check_ifoperstatus -k 22 -H localhost i am > getting out put as > > OUTPUT: Can't locate object method "session" via package "Net::SNMP" > (perhaps you forgot to load "Net::SNMP"?) at ./check_ifoperstatus line 443. > > where Line No 443 is > > 442 if ( $snmp_version =~ /[12]/ ) { > 443 ($session, $error) = Net::SNMP->session( > 444 -hostname => $hostname, > 445 -community => $community, > 446 -port => $port, > 447 -version => $snmp_version, > 448 -maxmsgsize => $maxmsgsize > 449 ); > 450 > > Can any one please assist me how to come resolve this problem and please > tell me if any set up is needed for Net::SNMP???? Is that the first error you get? It looks like there's a problem with your Net::SNMP, but I'd have expected it to blow up on the 'use Net::SNMP' line earlier. What does the following give you? perl -MNet::SNMP -e 'printf "%vd\n", $Net::SNMP::VERSION' Cheers, Gavin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- #! /usr/bin/perl -w # # check_ifoperstatus.pl - nagios plugin # # Copyright (C) 2000 Christoph Kron, # Modified 5/2002 to conform to updated Nagios Plugin Guidelines # Added support for named interfaces per Valdimir Ivaschenko (S. Ghosh) # Added SNMPv3 support (10/2003) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # # Report bugs to: nagiosplug-help at lists.sourceforge.net # # 11.01.2000 Version 1.0 # $Id: check_ifoperstatus.pl,v 1.6 2004/12/07 03:13:14 mattkent Exp $ # # Patches from Guy Van Den Bergh to warn on ifadminstatus down interfaces # instead of critical. # # Primary MIB reference - RFC 2863 use POSIX; use strict; use lib "/opt/perl_32/lib/site_perl/5.8.3"; use utils qw($TIMEOUT %ERRORS &print_revision &support); use Net::SNMP; use Getopt::Long; &Getopt::Long::config('bundling'); my $PROGNAME = "check_ifoperstatus"; sub print_help (); sub usage (); sub process_arguments (); my $timeout; my $status; my %ifOperStatus = ('1','up', '2','down', '3','testing', '4','unknown', '5','dormant', '6','notPresent', '7','lowerLayerDown'); # down due to the state of lower layer interface(s) my $state = "UNKNOWN"; my $answer = ""; my $snmpkey = 0; my $community = "public"; my $maxmsgsize = 1472 ; # Net::SNMP default is 1472 my ($seclevel, $authproto, $secname, $authpass, $privpass, $auth, $priv, $context); my $port = 161; my @snmpoids; my $sysUptime = '1.3.6.1.2.1.1.3.0'; my $snmpIfDescr = '1.3.6.1.2.1.2.2.1.2'; my $snmpIfAdminStatus = '1.3.6.1.2.1.2.2.1.7'; my $snmpIfOperStatus = '1.3.6.1.2.1.2.2.1.8'; my $snmpIfName = '1.3.6.1.2.1.31.1.1.1.1'; my $snmpIfLastChange = '1.3.6.1.2.1.2.2.1.9'; my $snmpIfAlias = '1.3.6.1.2.1.31.1.1.1.18'; my $snmpLocIfDescr = '1.3.6.1.4.1.9.2.2.1.1.28'; my $hostname; my $ifName; my $session; my $error; my $response; my $snmp_version = 1 ; my $ifXTable; my $opt_h ; my $opt_V ; my $ifdescr; my $key; my $lastc; my $dormantWarn; my $adminWarn; my $name; ### Validate Arguments $status = process_arguments(); # Just in case of problems, let's not hang Nagios $SIG{'ALRM'} = sub { print ("ERROR: No snmp response from $hostname (alarm)\n"); exit $ERRORS{"UNKNOWN"}; }; alarm($timeout); ## map ifdescr to ifindex - should look at being able to cache this value if (defined $ifdescr) { # escape "/" in ifdescr - very common in the Cisco world $ifdescr =~ s/\//\\\//g; $status=fetch_ifdescr(); # if using on device with large number of interfaces # recommend use of SNMP v2 (get-bulk) if ($status==0) { $state = "UNKNOWN"; printf "$state: could not retrive ifdescr snmpkey - $status-$snmpkey\n"; $session->close; exit $ERRORS{$state}; } } ## Main function $snmpIfAdminStatus = $snmpIfAdminStatus . "." . $snmpkey; $snmpIfOperStatus = $snmpIfOperStatus . "." . $snmpkey; $snmpIfDescr = $snmpIfDescr . "." . $snmpkey; $snmpIfName = $snmpIfName . "." . $snmpkey ; $snmpIfAlias = $snmpIfAlias . "." . $snmpkey ; push(@snmpoids,$snmpIfAdminStatus); push(@snmpoids,$snmpIfOperStatus); push(@snmpoids,$snmpIfDescr); push(@snmpoids,$snmpIfName) if (defined $ifXTable) ; push(@snmpoids,$snmpIfAlias) if (defined $ifXTable) ; if (!defined($response = $session->get_request(@snmpoids))) { $answer=$session->error; $session->close; $state = 'WARNING'; print ("$state: SNMP error: $answer\n"); exit $ERRORS{$state}; } $answer = sprintf("host '%s', %s(%s) is %s\n", $hostname, $response->{$snmpIfDescr}, $snmpkey, $ifOperStatus{$response->{$snmpIfOperStatus}} ); ## Check to see if ifName match is requested and it matches - exit if no match ## not the interface we want to monitor if ( defined $name && not ($response->{$snmpIfName} eq $name) ) { $state = 'UNKNOWN'; $answer = "Interface name ($name) doesn't match snmp value ($response->{$snmpIfName}) (index $snmpkey)"; print ("$state: $answer"); exit $ERRORS{$state}; } ## define the interface name if (defined $ifXTable) { $name = $response->{$snmpIfName} ." - " .$response->{$snmpIfAlias} ; }else{ $name = $response->{$snmpIfDescr} ; } ## if AdminStatus is down - some one made a consious effort to change config ## if ( not ($response->{$snmpIfAdminStatus} == 1) ) { $answer = "Interface $name (index $snmpkey) is administratively down."; if ( not defined $adminWarn or $adminWarn eq "w" ) { $state = 'WARNING'; } elsif ( $adminWarn eq "i" ) { $state = 'OK'; } elsif ( $adminWarn eq "c" ) { $state = 'CRITICAL'; } else { # If wrong value for -a, say warning $state = 'WARNING'; } } ## Check operational status elsif ( $response->{$snmpIfOperStatus} == 2 ) { $state = 'CRITICAL'; $answer = "Interface $name (index $snmpkey) is down."; } elsif ( $response->{$snmpIfOperStatus} == 5 ) { if (defined $dormantWarn ) { if ($dormantWarn eq "w") { $state = 'WARNING'; $answer = "Interface $name (index $snmpkey) is dormant."; }elsif($dormantWarn eq "c") { $state = 'CRITICAL'; $answer = "Interface $name (index $snmpkey) is dormant."; }elsif($dormantWarn eq "i") { $state = 'OK'; $answer = "Interface $name (index $snmpkey) is dormant."; } }else{ # dormant interface - but warning/critical/ignore not requested $state = 'CRITICAL'; $answer = "Interface $name (index $snmpkey) is dormant."; } } elsif ( $response->{$snmpIfOperStatus} == 6 ) { $state = 'CRITICAL'; $answer = "Interface $name (index $snmpkey) notPresent - possible hotswap in progress."; } elsif ( $response->{$snmpIfOperStatus} == 7 ) { $state = 'CRITICAL'; $answer = "Interface $name (index $snmpkey) down due to lower layer being down."; } elsif ( $response->{$snmpIfOperStatus} == 3 || $response->{$snmpIfOperStatus} == 4 ) { $state = 'CRITICAL'; $answer = "Interface $name (index $snmpkey) down (testing/unknown)."; } else { $state = 'OK'; $answer = "Interface $name (index $snmpkey) is up."; } print ("$state: $answer"); exit $ERRORS{$state}; ### subroutines sub fetch_ifdescr { if (!defined ($response = $session->get_table($snmpIfDescr))) { $answer=$session->error; $session->close; $state = 'CRITICAL'; printf ("$state: SNMP error with snmp version $snmp_version ($answer)\n"); $session->close; exit $ERRORS{$state}; } foreach $key ( keys %{$response}) { if ($response->{$key} =~ /^$ifdescr$/) { $key =~ /.*\.(\d+)$/; $snmpkey = $1; #print "$ifdescr = $key / $snmpkey \n"; #debug } } unless (defined $snmpkey) { $session->close; $state = 'CRITICAL'; printf "$state: Could not match $ifdescr on $hostname\n"; exit $ERRORS{$state}; } return $snmpkey; } sub usage() { printf "\nMissing arguments!\n"; printf "\n"; printf "usage: \n"; printf "check_ifoperstatus -k -H [-C ]\n"; printf "Copyright (C) 2000 Christoph Kron\n"; printf "check_ifoperstatus.pl comes with ABSOLUTELY NO WARRANTY\n"; printf "This programm is licensed under the terms of the "; printf "GNU General Public License\n(check source code for details)\n"; printf "\n\n"; exit $ERRORS{"UNKNOWN"}; } sub print_help() { printf "check_ifoperstatus plugin for Nagios monitors operational \n"; printf "status of a particular network interface on the target host\n"; printf "\nUsage:\n"; printf " -H (--hostname) Hostname to query - (required)\n"; printf " -C (--community) SNMP read community (defaults to public,\n"; printf " used with SNMP v1 and v2c\n"; printf " -v (--snmp_version) 1 for SNMP v1 (default)\n"; printf " 2 for SNMP v2c\n"; printf " SNMP v2c will use get_bulk for less overhead\n"; printf " if monitoring with -d\n"; printf " -L (--seclevel) choice of \"noAuthNoPriv\", \"authNoPriv\", or \"authPriv\"\n"; printf " -U (--secname) username for SNMPv3 context\n"; printf " -c (--context) SNMPv3 context name (default is empty string)"; printf " -A (--authpass) authentication password (cleartext ascii or localized key\n"; printf " in hex with 0x prefix generated by using \"snmpkey\" utility\n"; printf " auth password and authEngineID\n"; printf " -a (--authproto) Authentication protocol ( MD5 or SHA1)\n"; printf " -X (--privpass) privacy password (cleartext ascii or localized key\n"; printf " in hex with 0x prefix generated by using \"snmpkey\" utility\n"; printf " privacy password and authEngineID\n"; printf " -k (--key) SNMP IfIndex value\n"; printf " -d (--descr) SNMP ifDescr value\n"; printf " -p (--port) SNMP port (default 161)\n"; printf " -I (--ifmib) Agent supports IFMIB ifXTable. Do not use if\n"; printf " you don't know what this is. \n"; printf " -n (--name) the value should match the returned ifName\n"; printf " (Implies the use of -I)\n"; printf " -w (--warn =i|w|c) ignore|warn|crit if the interface is dormant (default critical)\n"; printf " -D (--admin-down =i|w|c) same for administratively down interfaces (default warning)\n"; printf " -M (--maxmsgsize) Max message size - usefull only for v1 or v2c\n"; printf " -t (--timeout) seconds before the plugin times out (default=$TIMEOUT)\n"; printf " -V (--version) Plugin version\n"; printf " -h (--help) usage help \n\n"; printf " -k or -d must be specified\n\n"; printf "Note: either -k or -d must be specified and -d is much more network \n"; printf "intensive. Use it sparingly or not at all. -n is used to match against\n"; printf "a much more descriptive ifName value in the IfXTable to verify that the\n"; printf "snmpkey has not changed to some other network interface after a reboot.\n\n"; print_revision($PROGNAME, '$Revision: 1.6 $'); } sub process_arguments() { $status = GetOptions( "V" => \$opt_V, "version" => \$opt_V, "h" => \$opt_h, "help" => \$opt_h, "v=i" => \$snmp_version, "snmp_version=i" => \$snmp_version, "C=s" => \$community, "community=s" => \$community, "L=s" => \$seclevel, "seclevel=s" => \$seclevel, "a=s" => \$authproto, "authproto=s" => \$authproto, "U=s" => \$secname, "secname=s" => \$secname, "A=s" => \$authpass, "authpass=s" => \$authpass, "X=s" => \$privpass, "privpass=s" => \$privpass, "c=s" => \$context, "context=s" => \$context, "k=i" => \$snmpkey, "key=i",\$snmpkey, "d=s" => \$ifdescr, "descr=s" => \$ifdescr, "l=s" => \$lastc, "lastchange=s" => \$lastc, "p=i" => \$port, "port=i" =>\$port, "H=s" => \$hostname, "hostname=s" => \$hostname, "I" => \$ifXTable, "ifmib" => \$ifXTable, "n=s" => \$ifName, "name=s" => \$ifName, "w=s" => \$dormantWarn, "warn=s" => \$dormantWarn, "D=s" => \$adminWarn, "admin-down=s" => \$adminWarn, "M=i" => \$maxmsgsize, "maxmsgsize=i" => \$maxmsgsize, "t=i" => \$timeout, "timeout=i" => \$timeout, ); if ($status == 0){ print_help(); exit $ERRORS{'OK'}; } if ($opt_V) { print_revision($PROGNAME,'$Revision: 1.6 $ '); exit $ERRORS{'OK'}; } if ($opt_h) { print_help(); exit $ERRORS{'OK'}; } if (! utils::is_hostname($hostname)){ usage(); exit $ERRORS{"UNKNOWN"}; } unless ($snmpkey > 0 || defined $ifdescr){ printf "Either a valid snmpkey key (-k) or a ifDescr (-d) must be provided)\n"; usage(); exit $ERRORS{"UNKNOWN"}; } if (defined $name) { $ifXTable=1; } if (defined $dormantWarn) { unless ($dormantWarn =~ /^(w|c|i)$/ ) { printf "Dormant alerts must be one of w|c|i \n"; exit $ERRORS{'UNKNOWN'}; } } unless (defined $timeout) { $timeout = $TIMEOUT; } if ($snmp_version =~ /3/ ) { # Must define a security level even though default is noAuthNoPriv # v3 requires a security username if (defined $seclevel && defined $secname) { # Must define a security level even though defualt is noAuthNoPriv unless ($seclevel eq ('noAuthNoPriv' || 'authNoPriv' || 'authPriv' ) ) { usage(); exit $ERRORS{"UNKNOWN"}; } # Authentication wanted if ($seclevel eq ('authNoPriv' || 'authPriv') ) { unless ($authproto eq ('MD5' || 'SHA1') ) { usage(); exit $ERRORS{"UNKNOWN"}; } if ( !defined $authpass) { usage(); exit $ERRORS{"UNKNOWN"}; }else{ if ($authpass =~ /^0x/ ) { $auth = "-authkey => $authpass" ; }else{ $auth = "-authpassword => $authpass"; } } } # Privacy (DES encryption) wanted if ($seclevel eq 'authPriv' ) { if (! defined $privpass) { usage(); exit $ERRORS{"UNKNOWN"}; }else{ if ($privpass =~ /^0x/){ $priv = "-privkey => $privpass"; }else{ $priv = "-privpassword => $privpass"; } } } # Context name defined or default unless ( defined $context) { $context = ""; } }else { usage(); exit $ERRORS{'UNKNOWN'}; ; } } # end snmpv3 if ( $snmp_version =~ /[12]/ ) { ($session, $error) = Net::SNMP->session( -hostname => $hostname, -community => $community, -port => $port, -version => $snmp_version, -maxmsgsize => $maxmsgsize ); if (!defined($session)) { $state='UNKNOWN'; $answer=$error; print ("$state: $answer"); exit $ERRORS{$state}; } }elsif ( $snmp_version =~ /3/ ) { if ($seclevel eq 'noAuthNoPriv') { ($session, $error) = Net::SNMP->session( -hostname => $hostname, -port => $port, -version => $snmp_version, -username => $secname, ); }elsif ( $seclevel eq 'authNoPriv' ) { ($session, $error) = Net::SNMP->session( -hostname => $hostname, -port => $port, -version => $snmp_version, -username => $secname, $auth, -authprotocol => $authproto, ); }elsif ($seclevel eq 'authPriv' ) { ($session, $error) = Net::SNMP->session( -hostname => $hostname, -port => $port, -version => $snmp_version, -username => $secname, $auth, -authprotocol => $authproto, $priv ); } if (!defined($session)) { $state='UNKNOWN'; $answer=$error; print ("$state: $answer"); exit $ERRORS{$state}; } }else{ $state='UNKNOWN'; print ("$state: No support for SNMP v$snmp_version yet\n"); exit $ERRORS{$state}; } } ## End validation From sghosh at sghosh.org Fri Mar 16 04:26:04 2007 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Thu, 15 Mar 2007 23:26:04 -0400 (EDT) Subject: [Nagiosplug-devel] Error when executing check_ifoperstatus plugin (Gavin) In-Reply-To: References: Message-ID: Gavin command should give you an output - either a "Can't locate" error message or a version string. You need to install the Net::SNMP perl module as listed in the requirements file. try installing the module with the following line: perl -MCPAN -e 'install Net::SNMP' If this is the first time running CPAN - you will get prompted for some config settings. -sg On Fri, 16 Mar 2007, Santhosh Injineri wrote: > Hi Gavin, > > Thank you for your assistance ... > > I tried with somany options but still the same result ... > > I executed that command also but no output o/p is empty.... > > I am here with sending you the check_ifoperstatus file attached along with > this mail ... > > Thanks once agian.... > > --Regards > Santhosh > > > > ------------------------------------------------------------------ > > Message: 1 > Date: Thu, 15 Mar 2007 09:42:04 +1100 > From: Gavin Carr > Subject: Re: [Nagiosplug-devel] Error when executing > check_ifoperstatus plugin > To: Nagios Plugin Development Mailing List > > Message-ID: <20070314224204.GA5312 at openfusion.com.au> > Content-Type: text/plain; charset=us-ascii > > Hi Santhosh, > > On Wed, Mar 14, 2007 at 06:33:26PM +0530, Santhosh Injineri wrote: >> Hi - I am new to nagios so thanks in advance for any assistance, we have >> been haing real problems with this. >> >> when i execute the command ./check_ifoperstatus -k 22 -H localhost i am >> getting out put as >> >> OUTPUT: Can't locate object method "session" via package "Net::SNMP" >> (perhaps you forgot to load "Net::SNMP"?) at ./check_ifoperstatus line > 443. >> >> where Line No 443 is >> >> 442 if ( $snmp_version =~ /[12]/ ) { >> 443 ($session, $error) = Net::SNMP->session( >> 444 -hostname => $hostname, >> 445 -community => $community, >> 446 -port => $port, >> 447 -version => $snmp_version, >> 448 -maxmsgsize => $maxmsgsize >> 449 ); >> 450 >> >> Can any one please assist me how to come resolve this problem and please >> tell me if any set up is needed for Net::SNMP???? > > Is that the first error you get? It looks like there's a problem with your > Net::SNMP, but I'd have expected it to blow up on the 'use Net::SNMP' line > earlier. > > What does the following give you? > > perl -MNet::SNMP -e 'printf "%vd\n", $Net::SNMP::VERSION' > > > Cheers, > Gavin > -- From injinerisanthosh at gmail.com Fri Mar 16 05:15:39 2007 From: injinerisanthosh at gmail.com (Santhosh Injineri) Date: Fri, 16 Mar 2007 09:45:39 +0530 Subject: [Nagiosplug-devel] Error when executing check_ifoperstatus plugin Message-ID: Hi Ghosh, If i run perl -MCPAN -e 'install Net::SNMP' command its giving output as CPAN: Storable loaded ok Going to read /.cpan/Metadata Database was generated on Thu, 25 May 2006 05:27:28 GMT Net::SNMP is up to date. But i dint install using that command ..i.e using perl -MCPAN -e 'install Net::SNMP' as i was getting some errors... So I took the net-snmp tar ball and exec cuted the following commands 1. perl Makefile.PL 2. make Makefile 3. make test 4. make install i dint get any error while doing so ... I think problem is with command line options that i am specifying for check_ifoprestatus plugin... I am executing command ./check_ifoperstatus -k 22 -H localhost -C secret I dont know what value should be specified for -k (SNMP IfIndex value) ....What value should be provided for that -k option and from will i get that ??? Thanks Ghosh, --Regards Santhosh -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Message: 2 Date: Thu, 15 Mar 2007 23:26:04 -0400 (EDT) From: Subhendu Ghosh Subject: Re: [Nagiosplug-devel] Error when executing check_ifoperstatus plugin (Gavin) To: Nagios Plugin Development Mailing List Message-ID: Content-Type: TEXT/Plain; charset=US-ASCII; format=flowed Gavin command should give you an output - either a "Can't locate" error message or a version string. You need to install the Net::SNMP perl module as listed in the requirements file. try installing the module with the following line: perl -MCPAN -e 'install Net::SNMP' If this is the first time running CPAN - you will get prompted for some config settings. -sg -------------- next part -------------- An HTML attachment was scrubbed... URL: From akikomoyo at gmail.com Fri Mar 16 09:57:56 2007 From: akikomoyo at gmail.com (Akiko Moyo) Date: Fri, 16 Mar 2007 09:57:56 +0100 Subject: [Nagiosplug-devel] Problem with check-host-alive Message-ID: I constantly have false alarms on pings checks when overpass RTA=100ms even if they are declared in the checkcomand.cfg file as follows: define command{ command_name check-host-alive command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 300.0,80% -c 500.0,100% -p 1 } I have tested several different values and still same result. Your advice and help will be very much appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dermoth at aei.ca Fri Mar 16 11:45:05 2007 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Fri, 16 Mar 2007 06:45:05 -0400 Subject: [Nagiosplug-devel] Problem with check-host-alive In-Reply-To: References: Message-ID: <45FA7531.80708@aei.ca> On 16/03/07 04:57 AM, Akiko Moyo wrote: > > I constantly have false alarms on pings checks when overpass RTA=100ms > even if they are declared in the checkcomand.cfg file as follows: > > define command{ > command_name check-host-alive > command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 300.0,80% > -c 500.0,100% -p 1 > } > > I have tested several different values and still same result. > > Your advice and help will be very much appreciated. Did you restart Nagios after changing the settings? What happens if you run the command manually from the command line (you can try with a remote host like www.asus.com.tw to make sure latency goes over 100ms)? Which version of Nagios-plugins are you using? A suggestion is to replace check_ping with check_icmp, the latter being a complete ping implementation that doesn't rely on any external command. Make sure first that check_icmp is owned by root and setuid (runs as owner): chown root:root /usr/local/nagios/libexec/check_icmp chmod 4755 /usr/local/nagios/libexec/check_icmp _OR_ is you have local users and don't want them to be able to run check_icmp: chown root:nagios /usr/local/nagios/libexec/check_icmp chmod 4750 /usr/local/nagios/libexec/check_icmp Thomas From noreply at sourceforge.net Fri Mar 16 13:13:07 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Fri, 16 Mar 2007 05:13:07 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1681482 ] check_ifstatus - SNMPv3 - bug line 307 Message-ID: Bugs item #1681482, was opened at 2007-03-16 00:50 Message generated for change (Comment added) made by gonzai You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1681482&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: Release (specify) Status: Open Resolution: None Priority: 5 Private: No Submitted By: Geoffrey Lemaire (geolem) Assigned to: Nobody/Anonymous (nobody) Summary: check_ifstatus - SNMPv3 - bug line 307 Initial Comment: RHEL 4 - nagios 2.8 (via up2date) RHEL 4 - check_ifstatus version : check_ifstatus (nagios-plugins 1.4.5) 1.9 Hi, I have a problem with check_ifstatus and SNMPv3 at line 307. When I do a : --- ./check_ifstatus -H 127.0.0.1 -v 3 -L authNoPriv -a MD5 -U mylogin -A mypassword --- I have the message : --- Missing arguments! check_ifstatus -C -p -H Copyright (C) 2000 Christoph Kron Updates 5/2002 Subhendu Ghosh --- I put a lot of "printf" and I found a problem on the line 307 : --- unless ($seclevel eq ('noAuthNoPriv' || 'authNoPriv' || 'authPriv' ) ) { --- It forward me to the "usage();". When I do a (for testing my SNMPv3) : --- snmpget -v 3 -u mylogin -l authNoPriv -a MD5 -A mypassword localhost sysUpTime.0 SNMPv2-MIB::sysUpTime.0 = Timeticks: (196856) 0:32:48.56 --- It's look ok... So, what we can do ? (started topic : http://forums.opsyx.com/viewtopic.php?p=21709#21709) Very thanks ! ---------------------------------------------------------------------- Comment By: Gavin Carr (gonzai) Date: 2007-03-16 23:13 Message: Logged In: YES user_id=674647 Originator: NO Yep, that's completely broken, and there's another couple of places just like it. Fix checked into CVS now. Cheers, Gavin ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1681482&group_id=29880 From benoit.mortier at opensides.be Fri Mar 16 13:42:17 2007 From: benoit.mortier at opensides.be (Benoit Mortier) Date: Fri, 16 Mar 2007 13:42:17 +0100 Subject: [Nagiosplug-devel] New website for the nagios plugins Message-ID: <200703161342.18437.benoit.mortier@opensides.be> Hello, i have the pleasure to announce the birth of the new nagiosplugins website ! It is situated at http://nagiosplugins.org/ It is multilingual, french and English for now Have a nice day -- Benoit Mortier CEO www.opensides.be Contributor to Gosa Project : http://gosa.gonicus.de/ Contributeur to Nagios Plugins : http://nagiosplug.sourceforge.net/ From injinerisanthosh at gmail.com Fri Mar 16 14:26:38 2007 From: injinerisanthosh at gmail.com (Santhosh Injineri) Date: Fri, 16 Mar 2007 18:56:38 +0530 Subject: [Nagiosplug-devel] Nagiosplug-devel Digest, Vol 10, Issue 14 In-Reply-To: References: Message-ID: Hi Friends, I need help !!! I have jagged ..... I am trying to use plugin "*check_ifoperstatus*" s command, but I don't know how to get. (-k (--key) SNMP IfIndex value) (-d (--descr) SNMP ifDescr value ) ? Please help me any setup is required ?? and how to set up,what need to be installed ??? Thanks in Advance --Regards Santhosh. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sghosh at sghosh.org Sat Mar 17 04:26:33 2007 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Fri, 16 Mar 2007 23:26:33 -0400 (EDT) Subject: [Nagiosplug-devel] Error when executing check_ifoperstatus plugin In-Reply-To: References: Message-ID: On Fri, 16 Mar 2007, Santhosh Injineri wrote: > Hi Ghosh, > > If i run perl -MCPAN -e 'install Net::SNMP' command its giving output as > > CPAN: Storable loaded ok > Going to read /.cpan/Metadata > Database was generated on Thu, 25 May 2006 05:27:28 GMT > Net::SNMP is up to date. > > But i dint install using that command ..i.e using perl -MCPAN -e 'install > Net::SNMP' as i was getting some errors... > > So I took the net-snmp tar ball and exec cuted the following commands > > 1. perl Makefile.PL > 2. make Makefile > 3. make test > 4. make install > > i dint get any error while doing so ... > > I think problem is with command line options that i am specifying for > check_ifoprestatus plugin... I am executing command > > ./check_ifoperstatus -k 22 -H localhost -C secret > > I dont know what value should be specified for -k (SNMP IfIndex value) > ....What value should be provided for that -k option and from will i get > that ??? > > Thanks Ghosh, > > --Regards > Santhosh > You can install it which ever way it works. If you have more than one perl installation n the system, make sure that the one the plugin is using has the Net::SNMP module installed. -k the ifIndex is the interger assigned by the agent to a particular interface. Best way to find it is by running snmpwalk -v1 -c secret localhost iftable -- -sg From matthias.eble at mailing.kaufland-informationssysteme.com Tue Mar 20 13:41:23 2007 From: matthias.eble at mailing.kaufland-informationssysteme.com (Matthias Eble) Date: Tue, 20 Mar 2007 13:41:23 +0100 Subject: [Nagiosplug-devel] check_http.t / tinderbox inclusion Message-ID: <45FFD673.6030107@mailing.kaufland-informationssysteme.com> Hi list, I'm currently working to get as many testcases as possible to work on my local Ubuntu box to get it included in the tinderbox service. The only problem remaining is the fact that check_http.t wants direct connection to the internet for some tests and I can't get direct access to the system(s). What do you think about a skipping these cases (like in the diff-output below) if no direct connection is available? Thanks Matthias (diff -w) --- check_http.t 2006-12-20 23:33:29.000000000 +0100 +++ check_http2.t 2007-03-20 13:14:06.000000000 +0100 @@ -27,6 +27,10 @@ "An invalid (not known to DNS) hostname", "nosuchhost"); +my $internet_access = getTestParameter( "NP_INTERNET_ACCESS", + "Is this system directly connected to the internet?", + "yes"); + $res = NPTest->testCmd( "./check_http $host_tcp_http -wt 300 -ct 600" ); @@ -58,6 +62,9 @@ # Is also possible to get a socket timeout if DNS is not responding fast enough like( $res->output, "/Unable to open TCP socket|Socket timeout after/", "Output OK"); +SKIP: { + skip "No internet access", 18 unless $internet_access eq "yes"; + $res = NPTest->testCmd( "./check_http --ssl www.verisign.com" ); @@ -106,4 +113,4 @@ $res = NPTest->testCmd( "./check_http -H www.mozilla.com -u /firefox -f follow" ); is( $res->return_code, 0, "Redirection based on location is okay"); - +} From ton.voon at altinity.com Tue Mar 20 14:37:49 2007 From: ton.voon at altinity.com (Ton Voon) Date: Tue, 20 Mar 2007 13:37:49 +0000 Subject: [Nagiosplug-devel] check_http.t / tinderbox inclusion In-Reply-To: <45FFD673.6030107@mailing.kaufland-informationssysteme.com> References: <45FFD673.6030107@mailing.kaufland-informationssysteme.com> Message-ID: <37AC4F33-9492-4947-9FD3-0BC82E9F1CDF@altinity.com> Matthias, On 20 Mar 2007, at 12:41, Matthias Eble wrote: > I'm currently working to get as many testcases as possible to work > on my > local Ubuntu box to get it included in the tinderbox service. The only > problem remaining is the fact that check_http.t wants direct > connection > to the internet for some tests and I can't get direct access to the > system(s). > > What do you think about a skipping these cases (like in the diff- > output > below) if no direct connection is available? > Yes, good idea. I had a similar thought a few months back, but never got round to it. I've updated a FAQ about it: http://nagiosplugins.org/index.php? option=com_easyfaq&task=view&id=7&Itemid=29&mosmsg=Changes+to+item+saved I think this is a good one to "reverse" the skip logic, based on the fact that if parameters do not currently exist, then an empty string is returned by getTestParameter. This is so existing tinderbox runs are not affected. Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon From gavin at openfusion.com.au Wed Mar 21 02:19:25 2007 From: gavin at openfusion.com.au (Gavin Carr) Date: Wed, 21 Mar 2007 12:19:25 +1100 Subject: [Nagiosplug-devel] Nagios::Plugin updates Message-ID: <20070321011925.GA19910@openfusion.com.au> Hi all, I've just committed a bunch of updates to Nagios::Plugin - the short list of changes include: 0.16 ?? - added support for multi-entry help output (e.g. two separate help entries for --warning) (Gavin) - added automatic spec-to-help-text support to N::P::Getopt (Gavin) - added initial --extra-opts support to N::P::Getopt (Gavin) - removed default use of Threshold from N::P::Performance (Gavin) - removed remaining Class::Struct usages from Performance, Threshold, and Range (Gavin) - fixed warnings when no uom specified for add_perfdata (Ton) - added max_state function in N::P::Functions (Ton) If anyone is using Nagios::Plugin in any plugins yet, and/or is interested in the --extra-opts stuff we discussed a while ago, and would like to check this out and bang on it, I'd appreciate any test and/or usability reports. The plan is to release this to CPAN as version 0.16 in a few days time. Cheers, Gavin From noreply at sourceforge.net Wed Mar 21 03:20:11 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 20 Mar 2007 19:20:11 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1495828 ] pst3 failure on solaris 10 x86 Message-ID: <200703210220.l2L2KBd3029668@sc8-sf-db2-new-b.sourceforge.net> Bugs item #1495828, was opened at 2006-05-26 18:40 Message generated for change (Comment added) made by sf-robot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1495828&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: CVS >Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: edward dertouzas (ophten) Assigned to: Ton Voon (tonvoon) Summary: pst3 failure on solaris 10 x86 Initial Comment: https://sourceforge.net/tracker/index.php?func=detail&aid=1476451&group_id=29880&atid=397597 check_procs fails on Solaris 10 x86: root at infdb4.prodqa.coremetrics.com # ./check_procs -vvv CMD: /usr/local/nagios_new/libexec/pst3 CRITICAL - Plugin timed out after 10 seconds truss shows this just spinning through a read, finding nothing, then eventually trapping a SIGALRM. Onward! root at infdb4.prodqa.coremetrics.com # /usr/local/nagios_new/libexec/pst3 /usr/local/nagios_new/libexec/pst3: /dev/ksyms is not a 32-bit kernel namelist pst3: Failed to open kernel memory: Error 0 It appears we're using a 32-bit version of libkvm. I assume the generic /usr/lib/libkvm.so is a 32-bit version while /usr/lib/amd64/libkvm.so is 64-bit. At least the ELF class for libkvm.so is 64-bit. I can't seem to find the write linking magic to make this work. ---------------------------------------------------------------------- >Comment By: SourceForge Robot (sf-robot) Date: 2007-03-20 19:20 Message: Logged In: YES user_id=1312539 Originator: NO This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: Ton Voon (tonvoon) Date: 2007-03-06 09:35 Message: Logged In: YES user_id=664364 Originator: NO Hi! Can you please try the snapshot at http://nagiosplug.sf.net/snapshot. The ps command has changed from pst3 to /usr/ucb/ps for Solaris. I've marked this call in pending. Please update if there is still a problem. Ton ---------------------------------------------------------------------- Comment By: Ade Rixon (aderixon) Date: 2006-11-02 12:55 Message: Logged In: YES user_id=145082 Update to my previous comment: you must compile all the plugins in their entirety as 32 bit or 64 bit, and the supporting libraries must match, due to the interdependencies between object files. For Solaris, this effectively means 64 bit throughout only. The alternative is to bodge config.h to use the builtin ps command instead. ---------------------------------------------------------------------- Comment By: Ade Rixon (aderixon) Date: 2006-11-02 07:44 Message: Logged In: YES user_id=145082 pst3 needs to be compiled to match the Solaris kernel in use, either 32 bit or 64 bit (usually the latter on recent SPARC hardware). For the Sun Studio compiler, add -xarch=v9a to the CFLAGS. For GCC, add -m64. However, this may not be correct for other plugins since it depends what bit size the supporting libraries were compiled for (e.g. compiling in 64 bit mode against a 32 bit OpenSSL library won't work). I'd suggest adding the extra parameters only to CFLAGS in plugin-root/Makefile. This looks like something that needs detecting at configure time. ---------------------------------------------------------------------- Comment By: Duncan Ferguson (duncan_ferguson) Date: 2006-10-09 03:27 Message: Logged In: YES user_id=865292 This problem also occurs on Solaris 10 (06/06) sparc ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1495828&group_id=29880 From noreply at sourceforge.net Wed Mar 21 03:20:11 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 20 Mar 2007 19:20:11 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1666601 ] Solaris 8 check_procs plugin hangs until timeout Message-ID: <200703210220.l2L2KBNW029651@sc8-sf-db2-new-b.sourceforge.net> Bugs item #1666601, was opened at 2007-02-22 15:33 Message generated for change (Comment added) made by sf-robot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1666601&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None >Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: John R. Taisto (jtaisto) Assigned to: Ton Voon (tonvoon) Summary: Solaris 8 check_procs plugin hangs until timeout Initial Comment: check_procs (nagios-plugins 1.4.6) 1.57 Always exits with a timeout no matter how long it's given. Example 1: $plugins/check_procs -w 10 -c 20 --metric=CPU -t 10 CRITICAL - Plugin timed out after 10 seconds Example 2: plugins/check_procs -w 10 -c 20 --metric=CPU -t 60 CRITICAL - Plugin timed out after 60 seconds Solaris 8 (Generic kernel -44) Compiled with gcc 3.4.6 (SPARC) (-O2 -m64) No errors reported and binary gets created: Other plugins seem to work fine: No missing libraries: $ ldd plugins/check_procs libnsl.so.1 => /usr/lib/64/libnsl.so.1 libsocket.so.1 => /usr/lib/64/libsocket.so.1 libc.so.1 => /usr/lib/64/libc.so.1 libdl.so.1 => /usr/lib/64/libdl.so.1 libmp.so.2 => /usr/lib/64/libmp.so.2 /usr/platform/SUNW,Sun-Blade-100/lib/sparcv9/libc_psr.so.1 Truss output: truss -c ./plugins/check_procs -w 10 -c 20 --metric=CPU -t 10 CRITICAL - Plugin timed out after 10 seconds signals ------------ SIGALRM 1 total: 1 syscall seconds calls errors _exit .00 1 fork .00 1 read 2.04 138822 write .00 1 open .00 12 1 close .00 13 brk .00 4 stat .00 40 29 lseek .00 3 2 getpid .00 1 alarm .00 1 fstat .00 1 kill .01 1 pipe .00 2 ioctl .00 2 1 execve .00 1 sigaction .00 1 mmap .00 32 munmap .00 5 setrlimit .00 1 getrlimit .00 1 memcntl .00 4 resolvepath .00 12 ------- ------ ---- sys totals: 2.05 138962 33 usr time: .53 elapsed: 10.04 ---------------------------------------------------------------------- >Comment By: SourceForge Robot (sf-robot) Date: 2007-03-20 19:20 Message: Logged In: YES user_id=1312539 Originator: NO This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: Ton Voon (tonvoon) Date: 2007-03-06 09:31 Message: Logged In: YES user_id=664364 Originator: NO John, Can you please try the snapshot at http://nagiosplug.sf.net/snapshot. The ps command has changed from pst3 to /usr/ucb/ps for Solaris. I've marked this call in pending. Please update if there is still a problem. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1666601&group_id=29880 From noreply at sourceforge.net Wed Mar 21 03:20:11 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 20 Mar 2007 19:20:11 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1541340 ] check_procs won't execute on Solaris 9 x86 Message-ID: <200703210220.l2L2KB6W029689@sc8-sf-db2-new-b.sourceforge.net> Bugs item #1541340, was opened at 2006-08-16 07:43 Message generated for change (Comment added) made by sf-robot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1541340&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None >Status: Closed Resolution: None Priority: 5 Private: No Submitted By: maemigh (maemigh) Assigned to: Ton Voon (tonvoon) Summary: check_procs won't execute on Solaris 9 x86 Initial Comment: check_procs (from latest snapshot) just hangs and exits with a timeout error on Solaris 9 x86. It tries to use the pst3 command. I modified config.h to point to the location of pst3 and verbose mode shows the correct location. I was able to fix it by changing config.h to use the regular ps command as suggested in another bug post. pst3 runs fine with executed from the shell prompt. ---------------------------------------------------------------------- >Comment By: SourceForge Robot (sf-robot) Date: 2007-03-20 19:20 Message: Logged In: YES user_id=1312539 Originator: NO This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: Ton Voon (tonvoon) Date: 2007-03-06 09:36 Message: Logged In: YES user_id=664364 Originator: NO Hi! Can you please try the snapshot at http://nagiosplug.sf.net/snapshot. The ps command has changed from pst3 to /usr/ucb/ps for Solaris. I've marked this call in pending. Please update if there is still a problem. Ton ---------------------------------------------------------------------- Comment By: Ade Rixon (aderixon) Date: 2006-11-02 07:48 Message: Logged In: YES user_id=145082 See bug 1495828 (pst3 failure on solaris 10 x86) for info. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1541340&group_id=29880 From meier0001 at web.de Thu Mar 22 11:34:47 2007 From: meier0001 at web.de (Stefan Meier) Date: Thu, 22 Mar 2007 11:34:47 +0100 Subject: [Nagiosplug-devel] Check_Http Plugin BUG ? Message-ID: <15993007@web.de> Hi Developer, we use the Nagios ?Check_Http? for Performance Tests of our Webapplication. The Webapplication is parted over 4 Computer Centers. One Computer Center want to prove a fault programming with the used asprintf Function in your "check_http.c" plugin Sourcecode. They changed the Value "MAX_INPUT_BUFFER" from 1024 to 8196 on the Headerfile common.h. They got on a 800 MHZ Server with modified Check_Http Plugin a 120 ms shorter Response Time from our Webapplication. They told me the Response Html Data of a query will be parted into pieces (MAX_INPUT_BUFFER) and processed by the asprintf Function to get the elapsed Time of the query. The Opinion is that the asprintf Function under Linux used a lot of Time with 1024 Byte Pieces (allocating Memory) to process the asprintf Function. Using the 8196 Byte Pieces the calling of the asprintf Function will be lower as with 1024 Pieces and the Response Time (Performance Data) of the Webapplication will appropriately shorter. This Problem only occurs when the Response Html Data is greater than 100 Kb. Which "MAX_INPUT_BUFFER" Value should be used in the check_http Plugin to get real performance Data on a Web Query? Should the Check_Http Plugin be reprogrammed? What do you think? Is the Opinion of the Computer Center correct, or is this a dubious workaround? Thanks for your Response Greets Stefan _______________________________________________________________ SMS schreiben mit WEB.DE FreeMail - einfach, schnell und kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192 From sqf at aacon.com Wed Mar 21 18:19:51 2007 From: sqf at aacon.com (Mortimer) Date: Wed, 21 Mar 2007 18:19:51 +0100 Subject: [Nagiosplug-devel] habitation emergency Message-ID: <46016937.8090802@aacon.com> An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: victorious.gif Type: image/gif Size: 11777 bytes Desc: not available URL: From holger at CIS.FU-Berlin.DE Thu Mar 22 15:42:02 2007 From: holger at CIS.FU-Berlin.DE (Holger Weiss) Date: Thu, 22 Mar 2007 15:42:02 +0100 Subject: [Nagiosplug-devel] Check_Http Plugin BUG ? In-Reply-To: <15993007@web.de> References: <15993007@web.de> Message-ID: <20070322144202.GL44795887@CIS.FU-Berlin.DE> * Stefan Meier [2007-03-22 11:34]: > They changed the Value "MAX_INPUT_BUFFER" from 1024 to 8196 on the Headerfile > common.h. While I wouldn't classify this a "bug" ;-), I stumbled over the small buffer size some time ago, too. No idea why it was set that low in the first place. If nobody objects I'll increase it to 8192. Holger -- PGP fingerprint: F1F0 9071 8084 A426 DD59 9839 59D3 F3A1 B8B5 D3DE From ton.voon at altinity.com Thu Mar 22 16:02:54 2007 From: ton.voon at altinity.com (Ton Voon) Date: Thu, 22 Mar 2007 15:02:54 +0000 Subject: [Nagiosplug-devel] Check_Http Plugin BUG ? In-Reply-To: <20070322144202.GL44795887@CIS.FU-Berlin.DE> References: <15993007@web.de> <20070322144202.GL44795887@CIS.FU-Berlin.DE> Message-ID: On 22 Mar 2007, at 14:42, Holger Weiss wrote: > * Stefan Meier [2007-03-22 11:34]: >> They changed the Value "MAX_INPUT_BUFFER" from 1024 to 8196 on the >> Headerfile >> common.h. > > While I wouldn't classify this a "bug" ;-), I stumbled over the small > buffer size some time ago, too. No idea why it was set that low in > the > first place. If nobody objects I'll increase it to 8192. > I've got no objections either, although longer term we should be able to cater for arbitrary sizes. I think a new release is required, so we'll see what the Tinderbox tests say for this change before we take a new cut. Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon From noreply at sourceforge.net Thu Mar 22 16:26:45 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 22 Mar 2007 08:26:45 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1686125 ] check_snmp client source IP address support Message-ID: Patches item #1686125, was opened at 2007-03-22 16:26 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1686125&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Enhancement Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Gregor Lawatscheck (gpel) Assigned to: Nobody/Anonymous (nobody) Summary: check_snmp client source IP address support Initial Comment: Please find attached a patch to support the optional specification of a client source IP address in check_snmp. If -S or --source is set the parameter --clientaddr is passed to snmpget / snmpgetnext. This is useful if you have various interfaces / IP addresses bound on your nagios box and need to check SNMP using different source IPs. Please feel free to include this in the source tree and optimize the code as you see fit. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1686125&group_id=29880 From gl at mpexnet.de Thu Mar 22 16:07:39 2007 From: gl at mpexnet.de (Gregor Lawatscheck) Date: Thu, 22 Mar 2007 16:07:39 +0100 Subject: [Nagiosplug-devel] [PATCH] check_snmp client source IP address support Message-ID: <46029BBB.70501@mpexnet.de> Please find attached a patch to support the optional specification of a client source IP address in check_snmp. If -S or --source is set the parameter --clientaddr is passed to snmpget / snmpgetnext. This is useful if you have various interfaces / IP addresses bound on your nagios box and need to check SNMP using different source IPs. Please feel free to include this in the source tree and optimize the code as you see fit. Greetings, Gregor -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: check_snmp_sourceip.patch URL: From holger at CIS.FU-Berlin.DE Thu Mar 22 18:55:13 2007 From: holger at CIS.FU-Berlin.DE (Holger Weiss) Date: Thu, 22 Mar 2007 18:55:13 +0100 Subject: [Nagiosplug-devel] Check_Http Plugin BUG ? In-Reply-To: References: <15993007@web.de> <20070322144202.GL44795887@CIS.FU-Berlin.DE> Message-ID: <20070322175513.GM44795887@CIS.FU-Berlin.DE> * Ton Voon [2007-03-22 15:02]: > On 22 Mar 2007, at 14:42, Holger Weiss wrote: > > * Stefan Meier [2007-03-22 11:34]: > >> They changed the Value "MAX_INPUT_BUFFER" from 1024 to 8196 on the > >> Headerfile common.h. > > > > While I wouldn't classify this a "bug" ;-), I stumbled over the small > > buffer size some time ago, too. No idea why it was set that low in > > the first place. If nobody objects I'll increase it to 8192. > > I've got no objections either, although longer term we should be able > to cater for arbitrary sizes. I'm not aware of a place where we don't handle input data of arbitrary length (that I'm not aware doesn't mean a lot, though). My intention for this change was to reduce the number of iterations of loops such as: while (fgets(buf, MAX_INPUT_BUFFER, stream)) /* do something with buf */; Of course, increasing MAX_INPUT_BUFFER increases memory usage and the possible performance gain depends on the platform and the actual operation for which the buffer is used. However, using only 1k will most likely slow things down in many cases. > I think a new release is required, so we'll see what the Tinderbox > tests say for this change before we take a new cut. Okay, I committed the change. Holger -- PGP fingerprint: F1F0 9071 8084 A426 DD59 9839 59D3 F3A1 B8B5 D3DE From noreply at sourceforge.net Sun Mar 25 00:31:57 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Sat, 24 Mar 2007 16:31:57 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1494629 ] 1.4.6 (& .3 & .5) - check_icmp fails after a time on FreeBSD Message-ID: Bugs item #1494629, was opened at 2006-05-25 06:41 Message generated for change (Comment added) made by mfavas You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1494629&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: Release (specify) Status: Open Resolution: None Priority: 5 Private: No Submitted By: Mark Favas (mfavas) >Assigned to: Thomas Guyot (dermoth) >Summary: 1.4.6 (& .3 & .5) - check_icmp fails after a time on FreeBSD Initial Comment: Current release (1.4.3) check_icmp on FreeBSD 6.1 works fine for some hours, then reports 100% packet loss. This is due to the plugin not allowing for the fact that PIDs can be greater than 65535 (i.e. more than 16 bits) on systems such as FreeBSD. Further details are given in http://article.gmane.org/gmane.network.nagios.plugins/1945 . A version of check_icmp available from Andreas fixes this issue. This version has an earlier date associated with it than the version distributed in nagios-plugins, but a higher revsion number. Quote: """ If the fix isn't available in a recent package from the official nagiosplug package you should be able to use the one found at http://oss.op5.se/nagios/check_icmp-2005-06-01.tar.gz You can notice if the fix is available from the nagiosplug project by doing $ grep -q 'pid & 0xffff' check_icmp.c && echo "Fix available" """ ---------------------------------------------------------------------- >Comment By: Mark Favas (mfavas) Date: 2007-03-25 07:31 Message: Logged In: YES user_id=44979 Originator: YES This bug still exists in 1.4.6, with FreeBSD 6.2 - would really appreciate a fix in the officially-released plugin code. ---------------------------------------------------------------------- Comment By: Mark Favas (mfavas) Date: 2006-12-02 18:29 Message: Logged In: YES user_id=44979 Originator: YES This bug still exists in version 1.4.5 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1494629&group_id=29880 From ton.voon at altinity.com Sun Mar 25 16:22:54 2007 From: ton.voon at altinity.com (Ton Voon) Date: Sun, 25 Mar 2007 15:22:54 +0100 Subject: [Nagiosplug-devel] --with-nagios-user/group options In-Reply-To: <45F5BAB9.3020002@nagios.org> References: <45EC7E83.7060809@nagios.org> <75C5C039-27AC-413F-90B7-D73EA248FCCC@altinity.com> <20070306233202.GA29270@openfusion.com.au> <20070311224305.GA10093@openfusion.com.au> <45F5BAB9.3020002@nagios.org> Message-ID: <5866A204-B6FE-4D30-A89E-4A05518C753C@altinity.com> On 12 Mar 2007, at 20:40, Ethan Galstad wrote: > Gavin Carr wrote: >> On Sun, Mar 11, 2007 at 01:08:17AM +0000, Ton Voon wrote: >>> The whole point about configure scripts is to make common cases work >>> by selecting appropriate flags. So my current thinking is to do >>> this: >>> >>> - if you leave out with-nagios-user/group, it will install with >>> the >>> user that runs "make install". If user is root, then the setuid >>> plugins will get installed in addition. This mimics coreutils, >>> apache >>> and mysql's behaviour >>> - if you choose --with-nagios-user, then the normal plugins >>> will be >>> given ownership of the executables >>> - if you choose --with-nagios-group, then the normal and root >>> plugins will be given group ownership of the executables >>> - if you choose a new --without-world-permissions, then normal and >>> root plugins will not have world read or execute permissions >> >> This all looks good to me. I've committed a change for this now. I've also posted a blog entry about it at http://www.nagioscommunity.org/2007/03/25/installing-the- nagios-plugins/. I'll copy relevant portions over to http:// nagiosplugins.org too later. >>> So you gain most security by running ./configure --with-nagios- >>> user=X >>> --with-nagios-group=Y --without-world-permissions. Any other fine >>> tuning of this would be left as an exercise to the user. >>> >>> The decision to install root plugins is made by whether you >>> decide to >>> install as root. >> >> Do you mean 'install' or 'install setuid'? If the former, then non- >> root >> packagers are still going to want a way of installing those >> plugins, so >> we still will need a 'make install-root' or some such eh? >> >> I actually prefer the 'install setuid' option - always install >> everything, >> and then make root plugins setuid if effective user is root. That >> does >> the right thing in the direct-install case, and makes life easy for >> packagers too. > > Both of these options sound good by me too. Hopefully, the blog entry explains all the necessary bits. Let me know if I've missed anything or it doesn't work as expected. I'll cut a 1.4.7 release on Tuesday if there's no adverse reactions. Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon From ton.voon at altinity.com Sun Mar 25 16:32:21 2007 From: ton.voon at altinity.com (Ton Voon) Date: Sun, 25 Mar 2007 15:32:21 +0100 Subject: [Nagiosplug-devel] Tinderbox tests to include install? Message-ID: <57E08680-71E1-4096-BA52-CA17CDA92DAF@altinity.com> Hi! The tinderbox tests are great at the moment for showing the status of compiles and the test suite. However, we don't do any install tests. The 1.4.6 release raised quite a few emails re: the po/Makefile.in problem on fedora. I was thinking of a "make install DESTDIR=/tmp/ np_build.$$" to prove that the plugins are being installed correctly. Of course, we'd delete the directory afterwards.... Is this a good idea? If so, would current build owners object to this being done? Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon From noreply at sourceforge.net Sun Mar 25 18:37:08 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Sun, 25 Mar 2007 09:37:08 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1687867 ] check_http: buffer overflow vulnerability Message-ID: Bugs item #1687867, was opened at 2007-03-26 01:37 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1687867&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None Status: Open Resolution: None Priority: 5 Private: Yes Submitted By: Nobuhiro Ban (ban_nobuhiro) Assigned to: Nobody/Anonymous (nobody) Summary: check_http: buffer overflow vulnerability Initial Comment: Description: Buffer overflows within the redir() function of check_http.c potentially allow remote attackers to execute arbitrary code via crafted ``Location:'' responses. This vulnerability is caused by passing insufficient length buffers to sscanf(). Example of crafted ``Location:'' response: o Location: htttttttttttttttttttttttttttttttttttttttttttp://example.com/ o Location: http://example.com:1234567890123456789012345678901234567890/ o Location: http://tooooooooooooooooooooooooooooooooooooooooooooooooooo.loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong.loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong.loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong.loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong.loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong.loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong.host-name.example.com/ Workaround: Do not check untrusted web server with ``-f follow'' option. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1687867&group_id=29880 From noreply at sourceforge.net Sun Mar 25 18:39:36 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Sun, 25 Mar 2007 09:39:36 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1687867 ] check_http: buffer overflow vulnerability Message-ID: Bugs item #1687867, was opened at 2007-03-26 01:37 Message generated for change (Settings changed) made by ban_nobuhiro You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1687867&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None Status: Open Resolution: None >Priority: 7 Private: Yes Submitted By: Nobuhiro Ban (ban_nobuhiro) Assigned to: Nobody/Anonymous (nobody) Summary: check_http: buffer overflow vulnerability Initial Comment: Description: Buffer overflows within the redir() function of check_http.c potentially allow remote attackers to execute arbitrary code via crafted ``Location:'' responses. This vulnerability is caused by passing insufficient length buffers to sscanf(). Example of crafted ``Location:'' response: o Location: htttttttttttttttttttttttttttttttttttttttttttp://example.com/ o Location: http://example.com:1234567890123456789012345678901234567890/ o Location: http://tooooooooooooooooooooooooooooooooooooooooooooooooooo.loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong.loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong.loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong.loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong.loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong.loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong.host-name.example.com/ Workaround: Do not check untrusted web server with ``-f follow'' option. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1687867&group_id=29880 From iwish at sh163.net Mon Mar 26 07:58:41 2007 From: iwish at sh163.net (iwish) Date: Mon, 26 Mar 2007 13:58:41 +0800 Subject: [Nagiosplug-devel] Tinderbox tests to include install? References: <57E08680-71E1-4096-BA52-CA17CDA92DAF@altinity.com> Message-ID: <200703261358413572194@sh163.net> iwish 2007-03-26 ???? Ton Voon ????? 2007-03-25 22:33:06 ???? Nagios Plugin Development Mailing List ??? ??? [Nagiosplug-devel] Tinderbox tests to include install? Hi! The tinderbox tests are great at the moment for showing the status of compiles and the test suite. However, we don't do any install tests. The 1.4.6 release raised quite a few emails re: the po/Makefile.in problem on fedora. I was thinking of a "make install DESTDIR=/tmp/ np_build.$$" to prove that the plugins are being installed correctly. Of course, we'd delete the directory afterwards.... Is this a good idea? If so, would current build owners object to this being done? Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________________ Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel ::: Please include plugins version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -------------- next part -------------- An HTML attachment was scrubbed... URL: From eratum at gmx.net Mon Mar 26 11:16:35 2007 From: eratum at gmx.net (Nico Schmidt) Date: Mon, 26 Mar 2007 11:16:35 +0200 (CEST) Subject: [Nagiosplug-devel] VBS + Proxy-Authentication Message-ID: <20070326091635.015D84F4045@desire.netways.de> Hi list, I have written a little Nagios-Plug-In with VB-Script. This Plugin runs under Windows using NRPE. The script is used for checking the Proxies functionality. For this I am using the "WinHttpReq" command which returns 200 for okay 401 for missing web authentication 407 for missing proxy authentication. Of course I'm giving back 0 (200),1,2 (407) or 3 to Nagios. If I run the script with the windows cmd everthing works fine and i get back the returncode 200 (0 for Nagios). If I start the script under Debian by using: ./check_nrpe -H 172.21.50.201 -c nt_check_proxy I get back 407 (2 for Nagios). I have already checked if the parameters (given in the nrpe.cfg) are handled correctley, and this seems to be. I really do not know why this doesn't works. Hours of searching and googling did not bring any success. Peaple in other forums also couldn't help. So I hope to get the Information I nieed in this list. Thanks a lot folks... - Nico Schmidt (Freddchen) ----------------------- The mailing list archive is found here: http://www.nagiosexchange.org/nagiosplug-devel.31.0.html From holger at CIS.FU-Berlin.DE Mon Mar 26 13:20:16 2007 From: holger at CIS.FU-Berlin.DE (Holger Weiss) Date: Mon, 26 Mar 2007 13:20:16 +0200 Subject: [Nagiosplug-devel] Tinderbox tests to include install? In-Reply-To: <57E08680-71E1-4096-BA52-CA17CDA92DAF@altinity.com> References: <57E08680-71E1-4096-BA52-CA17CDA92DAF@altinity.com> Message-ID: <20070326112016.GQ44795887@CIS.FU-Berlin.DE> * Ton Voon [2007-03-25 15:32]: > The 1.4.6 release raised quite a few emails re: the po/Makefile.in > problem on fedora. I was thinking of a "make install DESTDIR=/tmp/ > np_build.$$" to prove that the plugins are being installed correctly. > Of course, we'd delete the directory afterwards.... > > Is this a good idea? If so, would current build owners object to this > being done? I wouldn't - good idea, IMO. Holger -- PGP fingerprint: F1F0 9071 8084 A426 DD59 9839 59D3 F3A1 B8B5 D3DE From noreply at sourceforge.net Tue Mar 27 08:32:42 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 26 Mar 2007 23:32:42 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1494629 ] 1.4.6 (& .3 & .5) - check_icmp fails after a time on FreeBSD Message-ID: Bugs item #1494629, was opened at 2006-05-24 18:41 Message generated for change (Comment added) made by dermoth You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1494629&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: Release (specify) Status: Open Resolution: None Priority: 5 Private: No Submitted By: Mark Favas (mfavas) Assigned to: Thomas Guyot (dermoth) Summary: 1.4.6 (& .3 & .5) - check_icmp fails after a time on FreeBSD Initial Comment: Current release (1.4.3) check_icmp on FreeBSD 6.1 works fine for some hours, then reports 100% packet loss. This is due to the plugin not allowing for the fact that PIDs can be greater than 65535 (i.e. more than 16 bits) on systems such as FreeBSD. Further details are given in http://article.gmane.org/gmane.network.nagios.plugins/1945 . A version of check_icmp available from Andreas fixes this issue. This version has an earlier date associated with it than the version distributed in nagios-plugins, but a higher revsion number. Quote: """ If the fix isn't available in a recent package from the official nagiosplug package you should be able to use the one found at http://oss.op5.se/nagios/check_icmp-2005-06-01.tar.gz You can notice if the fix is available from the nagiosplug project by doing $ grep -q 'pid & 0xffff' check_icmp.c && echo "Fix available" """ ---------------------------------------------------------------------- >Comment By: Thomas Guyot (dermoth) Date: 2007-03-27 02:32 Message: Logged In: YES user_id=375623 Originator: NO Thanks for reporting. I fixed it in CVS so you can either pull the HEAD revision (Or wait for the next snapshot) or use the attached patch. ---------------------------------------------------------------------- Comment By: Mark Favas (mfavas) Date: 2007-03-24 19:31 Message: Logged In: YES user_id=44979 Originator: YES This bug still exists in 1.4.6, with FreeBSD 6.2 - would really appreciate a fix in the officially-released plugin code. ---------------------------------------------------------------------- Comment By: Mark Favas (mfavas) Date: 2006-12-02 05:29 Message: Logged In: YES user_id=44979 Originator: YES This bug still exists in version 1.4.5 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1494629&group_id=29880 From noreply at sourceforge.net Tue Mar 27 08:55:50 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 26 Mar 2007 23:55:50 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1494629 ] 1.4.6 (& .3 & .5) - check_icmp fails after a time on FreeBSD Message-ID: Bugs item #1494629, was opened at 2006-05-24 18:41 Message generated for change (Comment added) made by dermoth You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1494629&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: Release (specify) >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Mark Favas (mfavas) Assigned to: Thomas Guyot (dermoth) Summary: 1.4.6 (& .3 & .5) - check_icmp fails after a time on FreeBSD Initial Comment: Current release (1.4.3) check_icmp on FreeBSD 6.1 works fine for some hours, then reports 100% packet loss. This is due to the plugin not allowing for the fact that PIDs can be greater than 65535 (i.e. more than 16 bits) on systems such as FreeBSD. Further details are given in http://article.gmane.org/gmane.network.nagios.plugins/1945 . A version of check_icmp available from Andreas fixes this issue. This version has an earlier date associated with it than the version distributed in nagios-plugins, but a higher revsion number. Quote: """ If the fix isn't available in a recent package from the official nagiosplug package you should be able to use the one found at http://oss.op5.se/nagios/check_icmp-2005-06-01.tar.gz You can notice if the fix is available from the nagiosplug project by doing $ grep -q 'pid & 0xffff' check_icmp.c && echo "Fix available" """ ---------------------------------------------------------------------- >Comment By: Thomas Guyot (dermoth) Date: 2007-03-27 02:55 Message: Logged In: YES user_id=375623 Originator: NO Sorry, last comment was sent too early in error. The code have just been committed and the patch is attached. File Added: check_icmp.32bit-pid_t.patch ---------------------------------------------------------------------- Comment By: Thomas Guyot (dermoth) Date: 2007-03-27 02:32 Message: Logged In: YES user_id=375623 Originator: NO Thanks for reporting. I fixed it in CVS so you can either pull the HEAD revision (Or wait for the next snapshot) or use the attached patch. ---------------------------------------------------------------------- Comment By: Mark Favas (mfavas) Date: 2007-03-24 19:31 Message: Logged In: YES user_id=44979 Originator: YES This bug still exists in 1.4.6, with FreeBSD 6.2 - would really appreciate a fix in the officially-released plugin code. ---------------------------------------------------------------------- Comment By: Mark Favas (mfavas) Date: 2006-12-02 05:29 Message: Logged In: YES user_id=44979 Originator: YES This bug still exists in version 1.4.5 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1494629&group_id=29880 From noreply at sourceforge.net Tue Mar 27 16:43:51 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 27 Mar 2007 07:43:51 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1689260 ] check_smtp 1.4.6 local host name never added to helo command Message-ID: Bugs item #1689260, was opened at 2007-03-27 14:43 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1689260&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Bill Kunkel (gollum13) Assigned to: Nobody/Anonymous (nobody) Summary: check_smtp 1.4.6 local host name never added to helo command Initial Comment: It looks like there were some changes between 1.4.5 and 1.4.6 where: 1) the command line option to specify the local host name of the helo command was removed. and 2) The code that tries to figure out the local host name changed slightly. subsequently, The local host name is always null (running the plug-in from the command line with the -v option verifies this). This is fine for normal smtp checks, but it causes TLS checks to fail. sendmail (8.14) complains about an invalid domain name and doesn't send back a list of available services like the plug-in is expecting, hence the TLS check returns a warning. I have attached a patch that should fix the problem. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1689260&group_id=29880 From noreply at sourceforge.net Tue Mar 27 16:54:23 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 27 Mar 2007 07:54:23 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1689260 ] check_smtp 1.4.6 local host name never added to helo command Message-ID: Bugs item #1689260, was opened at 2007-03-27 15:43 Message generated for change (Comment added) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1689260&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Bill Kunkel (gollum13) Assigned to: Nobody/Anonymous (nobody) Summary: check_smtp 1.4.6 local host name never added to helo command Initial Comment: It looks like there were some changes between 1.4.5 and 1.4.6 where: 1) the command line option to specify the local host name of the helo command was removed. and 2) The code that tries to figure out the local host name changed slightly. subsequently, The local host name is always null (running the plug-in from the command line with the -v option verifies this). This is fine for normal smtp checks, but it causes TLS checks to fail. sendmail (8.14) complains about an invalid domain name and doesn't send back a list of available services like the plug-in is expecting, hence the TLS check returns a warning. I have attached a patch that should fix the problem. ---------------------------------------------------------------------- >Comment By: Ton Voon (tonvoon) Date: 2007-03-27 15:54 Message: Logged In: YES user_id=664364 Originator: NO Bill, Thanks for the patch. This is already fixed in CVS HEAD. You can try the snapshot at http://nagiosplug.sf.net/snapshot Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1689260&group_id=29880 From Ian.Hunt at globalcrossing.com Wed Mar 28 13:34:59 2007 From: Ian.Hunt at globalcrossing.com (Hunt, Ian) Date: Wed, 28 Mar 2007 12:34:59 +0100 Subject: [Nagiosplug-devel] Nagiosplug 1.4.6 check_users $Revision: 1.22 $ RFE Message-ID: <1AB7753DCDD7FE40A48E8AF2AB60C66501ABB164@EVS6.eur.gblxint.com> Hi All May I add a Request for Enhancement to your UNIX compatible plugin list. 1 Filter by Username Accept a new argument : regex expression Use the argument to make a comparison against the usernames logged on : report count of matches. e.g. check_user -w 1 -c 1 -e "root[0-9]" 2 Logins outside working hours Accept two new arguments : start time and end time (In 24hr clock format) Use the arguments to compare the filtered output against a Time Window : during the window logins are acceptable. The timestamp is taken from the host the check is run on and thus not the Central Nagios Hub. Report count of matches e.g. check_user -w 1 -c 4 -a 07:15 -z 20:15 -e "root|backup|appadm|dbaadm|sysadm" Thanks for all your efforts to date. Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at sourceforge.net Thu Mar 29 11:38:42 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 29 Mar 2007 02:38:42 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1556886 ] check_ntp ---> Memory fault Message-ID: Bugs item #1556886, was opened at 2006-09-12 08:24 Message generated for change (Comment added) made by tonvoon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1556886&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Argument proccessing Group: CVS >Status: Pending Resolution: None Priority: 5 Private: No Submitted By: Ciro Iriarte (cyruspy) >Assigned to: Ton Voon (tonvoon) Summary: check_ntp ---> Memory fault Initial Comment: The plugin works fine if i don't ask for jitter checking, but if i do it just gives Memory Fault. Linux x86_64: asusis-ope2:/etc/nagios # /usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j 2 -k 3 Segmentation fault asusis-ope2:/etc/nagios # /usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j 2.0 -k 3.0 Segmentation fault asusis-ope2:/etc/nagios # /usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j 2,0 -k 3,0 Segmentation fault Tru64: iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins> ./check_ntp -H 10.129.4.140 -j 2 -k 3 Memory fault iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins> ./check_ntp -H 10.129.4.140 -j 2.0 -k 3.0 Memory fault iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins> ./check_ntp -H 10.129.4.140 -j 2,0 -k 3,0 Memory fault ---------------------------------------------------------------------- >Comment By: Ton Voon (tonvoon) Date: 2007-03-29 10:38 Message: Logged In: YES user_id=664364 Originator: NO Ciro, Can you please try the snapshot as I think this is fixed. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1556886&group_id=29880 From ton.voon at altinity.com Thu Mar 29 12:10:42 2007 From: ton.voon at altinity.com (Ton Voon) Date: Thu, 29 Mar 2007 11:10:42 +0100 Subject: [Nagiosplug-devel] [Nagios-devel] check_procs issue on Solaris In-Reply-To: <76363578.5b3980c5.8199400@mail.e-integration.net> References: <76363578.5b3980c5.8199400@mail.e-integration.net> Message-ID: On 26 Mar 2007, at 23:25, J.R. Taisto wrote: > The issue I seem to be running into with the Nagios > check_procs plugin is the fields for "ps -alxwwn" sometimes > merge into each other. I haven't figured out yet how to make > "ps" not do this. See below: > > # /usr/ucb/ps -alxwwn | more > F UID PID PPID %C PRI NI SZ RSS WCHAN S TT > TIME COMMAND > 1 0 0 0 0 96 0 0 0 T ? > 0:36 sched > 0 0 1 0 0 59 20 2384 576 600063d04aa S ? > 44:43 /sbin/init > 1 0 2 0 0 98 0 0 0 018fae68 S ? > 0:00 pageout > 1 0 3 0 0 60 0 0 0 01910d78 S ? > 2026:54 fsflush > 0 0 7 1 0 59 2022160 2416 3000327b166 S ? > 2:07 /lib/svc/bin/svc.startd > 0 0 9 1 0 59 2010544 2160 3000327a806 S ? > 0:54 /lib/svc/bin/svc.configd > > > This explains why check_procs doesn't work as expected on > Solaris. See example below: > > # ps -ef | wc -l > 896 > > # ./check_procs --version > check_procs (nagios-plugins 1.4.6) 1.58 > > # ./check_procs -w 5 -c 10 -t 30 > PROCS CRITICAL: 232 processes > > # ./check_procs -w 5 -c 10 -t 30 -vvv | more > CMD: /usr/ucb/ps -alxwwn > 1 0 0 0 0 96 0 0 0 T ? > 0:36 sched > proc#=0 uid=0 vsz=0 rss=0 pid=0 ppid=0 pcpu=0.00 stat=T etime= > prog= args=sched > 0 0 1 0 0 59 20 2384 576 600063d04aa S ? > 44:43 /sbin/init > proc#=1 uid=0 vsz=2384 rss=576 pid=1 ppid=0 pcpu=0.00 stat=S > etime= prog= args=/sbin/init > 1 0 2 0 0 98 0 0 0 018fae68 S ? > 0:00 pageout > proc#=2 uid=0 vsz=0 rss=0 pid=2 ppid=0 pcpu=0.00 stat=S etime= > prog= args=pageout > 1 0 3 0 0 60 0 0 0 01910d78 S ? > 2027:07 fsflush > ... > ... Here's an example of some of the nonparsable stuff: > ... > 0 110 234 1 0 59 2043902084249176 30073ad758a S ? > 0:00 oraclePRD (LOCAL=NO) > Not parseable: 0 110 234 1 0 59 2043902084249176 > 30073ad758a S ? 0:00 oraclePRD (LOCAL=NO) > > Note the "Not parseable:" tag. Do you have any > recommendations? I'm thinking I need not use the ucb version > of "ps," but I'm not sure that is necessarily the right > decision if that seems to be the preferred version of "ps" for > this plugin. All help is appreciated. Thanks. Cross posting to nagiosplug-devel list. Please reply to there only. It looks like the SZ and RSS columns have been merged together? Is there anyway to tell when one ends and the other starts? There's been so many issues with the solaris support of check_procs. I'll continue the discussion on the nagiosplug-devel mailing list. Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon From noreply at sourceforge.net Thu Mar 29 12:41:22 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 29 Mar 2007 03:41:22 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1556886 ] check_ntp ---> Memory fault Message-ID: Bugs item #1556886, was opened at 2006-09-12 03:24 Message generated for change (Comment added) made by dermoth You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1556886&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Argument proccessing Group: CVS Status: Pending Resolution: None Priority: 5 Private: No Submitted By: Ciro Iriarte (cyruspy) Assigned to: Ton Voon (tonvoon) Summary: check_ntp ---> Memory fault Initial Comment: The plugin works fine if i don't ask for jitter checking, but if i do it just gives Memory Fault. Linux x86_64: asusis-ope2:/etc/nagios # /usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j 2 -k 3 Segmentation fault asusis-ope2:/etc/nagios # /usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j 2.0 -k 3.0 Segmentation fault asusis-ope2:/etc/nagios # /usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j 2,0 -k 3,0 Segmentation fault Tru64: iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins> ./check_ntp -H 10.129.4.140 -j 2 -k 3 Memory fault iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins> ./check_ntp -H 10.129.4.140 -j 2.0 -k 3.0 Memory fault iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins> ./check_ntp -H 10.129.4.140 -j 2,0 -k 3,0 Memory fault ---------------------------------------------------------------------- >Comment By: Thomas Guyot (dermoth) Date: 2007-03-29 06:41 Message: Logged In: YES user_id=375623 Originator: NO I just tested on my servers and I get SEGV for both 1.4.6 and HEAD: root at josianne:/tmp/nagiosplug# plugins/check_ntp -H 64.94.137.1 -j 2 -k 3 root at josianne:/tmp/nagiosplug# plugins/check_ntp -H 64.94.137.1 NTP OK: Offset -0.0002659001038 secs|offset=-0.0002659001038 root at josianne:/tmp/nagiosplug# gdb plugins/check_ntp GNU gdb 6.5 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-slackware-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) run -H 64.94.137.1 -j 2 -k 3 Starting program: /tmp/nagiosplug/plugins/check_ntp -H 64.94.137.1 -j 2 -k 3 Program received signal SIGSEGV, Segmentation fault. 0xb7e5a9a1 in ____strtod_l_internal () from /lib/tls/libc.so.6 (gdb) bt #0 0xb7e5a9a1 in ____strtod_l_internal () from /lib/tls/libc.so.6 #1 0xb7e57ec8 in __strtod_internal () from /lib/tls/libc.so.6 #2 0x0804a1af in jitter_request (host=0x804f0b0 "64.94.137.1", status=0xbfd903f0) at /usr/include/stdlib.h:327 #3 0x0804a8a2 in main (argc=7, argv=0xbfd90494) at check_ntp.c:748 ---------------------------------------------------------------------- Comment By: Ton Voon (tonvoon) Date: 2007-03-29 05:38 Message: Logged In: YES user_id=664364 Originator: NO Ciro, Can you please try the snapshot as I think this is fixed. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1556886&group_id=29880 From noreply at sourceforge.net Thu Mar 29 13:37:48 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 29 Mar 2007 04:37:48 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1556886 ] check_ntp ---> Memory fault Message-ID: Bugs item #1556886, was opened at 2006-09-12 03:24 Message generated for change (Comment added) made by dermoth You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1556886&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Argument proccessing Group: CVS Status: Pending Resolution: None Priority: 5 Private: No Submitted By: Ciro Iriarte (cyruspy) Assigned to: Ton Voon (tonvoon) Summary: check_ntp ---> Memory fault Initial Comment: The plugin works fine if i don't ask for jitter checking, but if i do it just gives Memory Fault. Linux x86_64: asusis-ope2:/etc/nagios # /usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j 2 -k 3 Segmentation fault asusis-ope2:/etc/nagios # /usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j 2.0 -k 3.0 Segmentation fault asusis-ope2:/etc/nagios # /usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j 2,0 -k 3,0 Segmentation fault Tru64: iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins> ./check_ntp -H 10.129.4.140 -j 2 -k 3 Memory fault iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins> ./check_ntp -H 10.129.4.140 -j 2.0 -k 3.0 Memory fault iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins> ./check_ntp -H 10.129.4.140 -j 2,0 -k 3,0 Memory fault ---------------------------------------------------------------------- >Comment By: Thomas Guyot (dermoth) Date: 2007-03-29 07:37 Message: Logged In: YES user_id=375623 Originator: NO The attached patch fixes the segfault on my prod servers, but returns a warning because it can't seems to get the jitter. While getting the jitter seems to be the root of the problem I believe it wouldn't be a bad idea to apply this patch as well. I'll leave the patch to whoever fix the problem though because I don't understand much about NTP ;) File Added: check_ntp.startofvalue.patch ---------------------------------------------------------------------- Comment By: Thomas Guyot (dermoth) Date: 2007-03-29 06:41 Message: Logged In: YES user_id=375623 Originator: NO I just tested on my servers and I get SEGV for both 1.4.6 and HEAD: root at josianne:/tmp/nagiosplug# plugins/check_ntp -H 64.94.137.1 -j 2 -k 3 root at josianne:/tmp/nagiosplug# plugins/check_ntp -H 64.94.137.1 NTP OK: Offset -0.0002659001038 secs|offset=-0.0002659001038 root at josianne:/tmp/nagiosplug# gdb plugins/check_ntp GNU gdb 6.5 Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-slackware-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) run -H 64.94.137.1 -j 2 -k 3 Starting program: /tmp/nagiosplug/plugins/check_ntp -H 64.94.137.1 -j 2 -k 3 Program received signal SIGSEGV, Segmentation fault. 0xb7e5a9a1 in ____strtod_l_internal () from /lib/tls/libc.so.6 (gdb) bt #0 0xb7e5a9a1 in ____strtod_l_internal () from /lib/tls/libc.so.6 #1 0xb7e57ec8 in __strtod_internal () from /lib/tls/libc.so.6 #2 0x0804a1af in jitter_request (host=0x804f0b0 "64.94.137.1", status=0xbfd903f0) at /usr/include/stdlib.h:327 #3 0x0804a8a2 in main (argc=7, argv=0xbfd90494) at check_ntp.c:748 ---------------------------------------------------------------------- Comment By: Ton Voon (tonvoon) Date: 2007-03-29 05:38 Message: Logged In: YES user_id=664364 Originator: NO Ciro, Can you please try the snapshot as I think this is fixed. Ton ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1556886&group_id=29880 From dermoth at aei.ca Thu Mar 29 13:43:58 2007 From: dermoth at aei.ca (Thomas Guyot-Sionnest) Date: Thu, 29 Mar 2007 07:43:58 -0400 Subject: [Nagiosplug-devel] More check_ntp bugs... Message-ID: <460BA67E.3000803@aei.ca> While trying to debug the jitter bug on my home computer (Ubuntu 6.10, X86_64) I found one more on the realloc call at check_ntp.c:543. I just have no idea what's the proper way to fix that... (gdb) run -H pool.ntp.org -j 2 -k 3 Starting program: /home/dermoth/DEV/src/nagios-plugins/nagiosplug/plugins/check_ntp -H pool.ntp.org -j 2 -k 3 *** glibc detected *** /home/dermoth/DEV/src/nagios-plugins/nagiosplug/plugins/check_ntp: realloc(): invalid next size: 0x0000000000508630 *** ======= Backtrace: ========= /lib/libc.so.6[0x2b2132d251ed] /lib/libc.so.6(__libc_realloc+0x11c)[0x2b2132d25bfc] /home/dermoth/DEV/src/nagios-plugins/nagiosplug/plugins/check_ntp[0x401ba6] /home/dermoth/DEV/src/nagios-plugins/nagiosplug/plugins/check_ntp[0x402d46] /lib/libc.so.6(__libc_start_main+0xf4)[0x2b2132cd20c4] /home/dermoth/DEV/src/nagios-plugins/nagiosplug/plugins/check_ntp[0x401339] ======= Memory map: ======== 00400000-00407000 r-xp 00000000 08:02 1665960 /home/dermoth/DEV/src/nagios-plugins/nagiosplug/plugins/check_ntp 00506000-00507000 rw-p 00006000 08:02 1665960 /home/dermoth/DEV/src/nagios-plugins/nagiosplug/plugins/check_ntp 00507000-00528000 rw-p 00507000 00:00 0 [heap] 2b21327eb000-2b2132807000 r-xp 00000000 08:02 21045 /lib/ld-2.4.so 2b2132807000-2b213280a000 rw-p 2b2132807000 00:00 0 2b2132906000-2b2132908000 rw-p 0001b000 08:02 21045 /lib/ld-2.4.so 2b2132908000-2b213291b000 r-xp 00000000 08:02 34268 /lib/libnsl-2.4.so 2b213291b000-2b2132a1b000 ---p 00013000 08:02 34268 /lib/libnsl-2.4.so 2b2132a1b000-2b2132a1d000 rw-p 00013000 08:02 34268 /lib/libnsl-2.4.so 2b2132a1d000-2b2132a1f000 rw-p 2b2132a1d000 00:00 0 2b2132a1f000-2b2132a30000 r-xp 00000000 08:02 111584 /lib/libresolv-2.4.so 2b2132a30000-2b2132b30000 ---p 00011000 08:02 111584 /lib/libresolv-2.4.so 2b2132b30000-2b2132b32000 rw-p 00011000 08:02 111584 /lib/libresolv-2.4.so 2b2132b32000-2b2132b34000 rw-p 2b2132b32000 00:00 0 2b2132b34000-2b2132bb4000 r-xp 00000000 08:02 30271 /lib/libm-2.4.so 2b2132bb4000-2b2132cb3000 ---p 00080000 08:02 30271 /lib/libm-2.4.so 2b2132cb3000-2b2132cb5000 rw-p 0007f000 08:02 30271 /lib/libm-2.4.so 2b2132cb5000-2b2132deb000 r-xp 00000000 08:02 21053 /lib/libc-2.4.so 2b2132deb000-2b2132eeb000 ---p 00136000 08:02 21053 /lib/libc-2.4.so 2b2132eeb000-2b2132eee000 r--p 00136000 08:02 21053 /lib/libc-2.4.so 2b2132eee000-2b2132ef0000 rw-p 00139000 08:02 21053 /lib/libc-2.4.so 2b2132ef0000-2b2132ef7000 rw-p 2b2132ef0000 00:00 0 2b2132ef7000-2b2132f01000 r-xp 00000000 08:02 81267 /lib/libnss_files-2.4.so 2b2132f01000-2b2133000000 ---p 0000a000 08:02 81267 /lib/libnss_files-2.4.so 2b2133000000-2b2133002000 rw-p 00009000 08:02 81267 /lib/libnss_files-2.4.so 2b2133002000-2b2133006000 r-xp 00000000 08:02 81258 /lib/libnss_dns-2.4.so 2b2133006000-2b2133106000 ---p 00004000 08:02 81258 /lib/libnss_dns-2.4.so 2b2133106000-2b2133108000 rw-p 00004000 08:02 81258 /lib/libnss_dns-2.4.so 2b2133200000-2b2133221000 rw-p 2b2133200000 00:00 0 2b2133221000-2b2133300000 ---p 2b2133221000 00:00 0 2b2133300000-2b213330d000 r-xp 00000000 08:02 5424 /lib/libgcc_s.so.1 2b213330d000-2b213340c000 ---p 0000d000 08:02 5424 /lib/libgcc_s.so.1 2b213340c000-2b213340d000 rw-p 0000c000 08:02 5424 /lib/libgcc_s.so.1 7fff782a9000-7fff782bf000 rw-p 7fff782a9000 00:00 0 [stack] ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0 [vdso] Program received signal SIGABRT, Aborted. 0x00002b2132ce547b in raise () from /lib/libc.so.6 (gdb) bt #0 0x00002b2132ce547b in raise () from /lib/libc.so.6 #1 0x00002b2132ce6da0 in abort () from /lib/libc.so.6 #2 0x00002b2132d1c53b in __fsetlocking () from /lib/libc.so.6 #3 0x00002b2132d251ed in valloc () from /lib/libc.so.6 #4 0x00002b2132d25bfc in realloc () from /lib/libc.so.6 #5 0x0000000000401ba6 in jitter_request (host=, status=0x7fff782bb658) at check_ntp.c:543 #6 0x0000000000402d46 in main (argc=, argv=) at check_ntp.c:748 (gdb) From noreply at sourceforge.net Thu Mar 29 16:24:54 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 29 Mar 2007 07:24:54 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1690690 ] check_mysql gets segmentation fault when -H is omitted Message-ID: Bugs item #1690690, was opened at 2007-03-29 16:24 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1690690&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Argument proccessing Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Felix Frank (illtiz) Assigned to: Nobody/Anonymous (nobody) Summary: check_mysql gets segmentation fault when -H is omitted Initial Comment: I will paste the most simple patch i could think of. It seem valid to mem, judging from the way process_arguments handles db_host. *** check_mysql.c.orig Thu Mar 29 16:16:35 2007 --- check_mysql.c Thu Mar 29 16:20:27 2007 *************** *** 52,58 **** #include char *db_user = NULL; ! char *db_host = NULL; char *db_pass = NULL; char *db = NULL; unsigned int db_port = MYSQL_PORT; --- 52,58 ---- #include char *db_user = NULL; ! char *db_host = ""; char *db_pass = NULL; char *db = NULL; unsigned int db_port = MYSQL_PORT; Hope this makes sense. Best regards, Felix ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1690690&group_id=29880 From noreply at sourceforge.net Thu Mar 29 16:35:26 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 29 Mar 2007 07:35:26 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1690690 ] check_mysql gets segmentation fault when -H is omitted Message-ID: Bugs item #1690690, was opened at 2007-03-29 16:24 Message generated for change (Settings changed) made by illtiz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1690690&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Argument proccessing Group: None >Status: Deleted Resolution: None Priority: 5 Private: No Submitted By: Felix Frank (illtiz) Assigned to: Nobody/Anonymous (nobody) Summary: check_mysql gets segmentation fault when -H is omitted Initial Comment: I will paste the most simple patch i could think of. It seem valid to mem, judging from the way process_arguments handles db_host. *** check_mysql.c.orig Thu Mar 29 16:16:35 2007 --- check_mysql.c Thu Mar 29 16:20:27 2007 *************** *** 52,58 **** #include char *db_user = NULL; ! char *db_host = NULL; char *db_pass = NULL; char *db = NULL; unsigned int db_port = MYSQL_PORT; --- 52,58 ---- #include char *db_user = NULL; ! char *db_host = ""; char *db_pass = NULL; char *db = NULL; unsigned int db_port = MYSQL_PORT; Hope this makes sense. Best regards, Felix ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1690690&group_id=29880 From noreply at sourceforge.net Thu Mar 29 16:36:31 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 29 Mar 2007 07:36:31 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1690697 ] check_mysql gets segmentation fault when -H is omitted Message-ID: Patches item #1690697, was opened at 2007-03-29 16:36 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1690697&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bugfix Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Felix Frank (illtiz) Assigned to: Nobody/Anonymous (nobody) Summary: check_mysql gets segmentation fault when -H is omitted Initial Comment: I will paste the most simple patch i could think of. It seem valid to mem, judging from the way process_arguments handles db_host. *** check_mysql.c.orig Thu Mar 29 16:16:35 2007 --- check_mysql.c Thu Mar 29 16:20:27 2007 *************** *** 52,58 **** #include char *db_user = NULL; ! char *db_host = NULL; char *db_pass = NULL; char *db = NULL; unsigned int db_port = MYSQL_PORT; --- 52,58 ---- #include char *db_user = NULL; ! char *db_host = ""; char *db_pass = NULL; char *db = NULL; unsigned int db_port = MYSQL_PORT; Hope this makes sense. Best regards, Felix PS.sorry for posting this as a bug at first ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1690697&group_id=29880 From noreply at sourceforge.net Thu Mar 29 19:59:24 2007 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 29 Mar 2007 10:59:24 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1690697 ] check_mysql gets segmentation fault when -H is omitted Message-ID: Patches item #1690697, was opened at 2007-03-29 16:36 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1690697&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bugfix Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Felix Frank (illtiz) Assigned to: Nobody/Anonymous (nobody) Summary: check_mysql gets segmentation fault when -H is omitted Initial Comment: I will paste the most simple patch i could think of. It seem valid to mem, judging from the way process_arguments handles db_host. *** check_mysql.c.orig Thu Mar 29 16:16:35 2007 --- check_mysql.c Thu Mar 29 16:20:27 2007 *************** *** 52,58 **** #include char *db_user = NULL; ! char *db_host = NULL; char *db_pass = NULL; char *db = NULL; unsigned int db_port = MYSQL_PORT; --- 52,58 ---- #include char *db_user = NULL; ! char *db_host = ""; char *db_pass = NULL; char *db = NULL; unsigned int db_port = MYSQL_PORT; Hope this makes sense. Best regards, Felix PS.sorry for posting this as a bug at first ---------------------------------------------------------------------- >Comment By: Holger Weiss (hweiss) Date: 2007-03-29 19:59 Message: Logged In: YES user_id=759506 Originator: NO This is fixed in CVS. Thank you, Holger ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1690697&group_id=29880 From matthias.eble at mailing.kaufland-informationssysteme.com Fri Mar 30 12:01:57 2007 From: matthias.eble at mailing.kaufland-informationssysteme.com (Matthias Eble) Date: Fri, 30 Mar 2007 12:01:57 +0200 Subject: [Nagiosplug-devel] check_disk -p Device checking /dev Message-ID: <460CE015.9040504@mailing.kaufland-informationssysteme.com> Hi all, while I was testing my feature enhancements for check_disk (which are checked in now), I recognized that -p DEVICE doesn't check the actual device but checks the best match (/dev). I can't imagine a case where this makes sense at the moment. Using -E is a workaround but I think it's not obvious to users since --help prints "-p --path --partition". I would suggest to ignore the exact_match flag for devices. What do you think? matthias ps. I accidently found a forum post on nagios-portal.de where a user had exactly this problem, three days ago. From ton.voon at altinity.com Fri Mar 30 12:50:45 2007 From: ton.voon at altinity.com (Ton Voon) Date: Fri, 30 Mar 2007 11:50:45 +0100 Subject: [Nagiosplug-devel] check_disk -p Device checking /dev In-Reply-To: <460CE015.9040504@mailing.kaufland-informationssysteme.com> References: <460CE015.9040504@mailing.kaufland-informationssysteme.com> Message-ID: <669FA060-D080-4811-A979-3E906FF74170@altinity.com> On 30 Mar 2007, at 11:01, Matthias Eble wrote: > while I was testing my feature enhancements for check_disk (which are > checked in now), I recognized that -p DEVICE doesn't check the actual > device but checks the best match (/dev). I can't imagine a case where > this makes sense at the moment. > > Using -E is a workaround but I think it's not obvious to users since > --help prints "-p --path --partition". I would suggest to ignore the > exact_match flag for devices. > > What do you think? Matthias, Good spot. I have it on the bug list (tracked in my head) that if you do a -p /device, it is not found properly. I think the fix is a new loop first to check if a device name matches before doing the "best match" loop. Do you want to have a go at fixing this bug? I won't be able to for a few weeks. BTW, I've just found a problem with the mysql configure routines which will fail on some mysql installations. Your check_disk enhancements, with Holger's perms fix for the root plugins and the mysql configure change probably warrants a new release. Let me know if you are going to work on the check_disk -p device problem and we can hold off for your fix. Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon From matthias.eble at mailing.kaufland-informationssysteme.com Fri Mar 30 14:07:10 2007 From: matthias.eble at mailing.kaufland-informationssysteme.com (Matthias Eble) Date: Fri, 30 Mar 2007 14:07:10 +0200 Subject: [Nagiosplug-devel] check_disk -p Device checking /dev In-Reply-To: <669FA060-D080-4811-A979-3E906FF74170@altinity.com> References: <460CE015.9040504@mailing.kaufland-informationssysteme.com> <669FA060-D080-4811-A979-3E906FF74170@altinity.com> Message-ID: <460CFD6E.90601@mailing.kaufland-informationssysteme.com> > > Do you want to have a go at fixing this bug? I won't be able to for a > few weeks. sure. > BTW, I've just found a problem with the mysql configure routines > which will fail on some mysql installations. Your check_disk > enhancements, with Holger's perms fix for the root plugins and the > mysql configure change probably warrants a new release. Let me know > if you are going to work on the check_disk -p device problem and we > can hold off for your fix. I think I can do it this weekend.. btw.. i was pretty surprised about the release yesterday.. Could you make an anouncement for new releases, at least on np-team, in the future? So everybody will be able to merge their working copies.. matthias From ton.voon at altinity.com Fri Mar 30 14:20:24 2007 From: ton.voon at altinity.com (Ton Voon) Date: Fri, 30 Mar 2007 13:20:24 +0100 Subject: [Nagiosplug-devel] check_disk -p Device checking /dev In-Reply-To: <460CFD6E.90601@mailing.kaufland-informationssysteme.com> References: <460CE015.9040504@mailing.kaufland-informationssysteme.com> <669FA060-D080-4811-A979-3E906FF74170@altinity.com> <460CFD6E.90601@mailing.kaufland-informationssysteme.com> Message-ID: <6CCBB5A4-AEE1-45ED-A4D8-95A8E736DBCB@altinity.com> On 30 Mar 2007, at 13:07, Matthias Eble wrote: > btw.. i was pretty surprised about the release yesterday.. Could you > make an anouncement for new releases, at least on np-team, in the > future? So everybody will be able to merge their working copies.. That's a fair point. I tend to add into emails as a BTW, but I should separate out. I'll try and send an email to nagiosplug-devel with a few days notice. Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon From ton.voon at altinity.com Fri Mar 30 16:17:12 2007 From: ton.voon at altinity.com (Ton Voon) Date: Fri, 30 Mar 2007 15:17:12 +0100 Subject: [Nagiosplug-devel] Flight 1.4.8, ready for boarding Message-ID: <42DF28BE-DBF5-4AC6-A77A-D7DA10FFD0DF@altinity.com> Hi! Unfortunately, I've made the mysqlclient detection too strong in the 1.4.7 release, so I've fixed it now and separated out the mysqlclient detection into an external m4 file. Along with Holger's fix for --without-world-permissions on setuid plugins (thanks, Holger!) and some neat new features from Matthias to check_disk (looks good, Matthias!), I think a 1.4.8 release is in order. Matthias is working on a bug in check_disk. Is there any other work planned before take off? Ton http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon From Thomas at zango.com Fri Mar 30 18:16:33 2007 From: Thomas at zango.com (Thomas Guyot-Sionnest) Date: Fri, 30 Mar 2007 09:16:33 -0700 Subject: [Nagiosplug-devel] Flight 1.4.8, ready for boarding In-Reply-To: <42DF28BE-DBF5-4AC6-A77A-D7DA10FFD0DF@altinity.com> References: <42DF28BE-DBF5-4AC6-A77A-D7DA10FFD0DF@altinity.com> Message-ID: <804160344192334BB21922E8082EA6C07053FF@seaex01.180solutions.com> There's the two bugs with check_ntp. The segfault is caused by the fact that the check program don't get the jitter and so it tests a pointer that doesn't exist. I make a patch that fixes the segfault (Uploaded in the bug tracker) but instead it returns a warning that it can't parse the jitter or something like that. I didn't committed the fix as I wanted someone more knowledgeable to look into why it couldn't get the jitter. The other is a realloc error caught by glibc on my Ubuntu box. I have no idea what's wrong there (It's beyond my skills)... If there's nobody that can look into these issues then I'll at least commit my segfault fix. Thomas > -----Original Message----- > From: nagiosplug-devel-bounces at lists.sourceforge.net > [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On > Behalf Of Ton Voon > Sent: March 30, 2007 10:17 > To: Nagios Plugin Development Mailing List > Subject: [Nagiosplug-devel] Flight 1.4.8, ready for boarding > > Hi! > > Unfortunately, I've made the mysqlclient detection too strong in the > 1.4.7 release, so I've fixed it now and separated out the > mysqlclient > detection into an external m4 file. > > Along with Holger's fix for --without-world-permissions on setuid > plugins (thanks, Holger!) and some neat new features from > Matthias to > check_disk (looks good, Matthias!), I think a 1.4.8 release > is in order. > > Matthias is working on a bug in check_disk. Is there any other work > planned before take off? > > Ton > > http://www.altinity.com > T: +44 (0)870 787 9243 > F: +44 (0)845 280 1725 > Skype: tonvoon > > > > > -------------------------------------------------------------- > ----------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the > chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge > &CID=DEVDEV > _______________________________________________________ > Nagios Plugin Development Mailing List > Nagiosplug-devel at lists.sourceforge.net > Unsubscribe at > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > ::: Please include plugins version (-v) and OS when reporting > any issue. > ::: Messages without supporting info will risk being sent to /dev/null > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3076 bytes Desc: not available URL: From benoit.mortier at opensides.be Fri Mar 30 19:14:21 2007 From: benoit.mortier at opensides.be (Benoit Mortier) Date: Fri, 30 Mar 2007 19:14:21 +0200 Subject: [Nagiosplug-devel] Flight 1.4.8, ready for boarding In-Reply-To: <42DF28BE-DBF5-4AC6-A77A-D7DA10FFD0DF@altinity.com> References: <42DF28BE-DBF5-4AC6-A77A-D7DA10FFD0DF@altinity.com> Message-ID: <200703301914.22747.benoit.mortier@opensides.be> Le Vendredi 30 Mars 2007 16:17, Ton Voon a ?crit?: > Hi! > > Unfortunately, I've made the mysqlclient detection too strong in the > 1.4.7 release, so I've fixed it now and separated out the mysqlclient > detection into an external m4 file. > > Along with Holger's fix for --without-world-permissions on setuid > plugins (thanks, Holger!) and some neat new features from Matthias to > check_disk (looks good, Matthias!), I think a 1.4.8 release is in order. > > Matthias is working on a bug in check_disk. Is there any other work > planned before take off? Hello, i have to put in a fr.po made by thomas will put it in this week-end Cheers -- Benoit Mortier CEO www.opensides.be Contributor to Gosa Project : http://gosa.gonicus.de/ Contributeur to Nagios Plugins : http://nagiosplug.sourceforge.net/ From holger at CIS.FU-Berlin.DE Fri Mar 30 19:16:43 2007 From: holger at CIS.FU-Berlin.DE (Holger Weiss) Date: Fri, 30 Mar 2007 19:16:43 +0200 Subject: [Nagiosplug-devel] Flight 1.4.8, ready for boarding In-Reply-To: <804160344192334BB21922E8082EA6C07053FF@seaex01.180solutions.com> References: <42DF28BE-DBF5-4AC6-A77A-D7DA10FFD0DF@altinity.com> <804160344192334BB21922E8082EA6C07053FF@seaex01.180solutions.com> Message-ID: <20070330171643.GA44795887@CIS.FU-Berlin.DE> * Thomas Guyot-Sionnest [2007-03-30 09:16]: > There's the two bugs with check_ntp. The segfault is caused by the fact that > the check program don't get the jitter and so it tests a pointer that > doesn't exist. I make a patch that fixes the segfault (Uploaded in the bug > tracker) but instead it returns a warning that it can't parse the jitter or > something like that. I didn't committed the fix as I wanted someone more > knowledgeable to look into why it couldn't get the jitter. > > The other is a realloc error caught by glibc on my Ubuntu box. I have no > idea what's wrong there (It's beyond my skills)... I can probably look into it tommorow. Holger -- PGP fingerprint: F1F0 9071 8084 A426 DD59 9839 59D3 F3A1 B8B5 D3DE From amontibello at gmail.com Sat Mar 31 00:42:06 2007 From: amontibello at gmail.com (Anthony Montibello) Date: Fri, 30 Mar 2007 18:42:06 -0400 Subject: [Nagiosplug-devel] Flight 1.4.8, ready for boarding In-Reply-To: <42DF28BE-DBF5-4AC6-A77A-D7DA10FFD0DF@altinity.com> References: <42DF28BE-DBF5-4AC6-A77A-D7DA10FFD0DF@altinity.com> Message-ID: I would like to submit check_nc_net.c to the plugins, I was working on it this week and finally have it to a good enough point. Whats the procedure/best way to submit this, check_nc_net is the check_nt used for NC_Net with all the extended commands and enhancements I added. thanks, Tony On 3/30/07, Ton Voon wrote: > > Hi! > > Unfortunately, I've made the mysqlclient detection too strong in the > 1.4.7 release, so I've fixed it now and separated out the mysqlclient > detection into an external m4 file. > > Along with Holger's fix for --without-world-permissions on setuid > plugins (thanks, Holger!) and some neat new features from Matthias to > check_disk (looks good, Matthias!), I think a 1.4.8 release is in order. > > Matthias is working on a bug in check_disk. Is there any other work > planned before take off? > > Ton > > http://www.altinity.com > T: +44 (0)870 787 9243 > F: +44 (0)845 280 1725 > Skype: tonvoon > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________________ > Nagios Plugin Development Mailing List > Nagiosplug-devel at lists.sourceforge.net > Unsubscribe at > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > ::: Please include plugins version (-v) and OS when reporting any issue. > ::: Messages without supporting info will risk being sent to /dev/null > -------------- next part -------------- An HTML attachment was scrubbed... URL: From holger at CIS.FU-Berlin.DE Sat Mar 31 20:53:29 2007 From: holger at CIS.FU-Berlin.DE (Holger Weiss) Date: Sat, 31 Mar 2007 20:53:29 +0200 Subject: [Nagiosplug-devel] Flight 1.4.8, ready for boarding In-Reply-To: <804160344192334BB21922E8082EA6C07053FF@seaex01.180solutions.com> References: <42DF28BE-DBF5-4AC6-A77A-D7DA10FFD0DF@altinity.com> <804160344192334BB21922E8082EA6C07053FF@seaex01.180solutions.com> Message-ID: <20070331185328.GB44795887@CIS.FU-Berlin.DE> * Thomas Guyot-Sionnest [2007-03-30 09:16]: > There's the two bugs with check_ntp. The segfault is caused by the fact that > the check program don't get the jitter and so it tests a pointer that > doesn't exist. I make a patch that fixes the segfault (Uploaded in the bug > tracker) Your patch should be committed in any case. > but instead it returns a warning that it can't parse the jitter or something > like that. What is the exact message you get? The message "warning: unable to read server jitter response" indicates that the server simply doesn't support jitter control packets. However, with all servers I tried, the plugin returns a WARNING state _without_ explaining the problem: | $ ./check_ntp -H time.fu-berlin.de -j 2 -k 3 | NTP WARNING: Offset 0.05885159969 secs|offset=0.05885159969 jitter=0.001171 This WARNING is issued in jitter_request(): | if(! syncsource_found) *status = STATE_WARNING; I'm not familiar with NTP and haven't tracked down whether the plugin does something wrong while checking for the synchronization source; and if not, whether it should really return a WARNING state here. If so, the reason for the WARNING should certainly be mentioned in the plugin output. For the moment, I committed patch which at least adds a line explaining the WARNING to the verbose output. > The other is a realloc error caught by glibc on my Ubuntu box. I have no > idea what's wrong there (It's beyond my skills)... The memcpy(3) following the realloc(3) call writes out of bounds as soon as peer_offset is >0. I committed the following patch: ---------- 8< ---------------------------------------------------------- --- check_ntp.c 31 Mar 2007 17:35:08 -0000 1.17 +++ check_ntp.c 31 Mar 2007 18:40:46 -0000 @@ -506,6 +506,7 @@ ntp_control_message req; double rval = 0.0, jitter = -1.0; char *startofvalue=NULL, *nptr=NULL; + void *tmp; /* Long-winded explanation: * Getting the jitter requires a number of steps: @@ -539,8 +540,10 @@ * we represent as a ntp_assoc_status_pair datatype. */ npeers+=(ntohs(req.count)/sizeof(ntp_assoc_status_pair)); - peers=(ntp_assoc_status_pair*)realloc(peers, sizeof(ntp_assoc_status_pair)*npeers); - memcpy((void*)((ptrdiff_t)peers+peer_offset), (void*)req.data, sizeof(ntp_assoc_status_pair)*npeers); + if((tmp=realloc(peers, sizeof(ntp_assoc_status_pair)*npeers)) == NULL) + free(peers), die(STATE_UNKNOWN, "can not (re)allocate 'peers' buffer\n"); + peers=tmp; + memcpy((void*)((ptrdiff_t)peers+peer_offset), (void*)req.data, ntohs(req.count)); peer_offset+=ntohs(req.count); } while(req.op&REM_MORE); ---------- 8< ---------------------------------------------------------- Could you test whether this fixes the problem for you? Holger -- PGP fingerprint: F1F0 9071 8084 A426 DD59 9839 59D3 F3A1 B8B5 D3DE