From sghosh at sghosh.org Thu May 2 10:23:18 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Thu May 2 10:23:18 2002 Subject: [Nagiosplug-devel] Re: [Nagiosplug-checkins] CVS: nagiosplug/plugins-scripts check_breeze.pl,1.1.1.1,1.2 check_disk_smb.pl,1.1.1.1,1.2 check_flexlm.pl,1.1.1.1,1.2 check_ircd.pl,1.1.1.1,1.2 check_netdns.pl,1.1.1.1,1.2 check_ In-Reply-To: Message-ID: Hi Douglas.. I just patched all the perl scripts in the plugins-scripts directory.. After I submitted the fix to CVS, I noted that Perl complains about the -T switch for all scripts that have "use utils qw(...)" possibly because $FindBin::Bin is being considered tainted I could untaint by using /(.*)/ or come up with a better regex for the directory path... Any feedback on a better regex appreciated.. -sg From R.Brodie at rl.ac.uk Tue May 7 10:47:04 2002 From: R.Brodie at rl.ac.uk (Brodie, R (Richard) ) Date: Tue May 7 10:47:04 2002 Subject: [Nagiosplug-devel] Yet another PING output format Message-ID: <37CAC51AC5C1D211966100A0C9ED000AF82BC5@exchange07.rl.ac.uk> PING on Suse 8.0 has an output summary containing: 2 packets transmitted, 2 received, 0% loss, time 1011ms rtt min/avg/max/mdev = 0.170/0.703/1.236/0.533 ms i.e. as per the latest Redhat patch minus the second "packets". I can provide/verify a patch (for check_ping.c) if helpful. Regards, Richard Brodie. From sghosh at sghosh.org Tue May 7 11:39:02 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Tue May 7 11:39:02 2002 Subject: [Nagiosplug-devel] Yet another PING output format In-Reply-To: <37CAC51AC5C1D211966100A0C9ED000AF82BC5@exchange07.rl.ac.uk> Message-ID: Can you check the CVS version for check_ping. A patch was submitted a couple of weeks ago for "rtt" based on the RedHat 7.2.93 beta.. -sg On Tue, 7 May 2002, Brodie, R (Richard) wrote: > PING on Suse 8.0 has an output summary containing: > > 2 packets transmitted, 2 received, 0% loss, time 1011ms > rtt min/avg/max/mdev = 0.170/0.703/1.236/0.533 ms > > i.e. as per the latest Redhat patch minus the second "packets". > I can provide/verify a patch (for check_ping.c) if helpful. > > Regards, > Richard Brodie. > > _______________________________________________________________ > > Have big pipes? SourceForge.net is looking for download mirrors. We supply > the hardware. You get the recognition. Email Us: bandwidth at sourceforge.net > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > From R.Brodie at rl.ac.uk Wed May 8 03:24:02 2002 From: R.Brodie at rl.ac.uk (Brodie, R (Richard) ) Date: Wed May 8 03:24:02 2002 Subject: [Nagiosplug-devel] Yet another PING output format Message-ID: <37CAC51AC5C1D211966100A0C9ED000AF82BC7@exchange07.rl.ac.uk> >Can you check the CVS version for check_ping. A patch was submitted a >couple of weeks ago for "rtt" based on the RedHat 7.2.93 beta.. Yes. I'm actually using netsaint with the netsaint plugins at present but checked out the latest nagios check_ping plugin to test. The rtt part is fine but the % loss has a gratuitously different format: Suse 8.0: "%*d packets transmitted, %*d received, %d%% loss, time" RH: "%*d packets transmitted, %*d packets received, %d%% loss, time" From sghosh at sghosh.org Wed May 8 09:12:46 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Wed May 8 09:12:46 2002 Subject: [Nagiosplug-devel] Yet another PING output format In-Reply-To: <37CAC51AC5C1D211966100A0C9ED000AF82BC7@exchange07.rl.ac.uk> Message-ID: On Wed, 8 May 2002, Brodie, R (Richard) wrote: > >Can you check the CVS version for check_ping. A patch was submitted a > >couple of weeks ago for "rtt" based on the RedHat 7.2.93 beta.. > > Yes. I'm actually using netsaint with the netsaint plugins at present > but checked out the latest nagios check_ping plugin to test. The rtt > part is fine but the % loss has a gratuitously different format: > > Suse 8.0: > "%*d packets transmitted, %*d received, %d%% loss, time" > > RH: > "%*d packets transmitted, %*d packets received, %d%% loss, time" > Thanks Richard. CVS has been updated. -sg From sghosh at sghosh.org Thu May 9 09:10:03 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Thu May 9 09:10:03 2002 Subject: [Nagiosplug-devel] check_ifstatus is now a standard plugin Message-ID: For those following the nagiosplug CVS tree check_ifstatus has been upgraded to a standard plugin and can be found in plugin-scripts directory. The upgrade has required changes in the options that the plugin takes to conform to the plugin guidelines.. (no positional arguments in particular) Also removed was a Cisco specific OID to allow for more general use. Below is the help output: [sghosh at calcutta plugins-scripts]$ ./check_ifstatus -h check_ifstatus plugin for Nagios monitors operational status of each network interface on the target host Usage: -H (--hostname) Hostname to query - (required) -C (--community) SNMP read community (defaults to public, used with SNMP v1 and v2c -v (--snmp_version) 1 for SNMP v1 (default) 2 for SNMP v2c SNMP v2c will use get_bulk for less overhead -p (--port) SNMP port (default 161) -I (--ifmib) Agent supports IFMIB ifXTable. Do not use if you don't know what this is. -V (--version) Plugin version -h (--help) usage help check_ifstatus (nagios-plugins 1.3.0-alpha1) 1.1 The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute copies of the plugins under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. -sg From sghosh at sghosh.org Thu May 9 21:04:02 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Thu May 9 21:04:02 2002 Subject: [Nagiosplug-devel] check_rpc update Message-ID: CVS: Check_rpc has been updated to support ePN. (prognum was converted to a hash, not BEGIN block, etc) Also included is the suggestion from Stijn to support program version (specially needed for NFS). Please report bugs to list. -subhendu **** Usage: check_rpc -H host -C rpc_command [-p port] [-c program_version] [-u|-t] [-v] check_rpc [-h | --help] check_rpc [-V | --version] The server providing the rpc service The program name (or number). The version you want to check for (one or more) Should prevent checks of unknown versions being syslogged e.g. 2,3,6 to check v2, v3, and v6 [-u | -t] Test UDP or TCP [-v] Verbose [-v -v] Verbose - will print supported programs and numbers From sghosh at sghosh.org Thu May 9 21:06:02 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Thu May 9 21:06:02 2002 Subject: [Nagiosplug-devel] configure checks Message-ID: A few people have commented on the need to updated configure to support newer autoconf. If anybody has any specifics please post. I have added a number of checks to configure and could use help upgrading it if I have help/it is neccessary. -sg From ABostick at mydoconline.com Wed May 22 11:24:06 2002 From: ABostick at mydoconline.com (ABostick at mydoconline.com) Date: Wed May 22 11:24:06 2002 Subject: [Nagiosplug-devel] Submitting new plugins Message-ID: I have written a couple plugins that I would like to submit to the CVS... Are there any quick and dirty instructions on how to do this? Thanks, Aaron Bostick From sghosh at sghosh.org Wed May 22 15:34:03 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Wed May 22 15:34:03 2002 Subject: [Nagiosplug-devel] Submitting new plugins In-Reply-To: Message-ID: On Wed, 22 May 2002 ABostick at mydoconline.com wrote: > I have written a couple plugins that I would like to submit to the CVS... > Are there any quick and dirty instructions on how to do this? > Forward them to the list or to me. Please include same command configs and readme if required. -sg From gadams at promisant.com Fri May 24 13:57:04 2002 From: gadams at promisant.com (Adams, Gavin) Date: Fri May 24 13:57:04 2002 Subject: [Nagiosplug-devel] Setting the check_ntp error codes Message-ID: Hi all, $ntpdate_error and $dispersion_error are set to UNKNOWN values (3) prior to any checks from the new utils.pm: my $state = $ERRORS{'UNKNOWN'}; my $ntpdate_error = $ERRORS{'UNKNOWN'}; my $dispersion_error = $ERRORS{'UNKNOWN'}; Followed by the parsing the ntpdate and ntpdc values. Then there is the check to see what $ntpdate_error should be set to: # only declare an error if we also get a non-zero return code from ntpdate $ntpdate_error = ($? >> 8) || $ntpdate_error; With $? Being the return code the ntpdate command. For a valid response, $? will bit-shift to 0, hence, short-circuiting and setting $ntpdate_error to 3. This causes the return value checks to fail with "server probably down message". Does it make sense to do the following: while () { print if ($verbose); $msg = $_ unless ($msg); if (/(offset|adjust)\s+([-.\d]+)/i) { $offset = $2; $ntpdate_error = $offset ? $ERRORS{"OK"} : \ $ERRORS{"UNKNOWN"}; # add this line in last; } } This works for valid NTP servers, and returns a warning value if the server isn't available or is not running the NTP service. Regards, --- Gavin Adams Promisant (USA) Inc. O: +1.404.262.7321 M: +1.404.213.5539 From gadams at promisant.com Fri May 24 14:03:05 2002 From: gadams at promisant.com (Adams, Gavin) Date: Fri May 24 14:03:05 2002 Subject: [Nagiosplug-devel] Setting the check_ntp error codes Message-ID: > From: Adams, Gavin > > Hi all, > > while () { > print if ($verbose); > $msg = $_ unless ($msg); > if (/(offset|adjust)\s+([-.\d]+)/i) { > $offset = $2; > $ntpdate_error = $offset ? $ERRORS{"OK"} : \ > $ERRORS{"UNKNOWN"}; # add this line in ^^^^^^^ actually, I meant CRITICAL here. Regards, --- Gavin From sghosh at sghosh.org Sun May 26 07:48:02 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Sun May 26 07:48:02 2002 Subject: [Nagiosplug-devel] AIX users - RE: [Nagios-users] Problem with check_procs !!! In-Reply-To: Message-ID: John, other AIX users... Another try - can you see what the output of the following is on AIX.. ps -ao 'state command vsz rss user ppid args' --this command is tested before "ps -el" is called in configure.. -sg From sghosh at sghosh.org Sun May 26 08:16:02 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Sun May 26 08:16:02 2002 Subject: [Nagiosplug-devel] Re: [Netsaintplug-devel] patch for plugins/check_mysql to read pass from environ In-Reply-To: Message-ID: On Sat, 25 May 2002, Catalin Mitrofan wrote: > > hi! i though this might help.. > > > if(strcmp(db_pass,"")==0) { > > char * p123=getenv("MySQL_PASS"); > > if(p123) > > db_pass=p123; > > } > > Hi I was wondering whether this might not be better achieved through the resource.cfg $USER$ macros. They are designed - not to be visible from the cgis.. -sg From sghosh at sghosh.org Thu May 30 12:49:02 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Thu May 30 12:49:02 2002 Subject: [Nagiosplug-devel] Re: [netsaint-devel] 0.0.7 configure problems. In-Reply-To: <20020530185052.GB3203@math.mit.edu> Message-ID: Ethan, others.. On this issue with ping Should we look at only one of the two packages - nagios or the plugins providing check_ping. It does seem a bit redundant to patch both pieces every time. Since ping is a such a basic functionality should we just look at maintaining it with nagios ? -sg On Thu, 30 May 2002, Matthew Walburn wrote: > Hi there, I'm trying to get th new Netsaint working and am running into > problems getting the configure script to run right... it gets this far: > > ./configure --prefix=/opt/netsaint --enable-embedded-perl --with-perlcache > > ... > checking for type of socket size... size_t > checking for mail... /bin/mail > Init script directory: /etc/rc.d/init.d > checking for gdImagePng in -lgd (order 1)... yes > GD library was found! > checking for traceroute... /usr/sbin/traceroute > checking for ping... /bin/ping > > and the it just hangs there. I'm running Redhat 7.3 and near as I can > tell have all the required packages. > > Any suggestions would be very helpful. > > Thanks! > > -Matt > From gnome at netway.at Thu May 30 13:50:04 2002 From: gnome at netway.at (das ErdmAEnnchen) Date: Thu May 30 13:50:04 2002 Subject: [Nagiosplug-devel] Re: [Nagios-devel] Re: [netsaint-devel] 0.0.7 configure problems. References: Message-ID: <3CF69058.DF426B49@netway.at> the output from the ping provided with redhat 7.3: [root at arwen libexec]# ping -c 1 gugu.home PING gugu.home (10.10.2.11) from 10.10.1.6 : 56(84) bytes of data. 64 bytes from gugu.home (10.10.2.11): icmp_seq=1 ttl=255 time=0.595 ms --- gugu.home ping statistics --- 1 packets transmitted, 1 received, 0% loss, time 0ms rtt min/avg/max/mdev = 0.595/0.595/0.595/0.000 ms and here comes a redhat 7.2: [root at cutter root]# ping -c 1 gugu.home PING gugu.home (10.10.2.11) from 10.10.2.4 : 56(84) bytes of data. 64 bytes from gugu.home (10.10.2.11): icmp_seq=0 ttl=255 time=815 usec --- gugu.home ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max/mdev = 0.815/0.815/0.815/0.000 ms differences in the last two lines! when it hangs take a look at your processlist: [root at arwen libexec]# ps ax | grep ping 4394 pts/0 S 0:00 ping 127.0.0.1 -n 1 i encountered this problem when trying to compile netsaint-plugins. i had to edit the configure scripts and the check_ping.c nagios + nagios plugins compile just fine on rh7.3 btw. bye, markus Subhendu Ghosh wrote: > > Ethan, others.. > > On this issue with ping > > Should we look at only one of the two packages - nagios or the plugins > providing check_ping. It does seem a bit redundant to patch both pieces > every time. > > Since ping is a such a basic functionality should we just look at > maintaining it with nagios ? > > -sg > > On Thu, 30 May 2002, Matthew Walburn wrote: > > > Hi there, I'm trying to get th new Netsaint working and am running into > > problems getting the configure script to run right... it gets this far: > > > > ./configure --prefix=/opt/netsaint --enable-embedded-perl --with-perlcache > > > > ... > > checking for type of socket size... size_t > > checking for mail... /bin/mail > > Init script directory: /etc/rc.d/init.d > > checking for gdImagePng in -lgd (order 1)... yes > > GD library was found! > > checking for traceroute... /usr/sbin/traceroute > > checking for ping... /bin/ping > > > > and the it just hangs there. I'm running Redhat 7.3 and near as I can > > tell have all the required packages. > > > > Any suggestions would be very helpful. > > > > Thanks! > > > > -Matt > > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Nagios-devel mailing list > Nagios-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-devel From nagios at nagios.org Thu May 30 19:16:02 2002 From: nagios at nagios.org (Ethan Galstad) Date: Thu May 30 19:16:02 2002 Subject: [Nagiosplug-devel] Re: [netsaint-devel] 0.0.7 configure problems. In-Reply-To: References: <20020530185052.GB3203@math.mit.edu> Message-ID: <3CF696EA.31310.109325B@localhost> Both Nagios and the plugins need to check ping syntax. Nagios needs it for use with the WAP interface. However, due to the ever-changing format of the ping syntax, I'm thinking it might be better to move it out of the Nagios configure script and into an option in the CGI config file. On 30 May 2002 at 15:48, Subhendu Ghosh wrote: > > Ethan, others.. > > On this issue with ping > > Should we look at only one of the two packages - nagios or the plugins > providing check_ping. It does seem a bit redundant to patch both pieces > every time. > > Since ping is a such a basic functionality should we just look at > maintaining it with nagios ? > > -sg > > > On Thu, 30 May 2002, Matthew Walburn wrote: > > > Hi there, I'm trying to get th new Netsaint working and am running into > > problems getting the configure script to run right... it gets this far: > > > > ./configure --prefix=/opt/netsaint --enable-embedded-perl --with-perlcache > > > > ... > > checking for type of socket size... size_t > > checking for mail... /bin/mail > > Init script directory: /etc/rc.d/init.d > > checking for gdImagePng in -lgd (order 1)... yes > > GD library was found! > > checking for traceroute... /usr/sbin/traceroute > > checking for ping... /bin/ping > > > > and the it just hangs there. I'm running Redhat 7.3 and near as I can > > tell have all the required packages. > > > > Any suggestions would be very helpful. > > > > Thanks! > > > > -Matt > > > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > Ethan Galstad, Nagios Developer --- Email: nagios at nagios.org Website: http://www.nagios.org From sghosh at sghosh.org Thu May 30 19:56:02 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Thu May 30 19:56:02 2002 Subject: [Nagios-devel] Re: [Nagiosplug-devel] Re: [netsaint-devel] 0.0.7 configure problems. In-Reply-To: <3CF696EA.31310.109325B@localhost> Message-ID: Just checked statuswml.c .. WAP passes the output directly to the client with no parsing - so perhaps a simpler configure check might be in order to check for the options. enabling the check only if wap support is compiled is even better -sg On Thu, 30 May 2002, Ethan Galstad wrote: > Both Nagios and the plugins need to check ping syntax. Nagios needs > it for use with the WAP interface. However, due to the ever-changing > format of the ping syntax, I'm thinking it might be better to move it > out of the Nagios configure script and into an option in the CGI > config file. > > On 30 May 2002 at 15:48, Subhendu Ghosh wrote: > > > > Ethan, others.. > > > > On this issue with ping > > > > Should we look at only one of the two packages - nagios or the plugins > > providing check_ping. It does seem a bit redundant to patch both pieces > > every time. > > > > Since ping is a such a basic functionality should we just look at > > maintaining it with nagios ? > > > > -sg > > > > > > On Thu, 30 May 2002, Matthew Walburn wrote: > > > > > Hi there, I'm trying to get th new Netsaint working and am running into > > > problems getting the configure script to run right... it gets this far: > > > > > > ./configure --prefix=/opt/netsaint --enable-embedded-perl --with-perlcache > > > > > > ... > > > checking for type of socket size... size_t > > > checking for mail... /bin/mail > > > Init script directory: /etc/rc.d/init.d > > > checking for gdImagePng in -lgd (order 1)... yes > > > GD library was found! > > > checking for traceroute... /usr/sbin/traceroute > > > checking for ping... /bin/ping > > > > > > and the it just hangs there. I'm running Redhat 7.3 and near as I can > > > tell have all the required packages. > > > > > > Any suggestions would be very helpful. > > > > > > Thanks! > > > > > > -Matt > > > > > > > > > _______________________________________________________________ > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > > > _______________________________________________ > > Nagiosplug-devel mailing list > > Nagiosplug-devel at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > > > > > > Ethan Galstad, > Nagios Developer > --- > Email: nagios at nagios.org > Website: http://www.nagios.org > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Nagios-devel mailing list > Nagios-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-devel > From jose-louis.marcos at cnes.fr Thu May 30 23:19:02 2002 From: jose-louis.marcos at cnes.fr (Jose L. Marcos) Date: Thu May 30 23:19:02 2002 Subject: [Nagiosplug-devel] Output from plugin not displayed by Nagios ? Message-ID: <200205310614.g4V6EXs03808@cnes.fr> Hi, I'm playing with check_hprsc.pl PERL plugin (from netsaintplug-1.2.9-4 contribs) and Nagios 1.0b2... check_hprsc makes use of snmpwalk to grab information on filesystems from a hpux host (actually it does also some cpu check, but I'm only using filesystem free space check functionality), does some calculation then ends by returning an exit code (-1,0,1 or 2) and a text message (1 line < 80 chars). Ok. Everything works fine except for Nagios not showing me the output from the plugin. This particular plugin just uses a 'printf "Text (%format)\n"' statement to display informative messages. The thing that puzzles me, is : if I explicitly put a 'print "blabla\n"; exit 1;' before any real code execution (let say after 'GetOptions' call) I get the correct status and plugin output on Nagios Services View ! Any ideas ? -- Jose Luis ---------------------------------------------------------------------------- Y no llegaste a quererme, y eran mis cinco sentidos Y no llegaste a quererme, y que desgraciaito he sido Y que ha tenido que aborrecerte tanto como te ha querido (Camaron) ---------------------------------------------------------------------------- From sghosh at sghosh.org Thu May 30 23:32:01 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Thu May 30 23:32:01 2002 Subject: [Nagiosplug-devel] Output from plugin not displayed by Nagios ? In-Reply-To: <200205310614.g4V6EXs03808@cnes.fr> Message-ID: On Fri, 31 May 2002, Jose L. Marcos wrote: > Hi, > > I'm playing with check_hprsc.pl PERL plugin (from netsaintplug-1.2.9-4 > contribs) and Nagios 1.0b2... > > check_hprsc makes use of snmpwalk to grab information on filesystems > from a hpux host (actually it does also some cpu check, but I'm only > using filesystem free space check functionality), does some calculation > then ends by returning an exit code (-1,0,1 or 2) and a text message (1 > line < 80 chars). Nagios support POSIX codes only - 0,1,2,3 - 3 == UNKNOWN not -1 > > Ok. Everything works fine except for Nagios not showing me the output > from the plugin. > > This particular plugin just uses a 'printf "Text (%format)\n"' statement > to display informative messages. The thing that puzzles me, is : if I > explicitly put a 'print "blabla\n"; exit 1;' before any real code > execution (let say after 'GetOptions' call) I get the correct status and > plugin output on Nagios Services View ! > Does the commandline work? correct path to snmpwalk? tried running it under perl debugger "perl -d check_hprsc.pl" -sg