From jsie at quadrix.com Thu Aug 1 09:23:21 2002 From: jsie at quadrix.com (Jackson Sie) Date: Thu Aug 1 09:23:21 2002 Subject: [Nagiosplug-devel] Patch for check_snmp.c In-Reply-To: Message-ID: <002601c23977$02cfcee0$a0c81fac@pikachu> Thanks for the patch Andrew! Definitely useful for our environment (you know debugging info and such...) IMHO, have you thought about providing for this functionality as a command line switch? Jackson Sie Senior Architect Quadrix Solutions, Inc. -----Original Message----- From: nagiosplug-devel-admin at lists.sourceforge.net [mailto:nagiosplug-devel-admin at lists.sourceforge.net] On Behalf Of Mayhew, Andrew Sent: Wednesday, July 31, 2002 5:54 PM To: 'nagiosplug-devel at lists.sourceforge.net' Subject: [Nagiosplug-devel] Patch for check_snmp.c Don't know if anyone else particularly cares, but for our environment we like to get the full response from the SNMP get even if the status is OK. So this patch changes the output behaviour slightly to make it slightly more consistent in this regard. Share and enjoy. --Andrew Mayhew *** check_snmp.c Wed Feb 27 22:42:59 2002 --- check_snmp.c-new Wed Jul 31 14:44:27 2002 *************** *** 220,226 **** p2 = strpbrk (p2, "0123456789"); response_value[i] = strtoul (p2, NULL, 10); iresult = check_num (i); ! show = ssprintf (show, "%d", response_value[i]); } else if (eval_method[i] & CRIT_STRING) { --- 220,227 ---- p2 = strpbrk (p2, "0123456789"); response_value[i] = strtoul (p2, NULL, 10); iresult = check_num (i); ! /* For consistency we want the full SNMP response every time. */ ! show = ssprintf (show, "%s", response); } else if (eval_method[i] & CRIT_STRING) { *************** *** 291,297 **** /* WARNING if output found on stderr */ if (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) result = max (result, STATE_WARNING); - /* close stderr */ (void) fclose (child_stderr); --- 292,297 ---- ------------------------------------------------------- This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today! http://seeker.dice.com/seeker.epl?rel_code=31 _______________________________________________ Nagiosplug-devel mailing list Nagiosplug-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel From amayhew at verisign.com Thu Aug 1 10:11:44 2002 From: amayhew at verisign.com (Mayhew, Andrew) Date: Thu Aug 1 10:11:44 2002 Subject: [Nagiosplug-devel] Patch for check_snmp.c Message-ID: I hadn't really considered making it a command line switch, because in my few it was a consistency issue. By having the snmpget information always in the return, then I can go through and parse out the values to feed into an rrd-based graphing tool to get trending beyond just up-and-down for the service being checked. If I do get around to adding this as a command line argument, I'll probably add that and a switch to ignore stderr output from snmpget, since the current code puts the return in a WARNING state regardless of the get result if snmpget outputs anything to stderr. --Andrew Mayhew > -----Original Message----- > From: Jackson Sie [mailto:jsie at quadrix.com] > Sent: Thursday, August 01, 2002 9:18 AM > To: 'Mayhew, Andrew'; nagiosplug-devel at lists.sourceforge.net > Subject: RE: [Nagiosplug-devel] Patch for check_snmp.c > > > Thanks for the patch Andrew! Definitely useful for our > environment (you > know debugging info and such...) IMHO, have you thought > about providing > for this functionality as a command line switch? > > > Jackson Sie > Senior Architect > Quadrix Solutions, Inc. > > > -----Original Message----- > From: nagiosplug-devel-admin at lists.sourceforge.net > [mailto:nagiosplug-devel-admin at lists.sourceforge.net] On Behalf Of > Mayhew, Andrew > Sent: Wednesday, July 31, 2002 5:54 PM > To: 'nagiosplug-devel at lists.sourceforge.net' > Subject: [Nagiosplug-devel] Patch for check_snmp.c > > > Don't know if anyone else particularly cares, but for our > environment we > like to get the full response from the SNMP get even if the status is > OK. So this patch changes the output behaviour slightly to make it > slightly more consistent in this regard. > > Share and enjoy. > --Andrew Mayhew > > *** check_snmp.c Wed Feb 27 22:42:59 2002 > --- check_snmp.c-new Wed Jul 31 14:44:27 2002 > *************** > *** 220,226 **** > p2 = strpbrk (p2, "0123456789"); > response_value[i] = strtoul (p2, NULL, 10); > iresult = check_num (i); > ! show = ssprintf (show, "%d", > response_value[i]); > } > > else if (eval_method[i] & CRIT_STRING) { > --- 220,227 ---- > p2 = strpbrk (p2, "0123456789"); > response_value[i] = strtoul (p2, NULL, 10); > iresult = check_num (i); > ! /* For consistency we want the full SNMP > response > every time. */ > ! show = ssprintf (show, "%s", response); > } > > else if (eval_method[i] & CRIT_STRING) { > *************** > *** 291,297 **** > /* WARNING if output found on stderr */ > if (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) > result = max (result, STATE_WARNING); > - > /* close stderr */ > (void) fclose (child_stderr); > > --- 292,297 ---- > > > ------------------------------------------------------- > This sf.net email is sponsored by: Dice - The leading online job board > for high-tech professionals. Search and apply for tech jobs today! > http://seeker.dice.com/seeker.epl?rel_code=31 > _______________________________________________ > Nagiosplug-devel mailing list Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > From sghosh at sghosh.org Thu Aug 1 12:08:54 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Thu Aug 1 12:08:54 2002 Subject: [Nagiosplug-devel] Patch for check_snmp.c In-Reply-To: Message-ID: If you do write the command line options - please send a patch against the current CVS.. I updated your patch as well as the that for net-snmp v5 community support. thanks -sg On Thu, 1 Aug 2002, Mayhew, Andrew wrote: > I hadn't really considered making it a command line switch, because in my > few it was a consistency issue. By having the snmpget information always in > the return, then I can go through and parse out the values to feed into an > rrd-based graphing tool to get trending beyond just up-and-down for the > service being checked. > > If I do get around to adding this as a command line argument, I'll probably > add that and a switch to ignore stderr output from snmpget, since the > current code puts the return in a WARNING state regardless of the get result > if snmpget outputs anything to stderr. > > --Andrew Mayhew > > > -----Original Message----- > > From: Jackson Sie [mailto:jsie at quadrix.com] > > Sent: Thursday, August 01, 2002 9:18 AM > > To: 'Mayhew, Andrew'; nagiosplug-devel at lists.sourceforge.net > > Subject: RE: [Nagiosplug-devel] Patch for check_snmp.c > > > > > > Thanks for the patch Andrew! Definitely useful for our > > environment (you > > know debugging info and such...) IMHO, have you thought > > about providing > > for this functionality as a command line switch? > > > > > > Jackson Sie > > Senior Architect > > Quadrix Solutions, Inc. > > > > > > -----Original Message----- > > From: nagiosplug-devel-admin at lists.sourceforge.net > > [mailto:nagiosplug-devel-admin at lists.sourceforge.net] On Behalf Of > > Mayhew, Andrew > > Sent: Wednesday, July 31, 2002 5:54 PM > > To: 'nagiosplug-devel at lists.sourceforge.net' > > Subject: [Nagiosplug-devel] Patch for check_snmp.c > > > > > > Don't know if anyone else particularly cares, but for our > > environment we > > like to get the full response from the SNMP get even if the status is > > OK. So this patch changes the output behaviour slightly to make it > > slightly more consistent in this regard. > > > > Share and enjoy. > > --Andrew Mayhew > > > > *** check_snmp.c Wed Feb 27 22:42:59 2002 > > --- check_snmp.c-new Wed Jul 31 14:44:27 2002 > > *************** > > *** 220,226 **** > > p2 = strpbrk (p2, "0123456789"); > > response_value[i] = strtoul (p2, NULL, 10); > > iresult = check_num (i); > > ! show = ssprintf (show, "%d", > > response_value[i]); > > } > > > > else if (eval_method[i] & CRIT_STRING) { > > --- 220,227 ---- > > p2 = strpbrk (p2, "0123456789"); > > response_value[i] = strtoul (p2, NULL, 10); > > iresult = check_num (i); > > ! /* For consistency we want the full SNMP > > response > > every time. */ > > ! show = ssprintf (show, "%s", response); > > } > > > > else if (eval_method[i] & CRIT_STRING) { > > *************** > > *** 291,297 **** > > /* WARNING if output found on stderr */ > > if (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) > > result = max (result, STATE_WARNING); > > - > > /* close stderr */ > > (void) fclose (child_stderr); > > > > --- 292,297 ---- > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by: Dice - The leading online job board > > for high-tech professionals. Search and apply for tech jobs today! > > http://seeker.dice.com/seeker.epl?rel_code=31 > > _______________________________________________ > > Nagiosplug-devel mailing list Nagiosplug-devel at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > -- From andrew-netsaint at andrew.net.au Sat Aug 3 04:52:01 2002 From: andrew-netsaint at andrew.net.au (Andrew Pollock) Date: Sat Aug 3 04:52:01 2002 Subject: [Nagiosplug-devel] Feature request: check_http follow relative HTTP redirects Message-ID: <200208031150.g73Bopir010744@daedalus.andrew.net.au> Hi, I made a feature request on the SourceForge website and was asked to elaborate on this list, so here I am. I'd like the check_http plugin to be able to handle HTTP redirects that aren't absolute. I'm not sure that they're strictly legal, but they are out there, and there's one particular host that I want to monitor with this plugin that's giving me grief. e.g.: caesar:/usr/local/bin# nc webserver 80 GET / HTTP/1.0 HTTP/1.1 302 Object moved Server: Microsoft-IIS/5.0 Date: Sat, 03 Aug 2002 11:42:33 GMT Location: home/p_home.asp Connection: Keep-Alive Content-Length: 136 Content-Type: text/html Cache-control: private Object moved

Object Moved

This object may be found here. Notice the lack of a leading forwardslash. Using the -f option of check_http to follow the redirect results in a legitimate: HTTP WARNING: HTTP/1.1 400 Bad Request because check_http is doing a GET home/p_home.asp HTTP/1.0 Arguably the redirect itself is being done incorrectly, but the fact is, the two main web browsers can handle it, so I don't see how I'm going to be able to convince the powers that be to rework their website just so my monitoring works properly. So consider this my elaboration on request 577235 Andrew From Ken.Munson at dalsemi.com Wed Aug 7 09:06:02 2002 From: Ken.Munson at dalsemi.com (Ken Munson) Date: Wed Aug 7 09:06:02 2002 Subject: [Nagiosplug-devel] FW: Nagios / Perl oracle monitoring script Message-ID: <1809DA15308DD51180EE00508BCF2194F7E4BD@misnts1.dalsemi.com> > All, > > Hi, My name is Ken Munson and I work for Dallas Semiconductor in Dallas, > TX. I found a perl script for checking the state of Oracle table spaces > in a beta version tarball of some contributed plugins for Nagios. It > looks very good. I had a considerable challenge to get the DBD:Oracle and > DBI modules working with perl on my Redhat 7.3 system. Now that I have > them working I can't quite seem to get the script to run correctly. I am > running it against an Oracle 9i database that's on the same machine as > Nagios - a test database. The script doesn't return any output to the > command line. I have inserted print statements throughout the script (my > perl skills are sadly lacking) and have found that it goes through the > whole script EXCEPT for the block of code that follows: > > while (($tbname, $total, $used, $pct_used) = $sth->fetchrow) > { > $pct_used=int($pct_used); > print STDOUT "size: " . $total . " MB Used:" . int($used) . " MB > (" . int($pct_used) . "%)\n"; > #print "table space $answer\n"; > if ($pct_used > $alertpct) { > if ($pct_used > $critpct) { > $exit_code = 2 > } else { > $exit_code = 1; > } > } else { > $exit_code = 0; > } > } > > > I assume it is not executing this code because the condition of the while > statement is false. My problem is I'm not good enough at troubleshooting > perl to tell why this "while" statement is false. Especially in light of > the interwoven Oracle stuff that's in the script. > > I also moved the following two lines above the "while" command: > > $pct_used=int($pct_used); > print STDOUT "size: " . $total . " MB Used:" . int($used) . " MB (" . > int($pct_used) . "%)\n"; > > and the screen output looks like this: > > size MB Used: 0 MB > > > Any insight you have would be VERY GREATLY appreciated. I don't want to > eat up a bunch of your time but I thought if you knew something I could > try that comes to you quickly....you might enlighten me with it. > > Thnaks very much for you time! > > Ken Munson > 972.371.4779 > ken.munson at dalsemi.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ABostick at mydoconline.com Wed Aug 7 12:59:01 2002 From: ABostick at mydoconline.com (ABostick at mydoconline.com) Date: Wed Aug 7 12:59:01 2002 Subject: [Nagiosplug-devel] FW: Nagios / Perl oracle monitoring script Message-ID: Ken, I use that same script but had to modify it to get it to work. Attached is my modified version. Aaron -----Original Message----- From: Ken Munson [mailto:Ken.Munson at dalsemi.com] Sent: Wednesday, August 07, 2002 11:05 AM To: nagiosplug-devel at lists.sourceforge.net Subject: [Nagiosplug-devel] FW: Nagios / Perl oracle monitoring script All, Hi, My name is Ken Munson and I work for Dallas Semiconductor in Dallas, TX. I found a perl script for checking the state of Oracle table spaces in a beta version tarball of some contributed plugins for Nagios. It looks very good. I had a considerable challenge to get the DBD:Oracle and DBI modules working with perl on my Redhat 7.3 system. Now that I have them working I can't quite seem to get the script to run correctly. I am running it against an Oracle 9i database that's on the same machine as Nagios - a test database. The script doesn't return any output to the command line. I have inserted print statements throughout the script (my perl skills are sadly lacking) and have found that it goes through the whole script EXCEPT for the block of code that follows: while (($tbname, $total, $used, $pct_used) = $sth->fetchrow) { $pct_used=int($pct_used); print STDOUT "size: " . $total . " MB Used:" . int($used) . " MB (" . int($pct_used) . "%)\n"; #print "table space $answer\n"; if ($pct_used > $alertpct) { if ($pct_used > $critpct) { $exit_code = 2 } else { $exit_code = 1; } } else { $exit_code = 0; } } I assume it is not executing this code because the condition of the while statement is false. My problem is I'm not good enough at troubleshooting perl to tell why this "while" statement is false. Especially in light of the interwoven Oracle stuff that's in the script. I also moved the following two lines above the "while" command: $pct_used=int($pct_used); print STDOUT "size: " . $total . " MB Used:" . int($used) . " MB (" . int($pct_used) . "%)\n"; and the screen output looks like this: size MB Used: 0 MB Any insight you have would be VERY GREATLY appreciated. I don't want to eat up a bunch of your time but I thought if you knew something I could try that comes to you quickly....you might enlighten me with it. Thnaks very much for you time! Ken Munson 972.371.4779 ken.munson at dalsemi.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: check_ora_table_space Type: application/octet-stream Size: 2426 bytes Desc: not available URL: From Ken.Munson at dalsemi.com Wed Aug 7 14:27:03 2002 From: Ken.Munson at dalsemi.com (Ken Munson) Date: Wed Aug 7 14:27:03 2002 Subject: FW: [Nagiosplug-devel] FW: Nagios / Perl oracle monitoring script Message-ID: <1809DA15308DD51180EE00508BCF2194F7E4C3@misnts1.dalsemi.com> Aaron, YOU ARE MY HERO! Thank you VERY VERY MUCH for sending this. I had a small problem with my tnsnames.ora file but once I got that squared away it worked!! I really can't thank you enough. I have 50 or more hours in on this. It took me a good bit to get the DBI/DBD stuff working. It is this kind of help that keeps the whole linux/perl/nagios (open source in general) thing going strong. In turn I will help ANYONE I can on the nagios (or any other for that matter) user list. Thank you again! Ken Munson Also thanks to Paul DeLong and Andrew Mayhew for there help. The best thing about all this is no one even hammered me for being "slow" on these concepts which I obviously am. THANKS! -----Original Message----- From: ABostick at mydoconline.com [mailto:ABostick at mydoconline.com] Sent: Wednesday, August 07, 2002 2:57 PM To: Ken.Munson at dalsemi.com; nagiosplug-devel at lists.sourceforge.net Subject: RE: [Nagiosplug-devel] FW: Nagios / Perl oracle monitoring script Ken, I use that same script but had to modify it to get it to work. Attached is my modified version. Aaron -----Original Message----- From: Ken Munson [mailto:Ken.Munson at dalsemi.com] Sent: Wednesday, August 07, 2002 11:05 AM To: nagiosplug-devel at lists.sourceforge.net Subject: [Nagiosplug-devel] FW: Nagios / Perl oracle monitoring script All, Hi, My name is Ken Munson and I work for Dallas Semiconductor in Dallas, TX. I found a perl script for checking the state of Oracle table spaces in a beta version tarball of some contributed plugins for Nagios. It looks very good. I had a considerable challenge to get the DBD:Oracle and DBI modules working with perl on my Redhat 7.3 system. Now that I have them working I can't quite seem to get the script to run correctly. I am running it against an Oracle 9i database that's on the same machine as Nagios - a test database. The script doesn't return any output to the command line. I have inserted print statements throughout the script (my perl skills are sadly lacking) and have found that it goes through the whole script EXCEPT for the block of code that follows: while (($tbname, $total, $used, $pct_used) = $sth->fetchrow) { $pct_used=int($pct_used); print STDOUT "size: " . $total . " MB Used:" . int($used) . " MB (" . int($pct_used) . "%)\n"; #print "table space $answer\n"; if ($pct_used > $alertpct) { if ($pct_used > $critpct) { $exit_code = 2 } else { $exit_code = 1; } } else { $exit_code = 0; } } I assume it is not executing this code because the condition of the while statement is false. My problem is I'm not good enough at troubleshooting perl to tell why this "while" statement is false. Especially in light of the interwoven Oracle stuff that's in the script. I also moved the following two lines above the "while" command: $pct_used=int($pct_used); print STDOUT "size: " . $total . " MB Used:" . int($used) . " MB (" . int($pct_used) . "%)\n"; and the screen output looks like this: size MB Used: 0 MB Any insight you have would be VERY GREATLY appreciated. I don't want to eat up a bunch of your time but I thought if you knew something I could try that comes to you quickly....you might enlighten me with it. Thnaks very much for you time! Ken Munson 972.371.4779 ken.munson at dalsemi.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsellens at generalconcepts.com Tue Aug 13 12:18:11 2002 From: jsellens at generalconcepts.com (John Sellens) Date: Tue Aug 13 12:18:11 2002 Subject: [Nagiosplug-devel] file time problem in nagiosplug-1.3-beta1 (with fix/workaround) Message-ID: <200208131917.g7DJHUI18088@gc0.generalconcepts.com> I was trying to build nagiosplug-1.3-beta1 and ran into some unexpected automake complaints: % make cd . && /usr/local/bin/aclocal cd . && /usr/local/bin/automake --gnu Makefile automake: configure.in: `AM_INIT_AUTOMAKE' must be used automake: your implementation of AM_INIT_AUTOMAKE comes from an automake: old Automake version. You should recreate aclocal.m4 automake: with aclocal and run automake again. make: *** [Makefile.in] Error 1 This is because this machine happens to have a current-ish version of aclocal/automake/autoconf, rather than automake 1.4 or so that's required. This problem should not normally happen, because someone building a package should not normally need to run automake/autoconf/aclocal. The root of the problem is that some files in the nagiosplug-1.3-beta1 distribution have not quite the right timestamps, which cause the Makefile to attempt to rebuild them, which in turn requires the correct version of automake etc. These are the timestamps from the distribution: % ls -lgrt aclo* Ma* configure.in configure -rw-r--r-- 1 jsellens 1415 Feb 28 01:42 aclocal.m4 -rw-r--r-- 1 jsellens 266 Feb 28 01:42 Makefile.am -rw-r--r-- 1 jsellens 33842 Jun 12 23:03 configure.in -rwxr-xr-x 1 jsellens 175475 Jun 13 10:02 configure -rw-r--r-- 1 jsellens 12119 Jun 13 10:02 Makefile.in They should actually be in this order (oldest to newest): Makefile.am configure.in aclocal.m4 Makefile.in configure In building the distribution tar file, I think that if one either does make; make dist or make; make distclean cd ..; tar czf nagiosplug-1.3-beta1.tar.gz ./nagiosplug-1.3-beta1 then I think the "right thing" happens. Curiously though, following a "make distclean", the Makefiles run "autoheader" a number of times. So perhaps "make; make dist" is the way to go. A workaround way to build: gunzip < nagiosplug-1.3-beta1.tar.gz | tar xf - cd nagiosplug-1.3-beta1 touch aclocal.m4; sleep 1 touch Makefile.in; sleep 1 touch configure; sleep 1 ./configure [g]make Hope this helps - cheers! John jsellens at generalconcepts.com From Nicky.Ayoub at Microchip.com Wed Aug 14 08:08:02 2002 From: Nicky.Ayoub at Microchip.com (Nicky.Ayoub at Microchip.com) Date: Wed Aug 14 08:08:02 2002 Subject: [Nagiosplug-devel] check_disk_smb and administrative shares. Message-ID: Hello, I made a simple modification fro check_disk_smb to allow testing administrative shares. Basically, I added an optional '$' at the end of the pattern match for opt_s. Since I am new to nagios and it's plugins, I was wondering if anyone can explain any detrimental ramifications due to this change (other than possibly exposing an administrative logon). Thanks, Nicky *** check_disk_smb2.pl Wed Aug 14 07:36:49 2002 --- check_disk_smb.pl Sun May 26 18:55:41 2002 *************** *** 66,72 **** ($host) || usage("Invalid host: $opt_H\n"); ($opt_s) || ($opt_s = shift) || usage("Share volume not specified\n"); ! my $share = $1 if ($opt_s =~ /([-_.A-Za-z0-9]+\$?)/); ($share) || usage("Invalid share: $opt_s\n"); ($opt_u) || ($opt_u = shift) || ($opt_u = "guest"); --- 66,72 ---- ($host) || usage("Invalid host: $opt_H\n"); ($opt_s) || ($opt_s = shift) || usage("Share volume not specified\n"); ! my $share = $1 if ($opt_s =~ /([-_.A-Za-z0-9]+)/); ($share) || usage("Invalid share: $opt_s\n"); ($opt_u) || ($opt_u = shift) || ($opt_u = "guest"); -- Nick Ayoub Nicky.Ayoub at Microchip.Com, Nicky.Ayoub.Pager at Microchip.Com Marcom - IDE Systems, TEL 480-792-7275, FAX 480-792-4150 Microchip Technology, 2355 W. Chandler Blvd., Chandler AZ 85224-6199 http://www.microchip.com From sghosh at sghosh.org Wed Aug 14 08:24:02 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Wed Aug 14 08:24:02 2002 Subject: [Nagiosplug-devel] check_disk_smb and administrative shares. In-Reply-To: Message-ID: Thanks - will include it.. -sg On Wed, 14 Aug 2002 Nicky.Ayoub at Microchip.com wrote: > Hello, > > I made a simple modification fro check_disk_smb to allow testing > administrative shares. Basically, > I added an optional '$' at the end of the pattern match for opt_s. Since I > am new to nagios and it's > plugins, I was wondering if anyone can explain any detrimental > ramifications due to this change > (other than possibly exposing an administrative logon). > > Thanks, > Nicky > > *** check_disk_smb2.pl Wed Aug 14 07:36:49 2002 > --- check_disk_smb.pl Sun May 26 18:55:41 2002 > *************** > *** 66,72 **** > ($host) || usage("Invalid host: $opt_H\n"); > > ($opt_s) || ($opt_s = shift) || usage("Share volume not specified\n"); > ! my $share = $1 if ($opt_s =~ /([-_.A-Za-z0-9]+\$?)/); > ($share) || usage("Invalid share: $opt_s\n"); > > ($opt_u) || ($opt_u = shift) || ($opt_u = "guest"); > --- 66,72 ---- > ($host) || usage("Invalid host: $opt_H\n"); > > ($opt_s) || ($opt_s = shift) || usage("Share volume not specified\n"); > ! my $share = $1 if ($opt_s =~ /([-_.A-Za-z0-9]+)/); > ($share) || usage("Invalid share: $opt_s\n"); > > ($opt_u) || ($opt_u = shift) || ($opt_u = "guest"); > > > -- > Nick Ayoub > Nicky.Ayoub at Microchip.Com, Nicky.Ayoub.Pager at Microchip.Com > Marcom - IDE Systems, TEL 480-792-7275, FAX 480-792-4150 > Microchip Technology, 2355 W. Chandler Blvd., Chandler AZ 85224-6199 > http://www.microchip.com > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: Dice - The leading online job board > for high-tech professionals. Search and apply for tech jobs today! > http://seeker.dice.com/seeker.epl?rel_code=31 > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > -- From freddy.frouin at fluxus.net Mon Aug 19 06:07:05 2002 From: freddy.frouin at fluxus.net (Freddy Frouin) Date: Mon Aug 19 06:07:05 2002 Subject: [Nagiosplug-devel] Storing & Ploting Applications Performances over time thanks to Nagios Message-ID: <20020819150601.54380364.freddy.frouin@fluxus.net> Hi, Does some nagios plugin developer want to upgrade the tcp plugin library to make it able to return as performances datas: - DNS resolution time (if host name has been supplied instead of the IP address) - Time to the connection to be accept by the remote host - Time to get the first bytes - Time to get all the datas - Time to what you want at all... There's no limit, it will just be a usefull feature to store application performances, to plot it, etc. Does this concept interrest some poeple ? Thanks, Freddy. -- Freddy Frouin Responsable Supervision Fluxus - British Telecom 30, rue du Ch?teau des Rentiers 75013 Paris T?l: +33 (0)1 44 97 70 00 Fax: +33 (0)1 44 97 70 07 From mbailey at empoweredsystems.com Wed Aug 21 04:02:02 2002 From: mbailey at empoweredsystems.com (Michael Bailey) Date: Wed Aug 21 04:02:02 2002 Subject: [Nagiosplug-devel] check_radius question Message-ID: <20020821110104.I1838@empoweredsystems.com> Hello, I am wondering what the config file required by the check_radius plugin is. The built in help doesn't explain it and I couldn't find any documentation that referred to it. Any suggestions? thanks, Mike From jan.david.jd at belgium.agfa.com Thu Aug 22 05:47:02 2002 From: jan.david.jd at belgium.agfa.com (Jan David) Date: Thu Aug 22 05:47:02 2002 Subject: [Nagiosplug-devel] Bug in MACRO passing to event handlers ? Message-ID: Hi, I've been working on a bunch of Oracle plugins and eventhandlers and came across a bug which I'd like to share with all of you. I've checked the FAQ and other resources and didn't find anything - so I believe it is relevant. First off all, I'm still using Netsaint 0.0.7 for my production environment, but the problem very likely persists in Nagios aswell. Maybe someone would care to check this ? Here it is: If you have defined a service with a name that has spaces in it, then the $SERVICEDESC$ macro will not get passed through correctly to an event handler. Example: -------------- Suppose we have the following line in hosts.cfg: service[unix-machine]=ORA FREESPACE;0;24x7;1;60;30;oracle-admins;240;24x7;1;1;0;event-oracle-freespace;check-oracle-freespace and the following line in commands.cfg command[event-oracle-freespace]=$USER2$/event_oracle_freespace $SERVICESTATE$ $STATETYPE$ $SERVICEATTEMPT$ $HOSTNAME$ $SERVICEDESC$ When the service check is performed and a state change occurs, the event handler is executed. As you can see from the line above, it expects 5 arguments. One of them is the service description $SERVICEDESC$ which is derived from the definition in the service line. The macro $SERVICEDESC$ should pass the value 'ORA FREESPACE' to the eventhandler, but in reality only 'ORA' is passed on. This causes some problems because I want to automatically log a comment to the comments file using the ADD_SVC_COMMENT external command. This extranal command requires the 'correct' service description in order to work. I solved the problem by not using whitespace in service descriptions. Either this is a bug OR is should be mentioned in the documentation that one is not allowed to use whitespace in service descriptions. Regards, J. David From sghosh at sghosh.org Thu Aug 22 10:30:04 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Thu Aug 22 10:30:04 2002 Subject: [Nagiosplug-devel] Bug in MACRO passing to event handlers ? In-Reply-To: Message-ID: The macros are expanded by Nagios - not the plugins. But I think the space issue still exist. -sg On Thu, 22 Aug 2002, Jan David wrote: > Hi, > > I've been working on a bunch of Oracle plugins and eventhandlers and came > across a bug which I'd like to share with all of you. I've checked the FAQ > and other resources and didn't find anything - so I believe it is relevant. > > First off all, I'm still using Netsaint 0.0.7 for my production > environment, but the problem very likely persists in Nagios aswell. Maybe > someone would care to check this ? > > Here it is: > > If you have defined a service with a name that has spaces in it, then the > $SERVICEDESC$ macro will not get passed through correctly to an event > handler. > > Example: > -------------- > > Suppose we have the following line in hosts.cfg: > > service[unix-machine]=ORA FREESPACE;0;24x7;1;60;30;oracle-admins;240;24x7;1;1;0;event-oracle-freespace;check-oracle-freespace > > and the following line in commands.cfg > > command[event-oracle-freespace]=$USER2$/event_oracle_freespace $SERVICESTATE$ $STATETYPE$ $SERVICEATTEMPT$ $HOSTNAME$ $SERVICEDESC$ > > When the service check is performed and a state change occurs, the event handler is executed. As you can see from the line above, it expects 5 > arguments. One of them > is the service description $SERVICEDESC$ which is derived from the definition in the service line. > > The macro $SERVICEDESC$ should pass the value 'ORA FREESPACE' to the eventhandler, but in reality only 'ORA' is passed on. This causes some problems > because I > want to automatically log a comment to the comments file using the ADD_SVC_COMMENT external command. This extranal command requires the 'correct' > service description > in order to work. > > I solved the problem by not using whitespace in service descriptions. > > Either this is a bug OR is should be mentioned in the documentation that one is not allowed to use whitespace in service descriptions. > > Regards, > > J. David > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > -- From jsellens at generalconcepts.com Thu Aug 22 13:11:06 2002 From: jsellens at generalconcepts.com (John Sellens) Date: Thu Aug 22 13:11:06 2002 Subject: [Nagiosplug-devel] Bug in MACRO passing to event handlers ? Message-ID: <200208222010.g7MKAU248442@gc0.generalconcepts.com> | The macros are expanded by Nagios - not the plugins. But I think the | space issue still exist. I haven't stared hard at the code, but I think it expands macros in a string, and then passes the string to popen (and hence the shell). Try quoting the argument in the command definition e.g. command[event-oracle-freespace]=$USER2$/event_oracle_freespace $SERVICESTATE$ $STATETYPE$ $SERVICEATTEMPT$ $HOSTNAME$ "$SERVICEDESC$" My simple-minded test suggested that that would likely work. You might be able to quote it it the service definition, but then the displayed information and notices would also include the quotes, which would likely be ugly. If it was just an ARG to the command (i.e. in the exclamation mark separated list) then you could likely also quote it there. (It could perhaps be useful for nagios to do argument expansion into an array of strings, and then use one of the exec(3) family of functions to invoke the plugin, but that's much more complicated than popen(), and you might someday want to have the shell do wildcarding, or redirection or pipes or something.) Cheers John jsellens at generalconcepts.com | > If you have defined a service with a name that has spaces in it, then the | > $SERVICEDESC$ macro will not get passed through correctly to an event | > handler. | > | > Example: | > -------------- | > | > Suppose we have the following line in hosts.cfg: | > | > service[unix-machine]=ORA FREESPACE;0;24x7;1;60;30;oracle-admins;240;24x7;1;1;0;event-oracle-freespace;check-oracle-freespace | > | > and the following line in commands.cfg | > | > command[event-oracle-freespace]=$USER2$/event_oracle_freespace $SERVICESTATE$ $STATETYPE$ $SERVICEATTEMPT$ $HOSTNAME$ $SERVICEDESC$ | > | > When the service check is performed and a state change occurs, the event handler is executed. As you can see from the line above, it expects 5 | > arguments. One of them | > is the service description $SERVICEDESC$ which is derived from the definition in the service line. | > | > The macro $SERVICEDESC$ should pass the value 'ORA FREESPACE' to the eventhandler, but in reality only 'ORA' is passed on. This causes some problems | > because I | > want to automatically log a comment to the comments file using the ADD_SVC_COMMENT external command. This extranal command requires the 'correct' | > service description | > in order to work. | > | > I solved the problem by not using whitespace in service descriptions. | > | > Either this is a bug OR is should be mentioned in the documentation that one is not allowed to use whitespace in service descriptions. | > | > Regards, | > | > J. David