From noreply at sourceforge.net Wed Jan 1 20:31:31 2003 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Wed Jan 1 20:31:31 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-660846 ] check_nagios detects self Message-ID: Patches item #660846, was opened at 2003-01-01 22:43 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=660846&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Rodger Allen (derais) Assigned to: Nobody/Anonymous (nobody) Summary: check_nagios detects self Initial Comment: The check_nagios plugin checks the output of "ps" tagainst a user-supplied string to determine the running state of the nagios process. As the check_nagios process appears in the process list with this string it erroneously reports an extra nagios process -- which is itself. The supplied patch should cause the plugin to reject itself in the process list. regards Rodger Allen ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=660846&group_id=29880 From paul at aps.org Fri Jan 3 08:14:02 2003 From: paul at aps.org (Paul Dlug) Date: Fri Jan 3 08:14:02 2003 Subject: [Nagiosplug-devel] patch status/next release Message-ID: <171ADB6C-1F36-11D7-A6DA-000393BB3E22@aps.org> I see a number of patches that have not been acted on. How active is development and when is the next release planned? --Paul From hannu.liljemark at laurea.fi Fri Jan 3 13:31:07 2003 From: hannu.liljemark at laurea.fi (Hannu Liljemark) Date: Fri Jan 3 13:31:07 2003 Subject: [Nagiosplug-devel] check_ifstatus patch to allow specifying a list of unused ports Message-ID: <20030103213002.GA15825@charisma.dyndns.org> Hai, The excellent check_ifstatus plugin was getting on my nerves as the 24-port switch I use for testing doesn't have all interface in use. The plugin ends up giving a list in its output that is too long for Nagios to show completely, and I get unwanted emails :-) (Well I could disable notifications...) So I tried patching the plugin to accept a list of ports that are known to be unused (and down): $ ./check_ifstatus -H router -u 2 OK: host 'router', interfaces up: 1, down: 0, dormant: 0, unused: 1 Okay that output isn't from the switch I usually use... Anyhow, you give a comma-separated list of the ports by using -u or --unused. I'm not completely sure if this patch is any use for others, but I attached the diff anyway to this mail. Hope someone finds it useful. -- (Mr.) Hannu Liljemark | Appelsiini Finland Oy | http://appelsiini.com -------------- next part -------------- *** check_ifstatus~ Thu Dec 19 10:30:25 2002 --- check_ifstatus Thu Jan 2 15:50:17 2003 *************** *** 63,68 **** --- 63,70 ---- my $snmpLocIfDescr = '1.3.6.1.4.1.9.2.2.1.1.28'; my $snmpIfType = '1.3.6.1.2.1.2.2.1.3'; my $hostname; + my @unused_ports; + my $unused_ports = ""; my $session; my $error; my $response; *************** *** 97,102 **** --- 99,105 ---- "C=s" =>\$community,"community=s" => \$community, "p=i" =>\$port, "port=i" => \$port, "H=s" => \$hostname, "hostname=s" => \$hostname, + "u=s" => \$unused_ports, "unused_ports=s" => \$unused_ports, "I" => \$ifXTable, "ifmib" => \$ifXTable ); if ($status == 0) *************** *** 105,110 **** --- 108,114 ---- exit $ERRORS{'OK'}; } + @unused_ports = split(/,/, $unused_ports); if ($opt_V) { print_revision($PROGNAME,'$Revision: 1.2 $ '); *************** *** 182,189 **** --- 186,196 ---- $session->close; + foreach $key (@unused_ports) { $ifStatus{$key}{'notInUse'}++ ;} foreach $key (keys %ifStatus) { + # skip unused interfaces + if (!defined($ifStatus{$key}{'notInUse'})) { # check only if interface is administratively up if ($ifStatus{$key}{$snmpIfAdminStatus} == 1 ) { # check only if interface is not of type 23 aka PPP interface *************** *** 202,222 **** if ($ifdown > 0) { $state = 'CRITICAL'; ! $answer = sprintf("host '%s', interfaces up: %d, down: %d, dormant: %d
", $hostname, $ifup, $ifdown, ! $ifdormant); $answer = $answer . $ifmessage . "\n"; } else { $state = 'OK'; ! $answer = sprintf("host '%s', interfaces up: %d, down: %d, dormant: %d\n", $hostname, $ifup, $ifdown, ! $ifdormant); } print ("$state: $answer"); exit $ERRORS{$state}; --- 209,233 ---- if ($ifdown > 0) { $state = 'CRITICAL'; ! $answer = sprintf("host '%s', interfaces up: %d, down: %d, dormant: %d, unused: %d
", $hostname, $ifup, $ifdown, ! $ifdormant, ! scalar(@unused_ports)); $answer = $answer . $ifmessage . "\n"; } else { $state = 'OK'; ! $answer = sprintf("host '%s', interfaces up: %d, down: %d, dormant: %d, unused: %d\n", $hostname, $ifup, $ifdown, ! $ifdormant, ! scalar(@unused_ports)); } + } + } print ("$state: $answer"); exit $ERRORS{$state}; *************** *** 246,251 **** --- 257,263 ---- 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 " -u (--unused) Comma-separated list of unused ports known to be down\n"; printf " -V (--version) Plugin version\n"; printf " -h (--help) usage help \n\n"; print_revision($PROGNAME, '$Revision: 1.2 $'); From noreply at sourceforge.net Fri Jan 3 18:39:02 2003 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Fri Jan 3 18:39:02 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-660973 ] check_tcp refusals okay Message-ID: Patches item #660973, was opened at 2003-01-02 07:12 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=660973&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Rodger Allen (derais) Assigned to: Nobody/Anonymous (nobody) Summary: check_tcp refusals okay Initial Comment: The accompanying patch adds an interface to netutils and an option to check_tcp to allow for different STATE returns when the the tcp connection receives a connection refused (ECONNREFUSED). This may be useful in a heavily firewalled environment where ICMP may be denied and there are restrictions on which ports are allowed access to certain machines. Receiving a connection refused is an indication that the ip stack on the machine is working okay, and therefore may be read in a similar manner to a ping, viz, the machine is alive and able to respond, even though there may not be a service running on that port at that time. It can be used in place of check_ping in a check-host-alive command. (In our situation we only allow ssh to particular servers, and would like to know if the machine is actually "up" even though the sshd may be down.) The default behaviour is to act as it does now, issuing a CRITICAl if the connection is refused. The behviour can be changed to issue an OK or a WARNING when the connection is refused, and it will also indicate if it has been refused as well as returning the requested state. The option added to check_tcp: " -r, --refuse=ok|warn|crit Accept tcp refusals with states ok,warn, crit (default: crit)" eg: $ ./check_tcp -H foo -p 443; echo $? Connection refused by host 2 $ ./check_tcp -H foo -p 443 --refuse=crit; echo $? Connection refused by host 2 $ ./check_tcp -H foo -p 443 --refuse=warn; echo $? TCP WARNING (refused) - ... 1 $ ./check_tcp -H foo -p 443 --refuse=ok; echo $? TCP OK (refused) - ... 0  ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=660973&group_id=29880 From noreply at sourceforge.net Fri Jan 3 18:39:02 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Jan 3 18:39:02 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-661916 ] urlize and urlize.pl break args with spaces Message-ID: Bugs item #661916, was opened at 2003-01-03 17:31 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=661916&group_id=29880 Category: Argument proccessing Group: Release (specify) Status: Open Resolution: None Priority: 5 Submitted By: Ben Johnson (darkstar101) Assigned to: Nobody/Anonymous (nobody) Summary: urlize and urlize.pl break args with spaces Initial Comment: Both urlize and urlize.pl break args with spaces. For example check_http --ssl -H my.server.com -u /ping/ping.jsp --string="Ping JSP Monitorxxx" returns status: 2, text: HTTP CRITICAL: string not found urlize http://my.server.com/ping/ping.jsp check_http --ssl -H my.server.com -u /ping/ping.jsp --string="Ping JSP Monitorxxx" returns status: 0, text: HTTP ok: HTTP/1.1 200 OK - 0 second response time It looks like the quotes are being dropped and only the first word in the --string parameter making it through... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=661916&group_id=29880 From karl at debisschop.net Fri Jan 3 22:22:02 2003 From: karl at debisschop.net (Karl DeBisschop) Date: Fri Jan 3 22:22:02 2003 Subject: [Nagiosplug-devel] patch status/next release In-Reply-To: <171ADB6C-1F36-11D7-A6DA-000393BB3E22@aps.org> References: <171ADB6C-1F36-11D7-A6DA-000393BB3E22@aps.org> Message-ID: <1041661063.16045.21.camel@localhost.localdomain> On Fri, 2003-01-03 at 11:12, Paul Dlug wrote: > I see a number of patches that have not been acted on. How active is > development and when is the next release planned? Some have been acted on but not cleared from the list. A little deceptive. Working on that. Last release was a beta at the end of November. No timetable for getting out of beta, and yes we did slow down in December. I am picking up again, and there are signs others are as well. All in all, even though it's called beta, it's better than the netsaint plugins official releases, but we do have to hack through some of those patches to call it ready for release. Could be sometime in February, if I had to guess. But I could be moved either way by a good argument about when we should call it done. My major needs have been met, as far as I'm concerned, we should not be doing major changes now (i.e., we should probably call a feature freeze real soon now). -- Karl From chip at chip.net Sun Jan 5 14:47:02 2003 From: chip at chip.net (Chip Ach) Date: Sun Jan 5 14:47:02 2003 Subject: [Nagiosplug-devel] Perl replacement for check_ping. Message-ID: I wrote a replacement for check_ping in perl this afternoon. Why? I'm hoping that it will get cached by the embedded perl interpreter of Nagios and not spawn a seperate process each time I ping something. It is designed as a drop in replacement to check_ping. It is located at: http://chip.net/check_ping.perl (forgive the odd extention...) It needs Net::Ping, Time::HiRes and Getopt::Mixed. It has been tested insomuch as it seems to work initially on my system. That's about it. :) I'll do a full posting with a diff to what is required, etc. once it is better tested. Feedback is, of course, welcome. -Chip ------------------------------------------------------------ I'm running the Boston Marathon to raise money for the American Stroke Association. Please see http://chip.net/marathon for details! Thanks! From andyrew609 at attbi.com Mon Jan 6 03:02:03 2003 From: andyrew609 at attbi.com (andyrew609 at attbi.com) Date: Mon Jan 6 03:02:03 2003 Subject: [Nagiosplug-devel] check_ldap segfault and syntax help patch Message-ID: I've got a patch to improve the syntax help the program gives and to (hopefully) fix a segfault. The current syntax check_ldap prints out doesn't make it clear that the -w and -c options are required. I spent quite a few minutes grepping around the source and scratching my head before I figured that out :-). Also, the program segfaults if is called so that argc>=2, but the -b option and -H option are not provided. This is because the program references elements in the array of ld_base and ld_host without checking if these variables are defined. I think this was just a typo, and I fixed it. Either that or I fixed one problem while unintentially breaking something more subtle. You be the judge. Regards, Andrew McDavid diff -u -------------------------------------------------------- --- check_ldap.c Thu Nov 14 17:04:51 2002 +++ check_ldap.c.new Mon Jan 6 02:15:41 2003 @@ -32,6 +32,7 @@ #include #define UNKNOWN -1 +#define E_MOREARGS 3 int process_arguments (int, char **); int validate_arguments (void); @@ -53,10 +54,11 @@ int t_diff; time_t time0, time1; - - if (process_arguments (argc, argv) == ERROR) + int state = process_arguments (argc, argv); + if (state == ERROR) usage ("check_ldap: could not parse arguments\n"); - + if (state == E_MOREARGS) + usage ("check_ldap: four arguments are required\n"); /* initialize alarm signal handling */ signal (SIGALRM, socket_timeout_alarm_handler); @@ -143,7 +145,7 @@ #endif if (argc < 2) - return ERROR; + return E_MOREARGS; for (c = 1; c < argc; c++) { if (strcmp ("-to", argv[c]) == 0) @@ -212,10 +214,10 @@ int validate_arguments () { - if (ld_host[0] == 0 || - ld_base[0] == 0 || + if (ld_host == 0 || + ld_base == 0 || ld_port == UNKNOWN || warn_time == UNKNOWN || crit_time == UNKNOWN) { - return ERROR; + return E_MOREARGS; } else { return OK; @@ -241,7 +243,7 @@ "\t-b [--base] ... ldap base (eg. ou=my unit, o=my org, c=at)\n" "\t-D [--bind] ... ldap bind DN (if required)\n" "\t-P [--pass] ... ldap password (if required)\n" - "\t-p [--port] ... ldap port (normaly 389)\n" + "\t-p [--port] ... ldap port (defaults to 389)\n" "\t-w [--warn] ... time in secs. - if the exceeds the STATE_WARNING will be returned\n" "\t-c [--crit] ... time in secs. - if the exceeds the STATE_CRITICAL will be returned\n" "\n"); @@ -252,7 +254,7 @@ print_usage () { printf - ("Usage: %s -H -b -p [-a ] [-D ]\n" - " [-P ] [-w ] [-c ] [-t timeout]\n" + ("Usage: %s -H -b -w -c \n" + "[-p ] [-a ] [-D ] [-P ] [-t time out]\n" "(Note: all times are in seconds.)\n", PROGNAME); } From hannu.liljemark at laurea.fi Mon Jan 6 05:13:05 2003 From: hannu.liljemark at laurea.fi (Hannu Liljemark) Date: Mon Jan 6 05:13:05 2003 Subject: [Nagiosplug-devel] check_ifstatus patch to allow specifying a list of unused ports In-Reply-To: References: <20030103213002.GA15825@charisma.dyndns.org> Message-ID: <20030106131234.GA660@kakola.dyndns.org> Of course there seems to be a typo in the patch. "u=s" => \$unused_ports, "unused_ports=s" => \$unused_ports, should be "u=s" => \$unused_ports, "unused=s" => \$unused_ports, Notice the "unused_ports=s" change to "unused=s", as we've decided to have --unused. I'm not sure but looks like GetOptions() parsed the option just fine dispite the typo... go figure. -- (Mr.) Hannu Liljemark | Appelsiini Finland Oy | http://appelsiini.com From Ton.Voon at egg.com Mon Jan 6 09:41:05 2003 From: Ton.Voon at egg.com (Voon, Ton) Date: Mon Jan 6 09:41:05 2003 Subject: [Nagiosplug-devel] RE: [Nagios-users] checking memory and cpu consumption of procs Message-ID: <53104E20A25CD411B556009027E50636064D507A@pnnemp02.pn.egg.com> Karl, I've been working with Dave on the check_cpu plugin and have finally got it integrated. As you requested, we have split it into two sets of patches: - configure/makefile changes to be incorporated into v1.3 - check_cpu.c to be added for v1.4 I propose that check_cpu.c is added to the contrib directory for 1.3 with a readme to say that to compile it, it needs to be copied into the plugins directory and configure to be rerun. At the moment, the CPU_COMMAND variable is only configured for Solaris and FreeBSD - any patches for other OSes are warmly welcomed! I've tested the patches against the 200301061100-snapshot on Solaris. Ton <> <> <> <> <> > -----Original Message----- > From: Karl DeBisschop [SMTP:karl at debisschop.net] > Sent: Sunday, December 22, 2002 1:51 PM > To: Voon, Ton > Cc: 'Dave Viner'; Nagiosplug-devel > Subject: Re: [Nagiosplug-devel] RE: [Nagios-users] checking memory > and cpu consumption of procs > > On Fri, 2002-12-20 at 12:49, Voon, Ton wrote: > > Copying onto nagiosplug-devel list. Future replies will only be to the > > nagiosplug-devel list. > > > > I would go with "Keep it simple". If a plugin reports a failure, then it > is > > the manual investigation that will show up the stderr failures. I would > > think a ps failure is fairly catastrophic ;o) > > > > Then again, maybe it is just the initial pain of a new model. I can see > the > > model makes more sense for plugins that call 3rd party commands. Maybe > Karl > > would be interested in adding runcmd in utils.c? > > I would be willing to add/replace the spopen model with polling. I sort > of tried to get part way there by scanning stderr, way back when I first > implemented spopen. I didn't really think about blocking at the time, I > just figured a 3rd party util that used stderr needed to at least note > that, usually by throwing a warning. > > I will look at transition/implementation issues later. I think this > souns like a 1.4 issue, however. > > > If your friends are going to look at this on Solaris, here's some of the > > pain I discovered: > > Thanks. I think most of this can go right into 1.3. Except I am hesitant > to add a new plugin at this point, so maybe check_cpu itself can get > added just after 1.3 is released. > > > > strsep is not supported on Solaris. A portable version is: > > > /************************************************************************* > ** > > > > Sound reasonable? > > -- > Karl DeBisschop This private and confidential e-mail has been sent to you by Egg. The Egg group of companies includes Egg Banking plc (registered no. 2999842), Egg Financial Products Ltd (registered no. 3319027) and Egg Investments Ltd (registered no. 3403963) which carries out investment business on behalf of Egg and is regulated by the Financial Services Authority. Registered in England and Wales. Registered offices: 1 Waterhouse Square, 138-142 Holborn, London EC1N 2NA. If you are not the intended recipient of this e-mail and have received it in error, please notify the sender by replying with 'received in error' as the subject and then delete it from your mailbox. -------------- next part -------------- A non-text attachment was scrubbed... Name: acconfig.h.patch Type: application/octet-stream Size: 290 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: common.h.in.patch Type: application/octet-stream Size: 403 bytes Desc: plugins/common.h.in.patch URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: configure.in.patch Type: application/octet-stream Size: 2383 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Makefile.am.patch Type: application/octet-stream Size: 1369 bytes Desc: plugins/Makefile.am.patch URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: check_cpu.c Type: application/octet-stream Size: 11695 bytes Desc: not available URL: From noreply at sourceforge.net Mon Jan 6 15:59:08 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Mon Jan 6 15:59:08 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-663051 ] check_ldap segfault fix and syntax clarification Message-ID: Patches item #663051, was opened at 2003-01-06 03:15 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=663051&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: check_ldap segfault fix and syntax clarification Initial Comment: Check_ldap segfaults if argc>=2 and the -H or -b options are not supplied. This is because validate_arguments tries to reference elements of the ld_base and ld_host arrays that might not exist. This appears to be just a typo, and I fixed it. Hopefully. Also, the syntax help message that the program spits out doesn't explain that the -c and -w options are required. I fixed up the syntax help a bit to explain that. I also added a slightly more specific explanation for some errors in the command line. Andrew McDavid andy_spamfree_rew609 at mailandnews.com (remove _spamfree_) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=663051&group_id=29880 From james at cloud9.co.uk Mon Jan 6 16:30:06 2003 From: james at cloud9.co.uk (James Fidell) Date: Mon Jan 6 16:30:06 2003 Subject: [Nagiosplug-devel] check_procs problem Message-ID: <20030107002829.V19417@avarice.corp.cloud9.co.uk> Does anyone have check_procs working with the -a option on FreeBSD? It appears that check_procs uses the command /bin/ps waxco 'state uid ppid command command' but as far as I can see, FreeBSD ps doesn't display the arguments for the keyword "command" and doesn't have an option to display the arguments separately, either. James From slurn at verisign.com Mon Jan 6 16:46:01 2003 From: slurn at verisign.com (slurn at verisign.com) Date: Mon Jan 6 16:46:01 2003 Subject: [Nagiosplug-devel] LPD plugin (fwd) Message-ID: <200301070045.QAA19948@slurndal-lnx.verisign.com> Greetings, Sourceforge isn't accepting mail from my ISP domain apparently. I've been trying to send this to the list for a couple of weeks. I'm posting from another address, but the reply-to address (slurn at pacbell.net) is the correct address to use for correspondance). Contained within this message, please find 'check_lpd.c' and 'Makefile.in.diff'. This work was based upon the nagios-plugins-1.3.0-beta2 release. It is provided under GPL. scott lurndal (slurn at pacbell.net) ---------------------------[Begin check_lpd.c]--------------------------------- /****************************************************************************** * CHECK_LPD.C * * Program: LPD/LPR protocol plugin for Nagios * License: GPL * Copyright (c) 2002 Scott Lurndal (slurn at pacbell.net) * * Last Modified: $Date$ * * Command line: check_lpr -h [-p port] [-s source] [-q queue] * * Description: * * This plugin is for testing a lpd/lpr server. * * Modifications: * * *****************************************************************************/ #define PROGNAME "check_lpr" #define REVISION "$Revision:$" #include "config.h" #include "common.h" #include "netutils.h" #include "utils.h" /* * Global data */ static char *myname; /* Name application invoked as */ static void print_help(); static void print_usage(); /** * process_arguments * * This function will process the input arguments. * * @param argc The count of arguments in argv * @param argv A Vector of character string arguments. * @param host A pointer to a character pointer to which the hostname * will be returned. * @param port A pointer to a short to which the LPD port will be returned. * @param src A pointer to a short to which the source port will be returned. * @param queue A pointer to a character pointer to which the queue name * will be returned. */ void process_arguments(int argc, char **argv, char **host, short *port, short *src, char **queue) { int c; #define GETOPT_STR "hVH:p:s:q:" #ifdef HAVE_GETOPT_H int option_index = 0; /* initialize the long option struct */ static struct option longopts[] = { {"help", no_argument, 0, 'h'}, {"version", no_argument, 0, 'V'}, {"host", required_argument, 0, 'H'}, {"port", required_argument, 0, 'p'}, {"source", required_argument, 0, 's'}, {"queue", required_argument, 0, 'q'}, {0, 0, 0, 0} }; #endif while (1) { char *start; unsigned long lport; #ifdef HAVE_GETOPT_H c = getopt_long(argc, argv, GETOPT_STR, longopts, &option_index); #else c = getopt(argc, argv, "+?" GETOPT_STR); #endif if (c == -1 || c == EOF) { break; } switch (c) { case 'h': print_help (); exit (STATE_OK); case 'V': print_revision (PROGNAME, REVISION); exit (STATE_OK); case 'H': *host = optarg; break; case 'p': case 's': lport = strtoul(optarg, &start, 0); if ((*optarg == '\0') || (*start != '\0')) { fprintf(stdout, "%s: Missing or invalid integer port\n", myname); exit(STATE_UNKNOWN); } if ((lport == 0) || (lport > SHRT_MAX)) { fprintf(stdout, "%s: Port must be between 1 and %d\n", myname, SHRT_MAX); exit(STATE_UNKNOWN); } if (c == 's') { if ((lport < 721) || (lport > 731)) { fprintf(stdout, "%s: 721 <= %d <= 731: port out of range\n", myname, lport); } *src = (short)lport; } else { *port = (short)lport; } break; default: fprintf(stdout, "%s: Illegal option '%c'\n", myname, c); exit(STATE_UNKNOWN); break; } } } /** * print_help * * This function is used to print the help message. */ static void print_help () { print_revision (PROGNAME, REVISION); printf("Copyright (c) 2002 Scott Lurndal\n" "License: GPL\n" "\n"); print_usage (); printf ("\n" "Options:\n" "\t-H [--host] ... host\n" "\t-p [--port] ... server lpd port\n" "\t-s [--source] ... source port (default 731)\n" "\t-q [--queue] ... LPD queue to check\n" "\n"); } /** * print_usage * * This function is used to print the usage string in case of parameter * error. * */ static void print_usage () { printf("Usage: %s -H [-p port] [-s source] [-q queue]\n", myname); } /** * perform_test * * This function is responsible for testing the LPD daemon. It will * open a socket to the daemon and submit a 'return status on queue(short)' * command with a queue name to the daemon and return the response. * * Note that RFC1179-compliant daemons will require the source port * to be in the range 721<=sourceport<=731 which will require that * this function execute as a privileged user. * * @param host The hostname to connect to * @param port The port on hostname to connect to. * @param source The source port to bind the socket to. * @param queue The queue name to test on the LPD daemon * @param buffer A buffer which will be used to return the response from * the LPD daemon. * @param buflen The size, in bytes, of buffer * @returns The Nagios Status code for the test. */ static int perform_test(char *host, short port, short source, char *queue, unsigned char *buffer, size_t buflen) { struct hostent *hp; struct servent *sp; struct sockaddr_in addr; int fd; int diag; int value; struct linger l; /* * Fetch host internet address information */ hp = gethostbyname(host); if (hp == NULL) { fprintf(stdout, "%s: Unable to resolve host '%s': %s\n", myname, host, strerror(errno)); return STATE_UNKNOWN; } /* * Obtain a socket */ fd = socket(PF_INET, SOCK_STREAM, 0); if (fd == -1) { fprintf(stdout, "%s: Unable to create socket: %s\n", myname, strerror(errno)); return STATE_UNKNOWN; } value = 1; diag = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &value, sizeof(value)); if (diag == -1) { fprintf(stderr, "%s: Unable to set REUSEADDR: %s\n", myname, strerror(errno)); return STATE_UNKNOWN; } /* * Bind the socket to a privileged local source port which * must be in the range 721 -> 731 inclusive. */ addr.sin_family = hp->h_addrtype; addr.sin_port = htons(source); addr.sin_addr.s_addr = INADDR_ANY; diag = bind(fd, (struct sockaddr *)&addr, sizeof(addr)); if (diag == -1) { fprintf(stdout, "%s: Unable to bind to source port %d: %s\n", myname, source, strerror(errno)); close(fd); return STATE_UNKNOWN; } /* * Connect to the LPD server */ addr.sin_family = hp->h_addrtype; addr.sin_port = htons(port); memcpy((char *)&addr.sin_addr, *hp->h_addr_list, hp->h_length); diag = connect(fd, (struct sockaddr *)&addr, sizeof(addr)); if (diag == -1) { fprintf(stdout, "%s: Unable to connect to '%s:%d': %s\n", myname, host, port, strerror(errno)); close(fd); return STATE_CRITICAL; } /* * Send the inquiry string */ diag = snprintf(buffer, buflen, "%c%s\n", 0x03, queue); if (diag > buflen) { fprintf(stdout, "%s: Queue name '%s' too large\n", myname, queue); close(fd); return STATE_UNKNOWN; } diag = send(fd, buffer, diag, 0); if (diag == -1) { fprintf(stdout, "%s: Unable to send to '%s:%d': %s\n", myname, host, port, strerror(errno)); close(fd); return STATE_CRITICAL; } /* * Read the response */ diag = recv(fd, buffer, buflen, 0); if (diag == -1) { fprintf(stdout, "%s: Unable to receive from '%s:%d': %s\n", myname, host, port, strerror(errno)); close(fd); return STATE_CRITICAL; } /* * Make sure buffer is null-terminated and return it to the caller. * (diag - 1 ensures that the newline is replaced with a null byte) */ buffer[diag - 1] = '\0'; if (!isprint(buffer[0])) { buffer[0] = ' '; /* LPRng returns command in first byte */ } /* * Make sure we don't linger during the close on the socket. Just flush * any remaining receive or transmit data. */ l.l_onoff = 0; l.l_linger = 0; diag = setsockopt(fd, SOL_SOCKET, SO_LINGER, &l, sizeof(l)); if (diag == -1) { fprintf(stdout, "%s: Unable to set linger to zero on socket: %s\n", myname, strerror(errno)); close(fd); return STATE_CRITICAL; } close(fd); return STATE_OK; } /** * check_lpd * * This Nagios plugin is responsible for determining the status * of the LPD service on a host. * * The caller must specify the hostname, and optionally may * specify the LPD port on the given hostname as well as the * source port (in the range 721 <= source <= 731). The default * host port is 515 (per RFC1179), while the default source * port is 730. * * Note that binding to source port in the designated range requires * privileges on unix systems. * * So long as the LPD daemon returns a response, the service is considered * STATUS_OK. Any command-line errors (bad hostname, port etc.) will * be considered STATUS_UNKNOWN, while connect, send and receive failures * will be considered STATUS_CRITICAL. The actual response returned * from the LPD daemon will be included in the status message. * * A 'Return Status on Queue' operation is used to communicate with the * LPD daemon; the caller may specify a queue name using the -q * argument. The default queue name is 'pr2'. * * @param argc The count of entries in the argument vector argv * @param argv A Vector of arguments provided to this application. * @param envp A Vector of Environment Strings * @returns A Nagios Status code. */ int main (int argc, char **argv, char **envp) { struct timeval start; struct timeval end; suseconds_t usec; short port = 515; short source = 730; char *host = "localhost"; char *queue = "pr2"; unsigned char response[256]; int result; double responsetime; myname = argv[0]; /* Save name invoked as */ strcpy(response, "No Response"); process_arguments(argc, argv, &host, &port, &source, &queue); gettimeofday(&start, NULL); result = perform_test(host, port, source, queue, response, sizeof(response)); responsetime = delta_time(start); /* print out the result */ if (result == STATE_OK) { printf("LPD: %s (%.3f second response)\n", response, responsetime); } return result; } /* vim: sw=4 sts=4 sta ts=8: */ -----------------------------[end check_lpd.c]--------------------------------- -----------------------------[begin Makefile.in.diff]-------------------------- $ diff -u Makefile.in.orig Makefile.in --- Makefile.in.orig 2002-12-19 17:31:44.000000000 -0800 +++ Makefile.in 2002-12-19 17:35:32.000000000 -0800 @@ -138,7 +138,7 @@ check_nagios check_by_ssh check_dns -check_tcp_programs = check_ftp check_imap check_nntp check_pop +check_tcp_programs = check_ftp check_imap check_nntp check_pop check_lpd EXTRA_DIST = t utils.c netutils.c popen.c getopt.h getopt.c getopt1.c \ snprintf.c getloadavg.c @@ -169,6 +169,7 @@ check_hpjd_LDADD = $(BASEOBJS) popen.o check_ldap_LDADD = $(NETLIBS) $(LDAPLIBS) check_load_LDADD = $(BASEOBJS) popen.o +check_lpd_LDADD = $(BASEOBJS) check_mrtg_LDADD = $(BASEOBJS) check_mrtgtraf_LDADD = $(BASEOBJS) check_mysql_LDADD = $(BASEOBJS) $(MYSQLLIBS) @@ -204,6 +205,7 @@ check_hpjd_DEPENDENCIES = check_hpjd.c $(BASEOBJS) popen.o $(DEPLIBS) check_ldap_DEPENDENCIES = check_ldap.c $(NETOBJS) $(DEPLIBS) check_load_DEPENDENCIES = check_load.c $(BASEOBJS) popen.o $(DEPLIBS) +check_lpd_DEPENDENCIES = check_lpd.c $(BASEOBJS) check_mrtg_DEPENDENCIES = check_mrtg.c $(DEPLIBS) check_mrtgtraf_DEPENDENCIES = check_mrtgtraf.c $(DEPLIBS) check_mysql_DEPENDENCIES = check_mysql.c $(DEPLIBS) @@ -288,6 +290,9 @@ check_load_SOURCES = check_load.c check_load_OBJECTS = check_load.o check_load_LDFLAGS = +check_lpd_SOURCES = check_lpd.c +check_lpd_OBJECTS = check_lpd.o +check_lpd_LDFLAGS = check_mrtg_SOURCES = check_mrtg.c check_mrtg_OBJECTS = check_mrtg.o check_mrtg_LDFLAGS = @@ -352,8 +357,8 @@ TAR = gtar GZIP_ENV = --best -SOURCES = check_mysql.c check_radius.c check_pgsql.c check_snmp.c check_hpjd.c check_swap.c check_fping.c check_ldap.c check_game.c check_dig.c check_nagios.c check_by_ssh.c check_dns.c check_disk.c check_dummy.c check_http.c check_load.c check_mrtg.c check_mrtgtraf.c check_nwstat.c check_overcr.c check_ping.c check_procs.c check_real.c check_smtp.c check_ssh.c check_tcp.c check_time.c check_udp.c check_ups.c check_users.c check_vsz.c negate.c urlize.c -OBJECTS = check_mysql.o check_radius.o check_pgsql.o check_snmp.o check_hpjd.o check_swap.o check_fping.o check_ldap.o check_game.o check_dig.o check_nagios.o check_by_ssh.o check_dns.o check_disk.o check_dummy.o check_http.o check_load.o check_mrtg.o check_mrtgtraf.o check_nwstat.o check_overcr.o check_ping.o check_procs.o check_real.o check_smtp.o check_ssh.o check_tcp.o check_time.o check_udp.o check_ups.o check_users.o check_vsz.o negate.o urlize.o +SOURCES = check_mysql.c check_radius.c check_pgsql.c check_snmp.c check_hpjd.c check_swap.c check_fping.c check_ldap.c check_game.c check_dig.c check_nagios.c check_by_ssh.c check_dns.c check_disk.c check_dummy.c check_http.c check_load.c check_mrtg.c check_mrtgtraf.c check_nwstat.c check_overcr.c check_ping.c check_procs.c check_real.c check_smtp.c check_ssh.c check_tcp.c check_time.c check_udp.c check_ups.c check_users.c check_vsz.c negate.c urlize.c check_lpd.c +OBJECTS = check_mysql.o check_radius.o check_pgsql.o check_snmp.o check_hpjd.o check_swap.o check_fping.o check_ldap.o check_game.o check_dig.o check_nagios.o check_by_ssh.o check_dns.o check_disk.o check_dummy.o check_http.o check_load.o check_mrtg.o check_mrtgtraf.o check_nwstat.o check_overcr.o check_ping.o check_procs.o check_real.o check_smtp.o check_ssh.o check_tcp.o check_time.o check_udp.o check_ups.o check_users.o check_vsz.o negate.o urlize.o check_lpd.o all: all-redirect .SUFFIXES: @@ -565,6 +570,10 @@ @rm -f check_ldap $(LINK) $(check_ldap_LDFLAGS) $(check_ldap_OBJECTS) $(check_ldap_LDADD) $(LIBS) +check_lpd: $(check_lpd_OBJECTS) $(check_lpd_DEPENDENCIES) + @rm -f check_lpd + $(LINK) $(check_lpd_LDFLAGS) $(check_lpd_OBJECTS) $(LIBS) + check_game: $(check_game_OBJECTS) $(check_game_DEPENDENCIES) @rm -f check_game $(LINK) $(check_game_LDFLAGS) $(check_game_OBJECTS) $(check_game_LDADD) $(LIBS) -------------------------[end Makefile.in.diff]--------------------------------- From pkrzystofiak at endeavors.com Mon Jan 6 17:44:02 2003 From: pkrzystofiak at endeavors.com (Peter Krzystofiak) Date: Mon Jan 6 17:44:02 2003 Subject: [Nagiosplug-devel] convert java code to nagios plugin? Message-ID: <53109A46D4F58F458B18D009EAEEDC830E6393@mail.endeavorstech.com> I have code that when it is executed, it prints one line example: java -cp x.jar RunX ====> System.out.println will print a "GOOD" or "BAD" depending on status of the thing that is being monitored. how to i go about turning this into a nagios plugin? i've dug deep through tons of documentation and have no idea how to convert this code into a plugin. (I know that there exists a mailing list for plugins) Input is welcomed Thank You, Peter pkrzystofiak at endeavors.com From nagios at nagios.org Mon Jan 6 18:54:04 2003 From: nagios at nagios.org (Ethan Galstad) Date: Mon Jan 6 18:54:04 2003 Subject: [Nagiosplug-devel] convert java code to nagios plugin? In-Reply-To: <53109A46D4F58F458B18D009EAEEDC830E6393@mail.endeavorstech.com> Message-ID: <3E19ECC9.18613.CA7CC5@localhost> Making this work as a plugin is fairly simple. The plugin developer docs can be found at: http://nagiosplug.sourceforge.net/ On 6 Jan 2003 at 17:43, Peter Krzystofiak wrote: > I have code that when it is executed, it prints one line > > example: > > java -cp x.jar RunX ====> System.out.println will print a > > "GOOD" or "BAD" depending on status of the thing that is being monitored. > > > how to i go about turning this into a nagios plugin? > i've dug deep through tons of documentation and have > no idea how to convert this code into a plugin. (I know that > there exists a mailing list for plugins) > > Input is welcomed > > Thank You, > > Peter > pkrzystofiak at endeavors.com > > > ------------------------------------------------------- > 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 > Ethan Galstad, Nagios Developer --- Email: nagios at nagios.org Website: http://www.nagios.org From kuehne at sietec.de Tue Jan 7 02:46:03 2003 From: kuehne at sietec.de (Alex Kuehne) Date: Tue Jan 7 02:46:03 2003 Subject: [Nagiosplug-devel] small enhancement to check_http Message-ID: <3E1AAFAF.9080600@sietec.de> Hello, might I suggest a small enhancement to check_http? I use it with -S option. So far it works fine, but the Status Informations shows up "HTTP ok: HTTP/1.1 200 OK - 0.650 second response time". Would it not be better to say "HTTPS ok: ...."? Best Regards Alex Kuehne -- Network Manager, SAG, Berlin, Germany From sghosh at sghosh.org Tue Jan 7 07:46:02 2003 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Tue Jan 7 07:46:02 2003 Subject: [Nagiosplug-devel] small enhancement to check_http In-Reply-To: <3E1AAFAF.9080600@sietec.de> Message-ID: small enhancement - but will need to change a number lines - doable ;) -sg On Tue, 7 Jan 2003, Alex Kuehne wrote: > Hello, > > might I suggest a small enhancement to check_http? I use it with -S > option. So far it works fine, > but the Status Informations shows up "HTTP ok: HTTP/1.1 200 OK - 0.650 > second response time". > Would it not be better to say "HTTPS ok: ...."? > > Best Regards > Alex Kuehne > > -- > Network Manager, SAG, Berlin, Germany > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > -- From sghosh at sghosh.org Tue Jan 7 19:58:04 2003 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Tue Jan 7 19:58:04 2003 Subject: [Nagiosplug-devel] check_procs problem In-Reply-To: <20030107002829.V19417@avarice.corp.cloud9.co.uk> Message-ID: On Tue, 7 Jan 2003, James Fidell wrote: > Does anyone have check_procs working with the -a option on FreeBSD? > > It appears that check_procs uses the command > > /bin/ps waxco 'state uid ppid command command' > > but as far as I can see, FreeBSD ps doesn't display the arguments > for the keyword "command" and doesn't have an option to display the > arguments separately, either. > > James > Does the following work on FreeBSD? (one liner from configure.in) ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" -- -sg From james at cloud9.co.uk Wed Jan 8 04:16:05 2003 From: james at cloud9.co.uk (James Fidell) Date: Wed Jan 8 04:16:05 2003 Subject: [Nagiosplug-devel] check_procs problem In-Reply-To: ; from sghosh@sghosh.org on Tue, Jan 07, 2003 at 10:57:41 -0500 References: <20030107002829.V19417@avarice.corp.cloud9.co.uk> Message-ID: <20030108121429.F22677@avarice.corp.cloud9.co.uk> Quoting Subhendu Ghosh (sghosh at sghosh.org): > Does the following work on FreeBSD? (one liner from configure.in) > > ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i > "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" Did you mean egrep -v ? If so, it only gives the command name, rather than all the arguments, too (this is on FreeBSD 4.6). It looks like the problem might be the "c" option to ps. Removing it gives me the entire command line. Of course that's not really what we want either, because it makes it non-trivial to match the -C parameter to check_procs. It looks like it may be necessary to run ps more than once to handle the "check_procs -C cmd -a args"; once to match "cmd" and then again once per process to match "args". Perhaps this already happens. Unfortunately the machine I have nagios installed on is having a fit at the moment. It's also 60 miles away and it's snowing, so I won't be going there to fix it today. I'll look into this a bit further once I can get access to the machine again. James From Ton.Voon at egg.com Wed Jan 8 06:54:03 2003 From: Ton.Voon at egg.com (Voon, Ton) Date: Wed Jan 8 06:54:03 2003 Subject: [Nagiosplug-devel] check_procs problem Message-ID: <53104E20A25CD411B556009027E50636064D509A@pnnemp02.pn.egg.com> I had a problem on Mac OS X (which is based on FreeBSD) where ps waxco 'state uid ppid command command' would only give one command column. Patch 652074 which I've put on sourceforge sets the command for MacOSX to be ps waxo 'state uid ppid ucomm command' instead. Maybe something similar is happening for you? -----Original Message----- From: James Fidell [mailto:james at cloud9.co.uk] Sent: 08 January 2003 12:14 To: Subhendu Ghosh Cc: nagiosplug-devel at lists.sourceforge.net Subject: Re: [Nagiosplug-devel] check_procs problem Quoting Subhendu Ghosh (sghosh at sghosh.org): > Does the following work on FreeBSD? (one liner from configure.in) > > ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i > "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" Did you mean egrep -v ? If so, it only gives the command name, rather than all the arguments, too (this is on FreeBSD 4.6). It looks like the problem might be the "c" option to ps. Removing it gives me the entire command line. Of course that's not really what we want either, because it makes it non-trivial to match the -C parameter to check_procs. It looks like it may be necessary to run ps more than once to handle the "check_procs -C cmd -a args"; once to match "cmd" and then again once per process to match "args". Perhaps this already happens. Unfortunately the machine I have nagios installed on is having a fit at the moment. It's also 60 miles away and it's snowing, so I won't be going there to fix it today. I'll look into this a bit further once I can get access to the machine again. James ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ Nagiosplug-devel mailing list Nagiosplug-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel This private and confidential e-mail has been sent to you by Egg. The Egg group of companies includes Egg Banking plc (registered no. 2999842), Egg Financial Products Ltd (registered no. 3319027) and Egg Investments Ltd (registered no. 3403963) which carries out investment business on behalf of Egg and is regulated by the Financial Services Authority. Registered in England and Wales. Registered offices: 1 Waterhouse Square, 138-142 Holborn, London EC1N 2NA. If you are not the intended recipient of this e-mail and have received it in error, please notify the sender by replying with 'received in error' as the subject and then delete it from your mailbox. From sghosh at sghosh.org Wed Jan 8 08:20:06 2003 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Wed Jan 8 08:20:06 2003 Subject: [Nagiosplug-devel] check_procs problem In-Reply-To: <20030108121429.F22677@avarice.corp.cloud9.co.uk> Message-ID: On Wed, 8 Jan 2003, James Fidell wrote: > Quoting Subhendu Ghosh (sghosh at sghosh.org): > > > Does the following work on FreeBSD? (one liner from configure.in) > > > > ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i > > "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" > > Did you mean egrep -v ? If so, it only gives the command name, rather > than all the arguments, too (this is on FreeBSD 4.6). no - wanted "egrep -i" to see the header for the ps output. If the above succeeds, the follwoing are set: PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'" PS_COMMAND,"$PATH_TO_PS waxco 'state uid ppid command command'" PS_FORMAT,"%s %d %d %s %n" Perhaps as Ton Voon stated - the second command needs to be changed to PS_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'" command without -c will list both executable and args, but with -c only lists the command. -sg > > It looks like the problem might be the "c" option to ps. Removing it > gives me the entire command line. Of course that's not really what we > want either, because it makes it non-trivial to match the -C parameter > to check_procs. > > It looks like it may be necessary to run ps more than once to handle > the "check_procs -C cmd -a args"; once to match "cmd" and then again > once per process to match "args". Perhaps this already happens. > Unfortunately the machine I have nagios installed on is having a fit > at the moment. It's also 60 miles away and it's snowing, so I won't > be going there to fix it today. I'll look into this a bit further once > I can get access to the machine again. > > James > -- From dviner at yahoo-inc.com Wed Jan 8 09:08:12 2003 From: dviner at yahoo-inc.com (Dave Viner) Date: Wed Jan 8 09:08:12 2003 Subject: [Nagiosplug-devel] check_procs problem In-Reply-To: Message-ID: how about these args for ps on freebsd: /bin/ps waxo 'state uid ppid ucomm command' the ucomm column according to the man page should print "ucomm name to be used for accounting" which on my system is the command name without any path. but command will still print out the full executable and arguments. dave -----Original Message----- From: nagiosplug-devel-admin at lists.sourceforge.net [mailto:nagiosplug-devel-admin at lists.sourceforge.net]On Behalf Of Subhendu Ghosh Sent: Wednesday, January 08, 2003 8:20 AM To: nagiosplug-devel at lists.sourceforge.net Subject: Re: [Nagiosplug-devel] check_procs problem On Wed, 8 Jan 2003, James Fidell wrote: > Quoting Subhendu Ghosh (sghosh at sghosh.org): > > > Does the following work on FreeBSD? (one liner from configure.in) > > > > ps waxco 'state command vsz rss uid user ppid' 2>/dev/null | egrep -i > > "^STAT +COMMAND +VSZ +RSS +UID +USER +PPID" > > Did you mean egrep -v ? If so, it only gives the command name, rather > than all the arguments, too (this is on FreeBSD 4.6). no - wanted "egrep -i" to see the header for the ps output. If the above succeeds, the follwoing are set: PS_RAW_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'" PS_COMMAND,"$PATH_TO_PS waxco 'state uid ppid command command'" PS_FORMAT,"%s %d %d %s %n" Perhaps as Ton Voon stated - the second command needs to be changed to PS_COMMAND,"$PATH_TO_PS waxo 'state uid ppid command'" command without -c will list both executable and args, but with -c only lists the command. -sg > > It looks like the problem might be the "c" option to ps. Removing it > gives me the entire command line. Of course that's not really what we > want either, because it makes it non-trivial to match the -C parameter > to check_procs. > > It looks like it may be necessary to run ps more than once to handle > the "check_procs -C cmd -a args"; once to match "cmd" and then again > once per process to match "args". Perhaps this already happens. > Unfortunately the machine I have nagios installed on is having a fit > at the moment. It's also 60 miles away and it's snowing, so I won't > be going there to fix it today. I'll look into this a bit further once > I can get access to the machine again. > > James > -- ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ Nagiosplug-devel mailing list Nagiosplug-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel From james at cloud9.co.uk Wed Jan 8 10:14:04 2003 From: james at cloud9.co.uk (James Fidell) Date: Wed Jan 8 10:14:04 2003 Subject: [Nagiosplug-devel] check_procs problem In-Reply-To: ; from dviner@yahoo-inc.com on Wed, Jan 08, 2003 at 09:07:42 -0800 References: Message-ID: <20030108181240.R22677@avarice.corp.cloud9.co.uk> Quoting Dave Viner (dviner at yahoo-inc.com): > how about these args for ps on freebsd: > > /bin/ps waxo 'state uid ppid ucomm command' > > the ucomm column according to the man page should print > "ucomm name to be used for accounting" > which on my system is the command name without any path. > but command will still print out the full executable and arguments. That looks like it would do the trick. James From noreply at sourceforge.net Wed Jan 8 12:04:12 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Wed Jan 8 12:04:12 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-664615 ] new check_imap w/ ssl switch and check_jabber plugin Message-ID: Patches item #664615, was opened at 2003-01-08 12:00 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=664615&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: new check_imap w/ ssl switch and check_jabber plugin Initial Comment: Solaris [7-9] Attached is the gnu diff -ruN of the latest nagios-plugins source and my own edited version. The only difference between the two sources is I have created my own dir in the original nagios-plugins source called contrib-brylon and it contains my check_jabber and check_imap code, headers and Makefile. Both plugins have a cmd line switch to use SSL and whether or not you would like the server to have a valid certificate. Use as you seem fit. Thanks. Any feedback would be appreciated as well. Also I will include next just the contrib-brylon dir tarzipped if the above is of no use to you Thanks. Bryan Loniewski ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=664615&group_id=29880 From brylon at jla.rutgers.edu Wed Jan 8 12:12:14 2003 From: brylon at jla.rutgers.edu (Bryan Loniewski) Date: Wed Jan 8 12:12:14 2003 Subject: [Nagiosplug-devel] new check_imap w/ SSL cmd line switch and check_jabber plugins In-Reply-To: Message-ID: I have submitted to the nagiosplug sourceforge site a patch and the directory used to make the patch of the modified check_imap plugin and the new check_jabber plugin I wrote. I have added 2 switches to the check_imap code, the first being use SSL and the second being whether or not to validate the server certificates. The check_jabber code has the same switches as the check_imap. Use the patch and/or code as you like. Any feedback would be appreciated. Thanks. Bryan Loniewski From noreply at sourceforge.net Wed Jan 8 13:34:03 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Wed Jan 8 13:34:03 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-664621 ] The actual dir used to create the patch above Message-ID: Patches item #664621, was opened at 2003-01-08 12:05 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=664621&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: The actual dir used to create the patch above Initial Comment: This tarzip is the dir that contains the check_jabber and check_imap code, headers and Makefile. Bryan ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=664621&group_id=29880 From levander at kull.cx Wed Jan 8 14:35:03 2003 From: levander at kull.cx (Johan Levander) Date: Wed Jan 8 14:35:03 2003 Subject: [Nagiosplug-devel] Hi people... Message-ID: <00a201c2b766$0baa69e0$5d0014ac@SE.INTRA> I've developed a Web based PHP script and we are using it to edit the hosts in a very simple manner... it uses PHP and MySQL to maintain the "hosts"... I know that there already is one written for just this purpose, but my expreince is that it is to complex... are u people interested in my own simple version? It uses only generic-hosts config and writes the following files: hosts.cfg services.cfg hostgroups.cfg It also reads those files for easy implemetation on your system (or in case of database failure =))) ) So, are u interested in this little script??? Kind regards - - - - - - - - - - - - - - - - - Johan Levander NOC-technician Utfors Bredband AB +46-(0)8-5270 2000 johan.levander at utfors.se http://www.utfors.se -------------- next part -------------- An HTML attachment was scrubbed... URL: From Nathan.Hand at defence.gov.au Wed Jan 8 16:14:04 2003 From: Nathan.Hand at defence.gov.au (Hand, Nathan) Date: Wed Jan 8 16:14:04 2003 Subject: [Nagiosplug-devel] SEC: UNCLASS: PATCH: backslash escape sequences in check_tcp Message-ID: <8923E6BD9093244F9BBE37DF2B8CAB3ADE9D66@c1clex02.cbr.defence.gov.au> I use this checkcommand to check a website behind a proxy (no other choice) define command { command_name check_http_via_proxy command_line $USER1$/check_tcp -H $ARG1$ -p $ARG2$ -s 'GET $ARG3$ HTTP/1.0\r\n' -e 'HTTP/1.0 200' } With a service looking like this define service { ... check_command check_http_via_proxy!myproxy!8080!http://myisp.com/mysite/ } The latest version of nagios-plugins doesn't grok the escape sequences. It sends out the backslashes and all! So the socket times out while the webserver patiently waits for the blank line. Here's a simple patch that adds escape sequence processing to check_tcp. I questioned whether to add this to the nagios-core config parser, but I decided to go with the principle of least change. <> -------------- next part -------------- A non-text attachment was scrubbed... Name: escape-chars-in-config.diff Type: application/octet-stream Size: 1991 bytes Desc: not available URL: From nagios-devel at jovianprojects.com.au Wed Jan 8 20:43:02 2003 From: nagios-devel at jovianprojects.com.au (Sam Tilders) Date: Wed Jan 8 20:43:02 2003 Subject: [Nagiosplug-devel] a patch for check_dns.c Message-ID: <200301091542.10468@goonumbla.ozonline.com.au> Hi, There are a couple of occasions where the check_dns plugin will segmentation fault. Around line 366 it checks the server to query parameter only if it wasn't specified. Also the query parameter around line 356. It wasn't possible to let check_dns use the local resolv.conf settings to do the look up. After negating these checks so they occured if the param was specified, the is_host function got called with argv[c] where c was always one higher than the number of parameters provided. Looked like something leftover from an old way of handling the parameters. I check the CVS version 1.5 and found that's what I had... so I've included a patch that seems to fix these issues. I did see some discussion of this in the archives, but I didn't see any patches that fixed it this way. Cheers. -- -- Sam Tilders sam at jovianprojects.com.au Cogito Ergo Sum - I think, therefore I am. (Descartes) ------------------------------------------------------- -- -- Sam -------------- next part -------------- A non-text attachment was scrubbed... Name: check_dns-fixparamschecking.patch Type: text/x-diff Size: 1410 bytes Desc: not available URL: From nagios-devel at jovianprojects.com.au Wed Jan 8 20:45:03 2003 From: nagios-devel at jovianprojects.com.au (Sam Tilders) Date: Wed Jan 8 20:45:03 2003 Subject: [Nagiosplug-devel] suggestion/patch for check_ntp.pl Message-ID: <200301091544.16287@goonumbla.ozonline.com.au> Hi, The attached patch is probably overkill. All it does is add the -n option to the call to ntpdc in check_ntp.pl. I've found the without the -n the time taken to look up the myriad of hostnames in the result causes the plugin to time out. It doesn't look to me that the script uses the names returned from ntpdc so the time spent looking them up is probably better left out. Cheers. -- -- Sam -------------- next part -------------- A non-text attachment was scrubbed... Name: check_ntp_pl-add-n.patch Type: text/x-diff Size: 675 bytes Desc: not available URL: From nagios-devel at jovianprojects.com.au Wed Jan 8 20:46:03 2003 From: nagios-devel at jovianprojects.com.au (Sam Tilders) Date: Wed Jan 8 20:46:03 2003 Subject: [Nagiosplug-devel] a check initscript plugin Message-ID: <200301091545.26296@goonumbla.ozonline.com.au> Hi, While I'm at it, maybe you'd like the following plugin contribution. The plugin is intented to return the status of a daemon run from an /etc/init.d initscript. It's compatible with the initscripts rpm provided with Mandrake 9 and Redhat 8 and I've also had it work on RH 6.2, 7.2 and 7.3. The script itself has some documentation in the comments. -- -- Sam -------------- next part -------------- A non-text attachment was scrubbed... Name: check_initstatus Type: application/x-shellscript Size: 3018 bytes Desc: not available URL: From lists at datux.nl Thu Jan 9 03:31:01 2003 From: lists at datux.nl (Edwin Eefting) Date: Thu Jan 9 03:31:01 2003 Subject: [Nagiosplug-devel] check_swap bug Message-ID: When a system doens't have swap enabled it reports: Swap ok - Swap used: -2147483648% (0 out of 0) when i have time i will fix this myself. (havent tried the cvs version though) -- //||\\ Edwin Eefting || || || DatuX - Linux solutions and innovations \\||// http://www.datux.nl From russell at quadrix.com Thu Jan 9 14:55:04 2003 From: russell at quadrix.com (Russell Scibetti) Date: Thu Jan 9 14:55:04 2003 Subject: [Nagiosplug-devel] New Plugin: check_status References: <1040122036.15711.57.camel@fr3nd> <3DFF8D94.3040201@quadrix.com> <1041318313.3e1141a924248@webmail.blandsite.org> Message-ID: <3E1DFD7B.4010409@quadrix.com> Here is that plugin that I mentioned a while back. It is run locally on a box to parse the status.log for HARD service or host problems and return an exit code and output depending on the # of problems found and the arguments provided. There are a lot of arguments, and my concern is that people might not understand some of what the plugin is doing. I tried to explain most of it in the --help output, but if there are any questions, please email me (russell at quadrix.com). If this could be added to the contrib section of the nagiosplug tree (assuming you think its ok), I'd appreciate it. Thanks. Russell Scibetti Brandon Knitter wrote: >Please submit it to the project, and to the mailing list. If it takes a while >to be intergrated, I'd be very interested in making use of this for a command >line interface. > >Thanks, > -- Russell Scibetti Quadrix Solutions, Inc. http://www.quadrix.com (732) 235-2335, ext. 7038 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: check_status.pl URL: From noreply at sourceforge.net Fri Jan 10 08:29:05 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Jan 10 08:29:05 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-665715 ] WARNING from check_snmp without -w and -c Message-ID: Bugs item #665715, was opened at 2003-01-10 05:15 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=665715&group_id=29880 Category: Argument proccessing Group: Release (specify) Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: WARNING from check_snmp without -w and -c Initial Comment: I try the command "check_snmp -H testhost -o system.sysUpTime.0" and get a WARNING state. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=665715&group_id=29880 From jeremy+nagios at UnderGrid.net Sat Jan 11 11:05:04 2003 From: jeremy+nagios at UnderGrid.net (Jeremy T. Bouse) Date: Sat Jan 11 11:05:04 2003 Subject: [Nagiosplug-devel] Re: [Nagios-devel] Re: Bug in check_dns plugin In-Reply-To: <20030111144939.34D7B13118@netcom1.netcom.com> References: <20030111144939.34D7B13118@netcom1.netcom.com> Message-ID: <20030111190341.GB12664@UnderGrid.net> Although I think this should be in the plugin-devel list I'll glue the two threads together... Another issue with the check_dns and check_dig plugins is their dependence on the BIND nslookup and dig commands which in themselves have some issues... Specifically if you try to have them do reverse lookups... Nslookup if given an IPv4 address will properly convert it to the in-addr.arpa zone and do the lookup fine, dig will not... Now as I'm working on IPv6 support if you give nslookup an IPv6 address it will improperly try to convert it to a bit-string notated ip6.arpa address which should be a nibble-mode notated ip6.arpa address per the current RFCs and dig again can't handle it at all just like IPv4... I see this as a problem that any plugin will encounter when we have to rely on shell commands to do the actual work for us and a caution to look at the shell commands responses before thinking there is an issue in a given plugin... Jeremy On Sat, Jan 11, 2003 at 06:49:39AM -0800, Mike Harding wrote: > > Whoops, the man page is confusing, I retract my error statement. I am > using FreeBSD and the system nslookup won't query an authoritative > name server properly, but the bind 9 one will. I am using bind 9 but > I still have the bind 8 nslookup in my path... > > Date: 9 Jan 2003 19:20:41 -0800 > From: Mike Harding > > > the 'nslookup' command apparently needs a '-' before the server name > or address, this is missing in the code. I found this when debugging > a Authoritative server, where I needed to specify the server. I use > freebsd but I checked a linux man page and apparently linux needs the > '-' also... > > - Mike Harding > > --- check_dns.c~ Thu Nov 14 17:04:51 2002 > +++ check_dns.c Thu Jan 9 19:15:55 2003 > @@ -88,7 +88,7 @@ > } > > /* get the command to run */ > - asprintf (&command_line, "%s %s %s", NSLOOKUP_COMMAND, query_address, dns_server); > + asprintf (&command_line, "%s %s -%s", NSLOOKUP_COMMAND, query_address, dns_server); > > alarm (timeout_interval); > time (&start_time); > > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > Nagios-devel mailing list > Nagios-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagios-devel From noreply at sourceforge.net Mon Jan 13 07:03:05 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Mon Jan 13 07:03:05 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-666952 ] check_http needs an option to allow regex to span newlines Message-ID: Patches item #666952, was opened at 2003-01-12 22:57 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=666952&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: John Sellens (jsellens) Assigned to: Nobody/Anonymous (nobody) Summary: check_http needs an option to allow regex to span newlines Initial Comment: I want to check a web page that has a number of status entries for various servers - I'd like to check a regular expression that contains all those servers, but they are on multiple lines. check_http.c sets REG_NEWLINE which means that regular expressions may not span newlines. This means that, in my case, I must check the web page multiple times. Here is a patch that adds an option -l / --linespan that turns off REG_NEWLINE, thereby allowing regular expressions to span newlines, and allowing me to check only once in my tests. I've also removed some duplication of error messages if HAVE_REGEX_H is not defined, hopefully making the code slightly clearer. This is a patch against check_http.c version 1.13 (current in CVS). Cheers! John jsellens at generalconcepts.com ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=666952&group_id=29880 From noreply at sourceforge.net Mon Jan 13 11:56:05 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Mon Jan 13 11:56:05 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-667281 ] check_disk_smb doesn't parse correctly shares and username Message-ID: Bugs item #667281, was opened at 2003-01-13 18:49 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=667281&group_id=29880 Category: Parsing problem Group: None Status: Open Resolution: None Priority: 5 Submitted By: Ambrogio De Lorenzo (delorea) Assigned to: Nobody/Anonymous (nobody) Summary: check_disk_smb doesn't parse correctly shares and username Initial Comment: I found parsing error of the arguments in the check_disk_smb. Microsoft permit to have shares that ends with a $ but in the parsing of the share parameter the $ is not considered to be a valid character. In the same way the user parameter don't parse correctly because a user can be of this type: domain\user. The \ char is not accepted. I don't know if ther is already a patch. If don't, I can modify this script to correct this problems. Tnx Ambrogio De Lorenzo ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=667281&group_id=29880 From lac01 at web.de Mon Jan 13 22:24:02 2003 From: lac01 at web.de (Andreas Baetz) Date: Mon Jan 13 22:24:02 2003 Subject: [Nagiosplug-devel] Plugin to check SMB shares Message-ID: <200301140623.HAA17959@mail.herma.de> Hi, I have written a nagios plugin in Perl that checks for the availability of shares and printers an Windows or Samba Servers using smbclient. It uses utils.pm from sghosh and is based on an example plugin code from ??. (If someone knows the author of the example code, please tell me or include the credits yourself). I first postet this mail in nagios-devel, but I feel this list is more appropriate. There is a plugin called "check_disk_smb", which also checks smb shares, but it is aimed at checking the free space on one share, whereas my check tests the existence of multiple shares/printers in one call. I'm using it for a while now in production. If you like, you can verify/review/modify/test it, and possibly include it in the main plugin distribution, if there is an interest. License is same as perl. Andreas Baetz Here it comes (check_smb_shares.pl): ####################################################### #!/usr/bin/perl -w # Copyright 2003 Andreas Baetz (andreas.baetz at herma.de) # License: same licence as Perl itself # this script checks for smb shares on a windows server # the shares to check for are given with parameter "check" # and can be Disks or Printers, depending on Parameter "type" # type maybe "Disk" or "Printer" # Return codes: # "OK" if all tested shares are there # "WARNING" if there are smbclient errors # "CRITICAL"if at least one share is not listed at the queried server # "UNKNOWN" if it doesn't get a response from the server within timeout # example: # check_smbshares.pl -H server -D Domain -U user -P Password -T type -C share1,share2 # Caution: # smbclient doesn't display share names with a length of more than 12 characters #$Log: check_smbshares.pl,v $ #Revision 1.1 2003/01/09 13:07:38 baz #Initial revision # #It's the script's exit code that Netsaint interprets as a status, viz (from # utils.pm): # 'DEPENDENT'=>4, # 'UNKNOWN'=>3, # 'OK'=>0, # 'WARNING'=>1, # 'CRITICAL'=>2 # Anything you send to STDOUT (e.g. prints) gets added as explanatory message # text when run from Netsaint (thus everything except help/usage should be # short). # # If you will ever share your plugin (or just as good coding style, anyway), # there are a few other conventions to follow though. There is a FAQ about # this on the website somewhere, but the easiest way is probably to take an # existing plugin and just modify the "business logic" (and the help text!). # There is a also a little module, utils.pm, which has a few convenience # functions but is mainly useful for saying: # exit $ERRORS{'CRITICAL'}; # instead of having to memorise the status codes. (Makes for much more # readable code!) # use vars qw($PROGNAME $runtimedir); BEGIN { $PROGNAME=$0; $runtimedir='.'; if ($0 =~ m/^(.*?)[\/\\]([^\/\\]+)$/) { $runtimedir = $1; $PROGNAME = $2; } } use strict; use lib $runtimedir; use utils qw($TIMEOUT %ERRORS &print_revision &support &usage); use Getopt::Long; my ($opt_C,$opt_H,$opt_t,$opt_P,$opt_U,$opt_D,$opt_T); Getopt::Long::Configure('bundling', 'no_ignore_case'); GetOptions ("V|version" => \&version, "h|help" => \&help, "H|host=s" => \$opt_H, "U|user=s" => \$opt_U, "P|password=s" => \$opt_P, "D|domain=s" => \$opt_D, "T|type=s" => \$opt_T, "C|check=s" => \$opt_C, "t|timeout=i" => \$opt_t); # ??? Maybe do some bounds checking on params here, with # exit $ERRORS{'UNKNOWN'} if they don't make sense. $opt_t = 10 unless defined $opt_t; # Set a default $opt_T = 'Disk' unless defined $opt_T; # Set a default $opt_D = '' unless defined $opt_D; # Set a default $opt_C = '' unless defined $opt_C; # Set a default $opt_U = 'nagios' unless defined $opt_U; # Set a default $opt_P = '' unless defined $opt_P; # Set a default help() unless $opt_H; # Required param help() unless $opt_D; # Required param help() unless $opt_P; # Required param help() unless $opt_C; # Required param #Just in case of problems, let's not hang NetSaint $SIG{'ALRM'} = sub { print "No Answer from Host\n"; exit $ERRORS{"UNKNOWN"}; }; alarm $opt_t; &queryserver($opt_H,$opt_U,$opt_P,$opt_D,$opt_T,$opt_C); alarm 0; ###################################################################### ############## This subroutine does the actual checking ############## ###################################################################### sub queryserver { # asks a server about it's shares and returns the nagios status # arg1: server # arg2: user # arg3: password # arg4: domain # arg5: Type # arg5: checks my @found; my $server=shift; my $user=shift; my $password=shift; my $domain=shift; my $type=shift; my $checks=shift; if (!$checks) { print "Error: to few parameters: Host, Password, Checks needed"; exit $ERRORS{'UNKNOWN'}; } my @checks=split(',',$checks); my $cmd="/usr/bin/smbclient -L $server -U $user%$password -W $domain"; my $res=open IN,"$cmd 2>&1 |"; if (!$res) { print "Error: cannot run command $cmd\n"; exit $ERRORS{'UNKNOWN'}; } while () { s/\n//g; # something wrong: if ((/session setup failed/i) || (/Connection to .* failed/i)) { close IN; print "$_\n"; exit $ERRORS{'WARNING'}; } # print ">$_<\n"; if (/^\s+(\S+)\s+$type/g) { push (@found,$1); } } close IN; my $problem=0; my $next=0; foreach (@checks) { my $check=$_; my $ok=0; foreach (@found) { my $found=$_; my $lookfor=$found; my $checkfor=$check; $lookfor=~s/\$/#/g; $checkfor=~s/\$/#/g; if ($checkfor=~/^$lookfor$/i) { print " - " if ($next++); print "$found: exists"; $ok=1; } } if (!$ok) { print " - " if ($next++); print "$check: missing"; $problem=1; } } print "\n"; if ($problem) { exit $ERRORS{'CRITICAL'}; } else { exit $ERRORS{'OK'}; } } ###################################################################### sub print_help() { print_revision($PROGNAME,'$Revision: 1.1 $ '); print_usage(); print < I've got a simple perl script for checking CPU temp and any other variable output by the lm_sensors package. But it doesn't really conform to the Nagios plugin guidelines. I'd be really happy if anyone was interested in making it conform. Unfortunately, I don't have the time to do this. Feel free to use it anyway. The general usage is: check_sensors .... 'field1' is the name of the field output by 'sensors'. 'disp1' is what to print back to nagios as the name of this field. 'warn1' is an expression that defines when a warning will be generated for this field 'crit1' is an expression that defines when a critical will be generated for this field The 'warn1' and 'crit1' values can be numbers e.g. '35.5' or expressions e.g. '<20'. No attempt is made to ensure the warning and critical expressions are logically consistent. Output is a single line with the values of each of the sensor checks requested, and an indication if they are above the critical or warning thresholds. An example: check_sensors via686a-isa-0c00 'CPU Temp' 'CPU Temp' 38 42 'SYS Temp' 'SYS Temp' 30 35 'CPU core' 'CPU core' '<=1.80' '<1.79' 'CPU Fan' 'CPU Fan' '<3500' '<3000' ... Generates a warning if CPU temp >=38, and critical if >=42 ... Generates a warning if SYS temp >=30, and critical if >=35 ... Generates a warning if CPU core V <=1.80, and critical if <1.79 ... Generates a warning if CPU fan RPM <3500, and critical if <3000 The output generated for the above would be something like: CPU core=1.67(C<1.79):CPU Fan=5625:SYS Temp=30.1:CPU Temp=34.3: An obvious extension is to use nagios performance data logging output format. But alas, no time ;-} Feel free to email with questions. (Please - no flames on my poor Perl coding - I know it's bad :-) Richard ---------------- check_sensors #!/usr/bin/env perl # # check sensors according to lm_sensors output # # (c)2003 Richard Colley # License: GPL v2 # #### Some paths $SENSOR_PROG="/usr/local/bin/sensors"; ################### $progname=$0; $RC_OK=0; $RC_WARN=1; $RC_CRITICAL=2; sub usage { my ($msg) = shift; print "$msg\n"; print "Usage: $progname ...\n"; print "\twhere:\t corresponds to an entry in /etc/sensors.conf\n"; print "\t\t is the name of a field output by 'sensors'\n"; print "\t\t is a string to use while displaying this field\n"; print "\t\t is the warning threshold value of the field output by 'sensors'\n"; print "\t\t is the critical threshold value of the field output by 'sensors'\n"; print "\t\tmultiple triples are permitted\n"; print "\n\t\tNB: a threshold value can be optionally prefixed by an operator character.\n"; print "\t\tValid operators are currently '>', '<', '==', '>=', '<='. The default is '>='.\n"; print "\t\t\te.g. if the warn threshold is <30, then a warning is raised if the value is less than 30.\n"; print "\t\tNo attempt is made to ensure the resultant logic is sensible\n"; exit $RC_CRITICAL; } if( $#ARGV < 4 ) { usage "Not enough args"; } $chip=$ARGV[0]; shift @ARGV; %fields={}; while( $#ARGV >= 3 ) { $i=0; $field=$ARGV[$i]; $i++; $fieldDisp=$ARGV[$i]; $i++; $ARGV[$i] =~ /^([=<>]*)([0-9.]+)/ or usage "Invalid warning threshold format: $ARGV[$i]"; $warn = $2; $warnop = $1 ne "" ? $1 : ">="; $i++; $ARGV[$i] =~ /^([=<>]*)([0-9.]+)/ or usage "Invalid critical threshold format: $ARGV[$i]"; $critical = $2; $criticalop = $1 ne "" ? $1 : ">="; $i++; $config{ $field } = [ $fieldDisp, $warn, $warnop, $critical, $criticalop ]; shift @ARGV; shift @ARGV; shift @ARGV; shift @ARGV; } sub eval_simple { my( $value, $op, $threshold ) = @_; eval "$value $op $threshold"; } $output=""; $retcode = $RC_OK; open( SENSOR, "$SENSOR_PROG $chip|" ) or usage "Failed to run $SENSOR_PROG\n"; while( ) { if( /^([^:]+)[^0-9]*([0-9.]+)/ ) { $field = $1; $value = $2; if( defined( $config{ $field } ) ) { $fieldDisp = ${$config{ $field }}[0]; $warn = ${$config{ $field }}[1]; $warnop = ${$config{ $field }}[2]; $critical = ${$config{ $field }}[3]; $criticalop = ${$config{ $field }}[4]; $output .= "$fieldDisp=$value"; if( eval_simple( $value, $criticalop, $critical ) ) { $output .= "(C$criticalop$critical)"; $retcode = $RC_CRITICAL; } elsif( $retcode == $RC_OK and eval_simple( $value, $warnop, $warn ) ) { $output .= "(W$warnop$warn)"; $retcode = $RC_WARN; } $output .= ";"; } } } close( SENSOR ); print "$output\n"; exit $retcode; --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.443 / Virus Database: 248 - Release Date: 10/01/2003 From Darren.Gamble at sjrb.ca Wed Jan 15 10:37:09 2003 From: Darren.Gamble at sjrb.ca (Darren Gamble) Date: Wed Jan 15 10:37:09 2003 Subject: [Nagiosplug-devel] Bug: -g option with check_nntp Message-ID: <078EC26E265CD411BD9100508BDFFC861BCBB6FB@shawmail02> Good day, I sent this message last summer regarding a bug with check_nntp. I've just installed 1.3b1, and this problem still exists. I opened a bug report back then on the project page... #587026. Could someone please commit a fix? Thanks! ============================ Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 > -----Original Message----- > From: Darren Gamble [mailto:Darren.Gamble at sjrb.ca] > Sent: Thursday, July 25, 2002 3:02 PM > To: nagiosplug-devel at lists.sourceforge.net > Subject: [Nagiosplug-devel] Bug: -g option with check_nntp > > > Good day, > > I recently downloaded a CVS copy of the plugins. > > There's a problem with the -g option with the check_nntp > plugin; the option > is implemented but the name of the option isn't included in > the list of > "known options". So, using the -g option causes the plugin > to spit out its > usage and die. > > I'm not too familiar with the functions used by all of the > plugins to parse > command parameters; I got my copy to work although I am not > sure if I did it > properly. So, it's probably best that the maintainer look at it. > > Thanks, > > ============================ > Darren Gamble > Planner, Regional Services > Shaw Cablesystems GP > 630 - 3rd Avenue SW > Calgary, Alberta, Canada > T2P 4L4 > (403) 781-4948 > > > > ------------------------------------------------------- > This sf.net email is sponsored by: Jabber - The world's > fastest growing > real-time communications platform! Don't just IM. Build it in! > http://www.jabber.com/osdn/xim > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > From noreply at sourceforge.net Wed Jan 15 20:35:03 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Wed Jan 15 20:35:03 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Support Requests-668778 ] check_ircd - invalid argument Message-ID: Support Requests item #668778, was opened at 2003-01-15 14:51 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=668778&group_id=29880 Category: None Group: None Status: Open Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: check_ircd - invalid argument Initial Comment: Any ideas what im doing wrong here libexec]# ./check_ircd -v -H xxx.xxx.xxx.xxx MAIN(debug): hostname = something.host.name MAIN(debug): binding to remote host: xxx.xxx.xxx.xxx - > 6667 -> something.host.name IRCD UNKNOWN: Could not connect socket (Invalid argument) something.host.name and xxx.xxx.xxx.xxx are valid hostnames and ips just edited out in this post I get the same (IRCD UNKNOWN: Could not connect socket (Invalid argument)) as status when it is run by nagios. ./check_ircd -V check_ircd (nagios-plugins 1.3.0-beta2) 1.3 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. This is when it is run in its unmodified form installed from source and compiled, or usign an rpm build Thanks in advance for any advice. Sarah ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=668778&group_id=29880 From noreply at sourceforge.net Thu Jan 16 22:08:03 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Jan 16 22:08:03 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-669585 ] check_procs returns Unable to read output Message-ID: Bugs item #669585, was opened at 2003-01-16 21:51 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=669585&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: check_procs returns Unable to read output Initial Comment: check_procs on Tru64 Unix 5.1A returns Unable to read output. pmarnold at subcorp.com.au ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=669585&group_id=29880 From noreply at sourceforge.net Sat Jan 18 15:49:02 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Sat Jan 18 15:49:02 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Support Requests-669609 ] Newbie: Where do I get the last stable release? Message-ID: Support Requests item #669609, was opened at 2003-01-17 00:00 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=669609&group_id=29880 Category: None Group: None Status: Open Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Newbie: Where do I get the last stable release? Initial Comment: Hello @, I'm new to sourceforge and perhaps don't understand the systematic in it. Where do I find the last stable release of the plugins. Has anybody compiled the plugins for hp- ux 10.20/ 11.00 and solaris 2.6/ 7/ 8? Any help which can be offered is greatly appreciated. Best regards Markus ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=669609&group_id=29880 From noreply at sourceforge.net Sat Jan 18 15:49:03 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Sat Jan 18 15:49:03 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-670385 ] NSClient segmentation fault Message-ID: Bugs item #670385, was opened at 2003-01-18 17:28 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=670385&group_id=29880 Category: Embedded Perl failure Group: Release (specify) Status: Open Resolution: None Priority: 5 Submitted By: Wilson Pires Jr (wpires) Assigned to: Nobody/Anonymous (nobody) Summary: NSClient segmentation fault Initial Comment: Hello all! The plugin check_nt always return the statement 'segmentation fault'. It doesn mind if I use CPULOAD, USEDDISKSPACE, UPTIME or any other option. I get the same statement 'segmentation fault' if I use ./check_nt --help I am using Nagios 1.0, nagiosplugins-1.3.0b2 on Red Hat 7.2. The NSClient version is 1.07.1 The check_nt doesn't come with the plugins package anymore, so I've got the Distrib-1.07.1.zip file in the http://nsclient.ready2run.nl/ web site and unzip in a Windows 2000 station. Then I transfered the check_nt binary file to Red Hat via ftp. Can somebody give me a tip to workaround this problem? Thanks ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=670385&group_id=29880 From noreply at sourceforge.net Sat Jan 18 15:49:03 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Sat Jan 18 15:49:03 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Support Requests-670434 ] NSClient segmentation fault Message-ID: Support Requests item #670434, was opened at 2003-01-18 18:30 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=670434&group_id=29880 Category: Install Problem (example) Group: v1.0 (example) Status: Open Priority: 5 Submitted By: Wilson Pires Jr (wpires) Assigned to: Nobody/Anonymous (nobody) Summary: NSClient segmentation fault Initial Comment: Hello guys! My check_nt from NSClient plugin always give me the 'segmentation fault' statement as output, even if i execute just './check_nt --h', './check_nt --help' or './check_nt' I've got the zip file from http://nsclient.ready2run.nl/, then I unziped it on my Windows 2000 machine and transfered to my Red Hat 7.2 via ftp. Is there any other way to do it? Regards, Wilson ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=670434&group_id=29880 From jeremy+nagios at UnderGrid.net Tue Jan 21 09:39:03 2003 From: jeremy+nagios at UnderGrid.net (Jeremy T. Bouse) Date: Tue Jan 21 09:39:03 2003 Subject: [Nagiosplug-devel] Am I missing it? Message-ID: <20030121173702.GA26250@UnderGrid.net> Maybe I've miss'd it, in which case I just need a point in the right direction but has someone designed a plugin similar to check_procs however instead you're giving it the number of processes you expect to be running? For instance I have daemonX that I know when operating properly will have atleast 3 processes running at any given time... If it drops below 3 I want it to trigger as a critical error which I can use to then trigger an event handler to try and remedy the situation (in this case restarting the process works fine)... Problem is the check_proces currently only works if the number of processes exceeds the warning or critical thresholds not goes below... I guess a simple reworking to add another option to check_procs which reverses the behavior could be done simply enough and I may just do that... However if there is such a beast, why reinvent the wheel... Jeremy From nagios-devel at jovianprojects.com.au Tue Jan 21 14:29:01 2003 From: nagios-devel at jovianprojects.com.au (Sam Tilders) Date: Tue Jan 21 14:29:01 2003 Subject: [Nagiosplug-devel] Am I missing it? In-Reply-To: <20030121173702.GA26250@UnderGrid.net> References: <20030121173702.GA26250@UnderGrid.net> Message-ID: <200301220926.54814@goonumbla.ozonline.com.au> On Wed, 22 Jan 2003 04:37, Jeremy T. Bouse wrote: > Maybe I've miss'd it, in which case I just need a point in the > right direction but has someone designed a plugin similar to check_procs > however instead you're giving it the number of processes you expect to > be running? I use something like this. check_procs already does it. check_procs -w 6: -c 3: -C daemonX will warn if there are less than 6 daemonX processes running and critical if there are less than 3. Isn't this what you meant? -- -- Sam From dviner at yahoo-inc.com Tue Jan 21 14:31:06 2003 From: dviner at yahoo-inc.com (Dave Viner) Date: Tue Jan 21 14:31:06 2003 Subject: [Nagiosplug-devel] check_mysql_replication status Message-ID: Hi, I submitted a new check_mysql_replication program a little while ago (cf. http://sourceforge.net/mailarchive/message.php?msg_id=2661705). I looked in cvs, and it doesn't appear in the contrib section yet, although I think it's met with approval thus far. How does a new plugin get added to contrib/ in cvs? Is there anything I can do to improve the plugin? thanks dave From dviner at yahoo-inc.com Wed Jan 22 09:57:09 2003 From: dviner at yahoo-inc.com (Dave Viner) Date: Wed Jan 22 09:57:09 2003 Subject: [Nagiosplug-devel] check_http minimum size patch Message-ID: Hi, Here's a patch to check_http that allows the user to specify a minimum size required for the page requested. It implements a -m (--min) option to obtain the information from the command line. It checks the size of the page (not HTTP headers) against the specified size. Let me know what you think. Thanks Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: http.patch Type: application/octet-stream Size: 2753 bytes Desc: not available URL: From noreply at sourceforge.net Wed Jan 22 21:07:02 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Wed Jan 22 21:07:02 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-672841 ] utils.pm patch to read Nagios config file Message-ID: Patches item #672841, was opened at 2003-01-22 16:48 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=672841&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Steven Grimm (koreth) Assigned to: Nobody/Anonymous (nobody) Summary: utils.pm patch to read Nagios config file Initial Comment: This patch adds a new externally accessible subroutine "config_value" to utils.pm, so scripts that want to read the Nagios config file (e.g. to find out the location of the command file) can do so without knowing the config file's location. Examples: @cfg_files = &utils::config_value('cfg_file'); $resource_file = &utils::config_value('resource_file'); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=672841&group_id=29880 From noreply at sourceforge.net Wed Jan 22 21:07:02 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Wed Jan 22 21:07:02 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-672898 ] check_mysql patch Message-ID: Patches item #672898, was opened at 2003-01-22 22:17 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=672898&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jason Aragorn Tobias Lunn (galactus) Assigned to: Nobody/Anonymous (nobody) Summary: check_mysql patch Initial Comment: check_mysql.c as it appears in nagios-plugins-1.3.0-beta2.tar.gz wants the following patch to make it stop segfaulting 35d34 < int check_disk (int usp, int free_disk); 210,211c209,211 < if (is_intnonneg (argv[c])) < db_port = atoi (argv[c++]); --- > if (argc > c) > if (is_intnonneg (argv[c])) > db_port = atoi (argv[c++]); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=672898&group_id=29880 From noreply at sourceforge.net Thu Jan 23 20:23:04 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Jan 23 20:23:04 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-673771 ] New check_file_age plugin submission Message-ID: Patches item #673771, was opened at 2003-01-23 18:57 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=673771&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Steven Grimm (koreth) Assigned to: Nobody/Anonymous (nobody) Summary: New check_file_age plugin submission Initial Comment: This plugin checks a file to make sure it's been updated recently. Useful for monitoring servers that periodically update a status file, or for making sure a log is being written to as expected. The plugin can also optionally make sure the file is longer than a minimum size. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=673771&group_id=29880 From Markus.Kraus.hp at sysde.eads.net Fri Jan 24 05:16:02 2003 From: Markus.Kraus.hp at sysde.eads.net (Kraus, Markus) Date: Fri Jan 24 05:16:02 2003 Subject: [Nagiosplug-devel] Bug in check_disk plugin ?! Message-ID: Hello @, after getting wrong warning messages from check_disk I' ve compared different versions of it. I get a warning/ critical status when I have more than xy% free diskspace!!! After reading check_disk --help the confusion is complete. Extract from the actual plugins version 1.3.0 beta 2: -w, --warning=INTEGER Exit with WARNING status if less than INTEGER kilobytes of disk are free -w, --warning=PERCENT% Exit with WARNING status if more than PERCENT of disk space is free ^^^^^^ -c, --critical=INTEGER Exit with CRITICAL status if less than INTEGER kilobytes of disk are free -c, --critical=PERCENT% Exit with CRITCAL status if more than PERCENT of disk space is free ^^^^^^ In an older version of the plugins it's quite vice versa for the percental statement. I never be worry about having to much diskspace ;-) Best regards Markus From noreply at sourceforge.net Fri Jan 24 16:20:03 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Fri Jan 24 16:20:03 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-673863 ] check_by_ssh memory corruption fix Message-ID: Patches item #673863, was opened at 2003-01-23 23:48 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=673863&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Steven Grimm (koreth) Assigned to: Nobody/Anonymous (nobody) Summary: check_by_ssh memory corruption fix Initial Comment: check_by_ssh wasn't properly allocating memory for its list of services, which lead to random odd behavior especially with long lists of services. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=673863&group_id=29880 From stotz at logo.de Sun Jan 26 14:06:13 2003 From: stotz at logo.de (Christoph Stotz) Date: Sun Jan 26 14:06:13 2003 Subject: [Nagiosplug-devel] check_http: Socket timeout after 10 seconds (but webserver is up! ) Message-ID: Hello, I am experiencing a strange behaviour regarding check_http. I am trying to check multiple virtual Webs being hosted on the same machine. It seems, that first web (I call it first, because it has the lowest IP even if that does not should really matter) is checked without any problems, but any following times out. <---cut here---><---cut here---><---cut here---><---cut here---><---cut here---> spaehfix:/usr/local/nagios # ./libexec/check_http -H A.B.C.D HTTP ok: HTTP/1.1 200 OK - 0.212 second response time |time= 0.212 spaehfix:/usr/local/nagios # ./libexec/check_http -H E.F.G.H Socket timeout after 10 seconds spaehfix:/usr/local/nagios # ./libexec/check_http -H I.J.K.L Socket timeout after 10 seconds <---cut here---><---cut here---><---cut here---><---cut here---><---cut here---> and so on. All webs are on the very same server within the same identical IIS instance (if "use Apache" pops up in your mind: I have the same problem with an Apache Web as well :o). The difference seems to be the way a request like the following one is served: <---cut here---><---cut here---><---cut here---><---cut here---><---cut here---> spaehfix:/usr/local/nagios # telnet A.B.C.D 80 Trying A.B.C.D... Connected to A.B.C.D. Escape character is '^]'. GET / HTTP/1.0 [CR+LF][CR+LF] <---cut here---><---cut here---><---cut here---><---cut here---><---cut here---> On the first Web, this request returns the whole HTML Header- and Content-blabla for the "/"-Page. On all the others this request just returns nothing within 10 (or more) seconds. I believe this is caused by sending an "mixed-old-style" HTTP-Request. Infact on the Apache I get a proper error message logged, saying that my request does not conform to RFC2616 section 14.23. Not that section talks about specifying the host within the request. Error Message in Apache (so other people may find this article): <---cut here---><---cut here---><---cut here---><---cut here---><---cut here---> [Sun Jan 26 20:45:51 2003] [error] [client A.B.C.D] client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23): / <---cut here---><---cut here---><---cut here---><---cut here---><---cut here---> in IIS I only see <---cut here---><---cut here---><---cut here---><---cut here---><---cut here---><---cut here---> 2003-01-26 21:34:21 A.B.C.D - E.F.G.H GET /Default.htm - 200 0 18 206718 80 HTTP/1.0 - - - <---cut here---><---cut here---><---cut here---><---cut here---><---cut here---><---cut here---> (even if this looks like the check_http succeeded - it did not. It timed out). So this whole situation makes me believe, that there is something either wrong in check_http or unsupported. The fact, that the very first web on the IIS works fine and all the other does not makes me believe, that this is up to handling virtual hosts in the http-Request (FYI: all those Web own their own IP-Address). I also tried out running the check_http using the "--verbose" option. This does not make any difference: <---cut here---><---cut here---><---cut here---><---cut here---><---cut here---><---cut here---> spaehfix:/usr/local/nagios/libexec # ./check_http --verbose -H E.F.G.H Socket timeout after 10 seconds <---cut here---><---cut here---><---cut here---><---cut here---><---cut here---><---cut here---> And if you think, that this might be a network problem, have a look to tcpdump's output: <---cut here---><---cut here---><---cut here---><---cut here---><---cut here---><---cut here---> spaehfix:~ # tcpdump src E.F.G.H or dst E.F.G.H -i eth0.3128 tcpdump: listening on eth0.3128 22:47:26.527226 E.F.G.H.42125 > A.B.C.D.http: S 4032238030:4032238030(0) win 5840 (DF) 22:47:26.527399 A.B.C.D.http > E.F.G.H.42125: S 702361681:702361681(0) ack 4032238031 win 8760 (DF) 22:47:26.527432 E.F.G.H.42125 > A.B.C.D.http: . ack 1 win 5840 (DF) 22:47:26.527654 E.F.G.H.42125 > A.B.C.D.http: P 1:17(16) ack 1 win 5840 (DF) 22:47:26.703234 A.B.C.D.http > E.F.G.H.42125: . ack 17 win 8744 (DF) 22:47:26.703270 E.F.G.H.42125 > A.B.C.D.http: P 17:102(85) ack 1 win 5840 (DF) 22:47:27.240061 E.F.G.H.42125 > A.B.C.D.http: P 17:102(85) ack 1 win 5840 (DF) 22:47:27.241273 A.B.C.D.http > E.F.G.H.42125: . ack 102 win 8659 (DF) 22:47:36.520323 E.F.G.H.42125 > A.B.C.D.http: F 102:102(0) ack 1 win 5840 (DF) 22:47:36.520495 A.B.C.D.http > E.F.G.H.42125: . ack 103 win 8659 (DF) <---cut here---><---cut here---><---cut here---><---cut here---><---cut here---><---cut here---> I believe this means, that there is no problem in allocating the network socket. So, is there somebody around experiencing the very same problem and maybe has an idea on how to solve it (other then by using the check_tcp only) ? Thanks a lot for your help! Christoph Stotz logo: GmbH From karl at debisschop.net Sun Jan 26 21:28:01 2003 From: karl at debisschop.net (Karl DeBisschop) Date: Sun Jan 26 21:28:01 2003 Subject: [Nagiosplug-devel] check_http: Socket timeout after 10 seconds (but webserver is up! ) In-Reply-To: References: Message-ID: <1043645168.7238.40.camel@localhost.localdomain> On Sun, 2003-01-26 at 17:02, Christoph Stotz wrote: > Hello, > > I am experiencing a strange behaviour regarding check_http. I am trying to > check multiple virtual Webs being hosted on the same machine. It seems, that > first web (I call it first, because it has the lowest IP even if that does > not should really matter) is checked without any problems, but any following > times out. > > <---cut here---><---cut here---><---cut here---><---cut here---><---cut > here---> > spaehfix:/usr/local/nagios # ./libexec/check_http -H A.B.C.D > HTTP ok: HTTP/1.1 200 OK - 0.212 second response time |time= 0.212 > spaehfix:/usr/local/nagios # ./libexec/check_http -H E.F.G.H > Socket timeout after 10 seconds > spaehfix:/usr/local/nagios # ./libexec/check_http -H I.J.K.L > Socket timeout after 10 seconds > <---cut here---><---cut here---><---cut here---><---cut here---><---cut > here---> > > and so on. All webs are on the very same server within the same identical > IIS instance (if "use Apache" pops up in your mind: I have the same problem > with an Apache Web as well :o). The difference seems to be the way a request > like the following one is served: Can you try the same command with the -I flag instead of -H. Still just a guess here, but remember the '-H' sets the hostname, whereas '-I' does not. The server should either be successful or give a 400, so it's for from a sure thing. But maybe worth a try. -- Karl From noreply at sourceforge.net Sun Jan 26 22:04:03 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Sun Jan 26 22:04:03 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-675018 ] configure fails to find libpq and a PS version on UnixWare Message-ID: Bugs item #675018, was opened at 2003-01-26 12:36 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=675018&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Larry Rosenman (ler) Assigned to: Nobody/Anonymous (nobody) Summary: configure fails to find libpq and a PS version on UnixWare Initial Comment: The 1.3.0-beta2 tarball doesn't find PQsetdblogin even though the correct path (/usr/local/pgsql) was specified (PostgreSQL version 7.3.1). And it fails to find a PS string that works (it's unclear to me what it is looking for). Also, it HANGS checking ping syntax. I can supply a shell account for you to use, also full documentation is available at http://www.lerctr.org:8458/ Please let me know what you need. LER ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=675018&group_id=29880 From stotz at logo.de Mon Jan 27 03:19:03 2003 From: stotz at logo.de (Christoph Stotz) Date: Mon Jan 27 03:19:03 2003 Subject: [Nagiosplug-devel] check_http: Socket timeout after 10 second s (but webserver is up! ) Message-ID: Hello, > Can you try the same command with the -I flag instead of -H. > Still just a guess here, but remember the '-H' sets the hostname, > whereas '-I' does not. The server should either be successful > or give a > 400, so it's for from a sure thing. But maybe worth a try. Ok, I tried that: <---cut here---><---cut here---><---cut here---><---cut here---><---cut here---><---cut here---> spaehfix:/usr/local/nagios # ./libexec/check_http --verbose -H A.B.C.D Socket timeout after 10 seconds spaehfix:/usr/local/nagios # ./libexec/check_http --verbose -I A.B.C.D Socket timeout after 10 seconds spaehfix:/usr/local/nagios # ./libexec/check_http --verbose -I Socket timeout after 10 seconds spaehfix:/usr/local/nagios # ./libexec/check_http --verbose -H Socket timeout after 10 seconds <---cut here---><---cut here---><---cut here---><---cut here---><---cut here---><---cut here---> and again - on the "first Web" on that host, all combinations of IP/FQDN, -H/-I is working without giving any problems. Any further ideas ? Kind Regards, Christoph Stotz From karl at debisschop.net Mon Jan 27 04:02:04 2003 From: karl at debisschop.net (Karl DeBisschop) Date: Mon Jan 27 04:02:04 2003 Subject: [Nagiosplug-devel] check_http: Socket timeout after 10 second s (but webserver is up! ) In-Reply-To: References: Message-ID: <1043668827.21627.5.camel@localhost.localdomain> On Mon, 2003-01-27 at 06:15, Christoph Stotz wrote: > Hello, > > > Can you try the same command with the -I flag instead of -H. > > Still just a guess here, but remember the '-H' sets the hostname, > > whereas '-I' does not. The server should either be successful > > or give a > > 400, so it's for from a sure thing. But maybe worth a try. > > Ok, I tried that: > > <---cut here---><---cut here---><---cut here---><---cut here---><---cut > here---><---cut here---> > spaehfix:/usr/local/nagios # ./libexec/check_http --verbose -H A.B.C.D > Socket timeout after 10 seconds > spaehfix:/usr/local/nagios # ./libexec/check_http --verbose -I A.B.C.D > Socket timeout after 10 seconds > spaehfix:/usr/local/nagios # ./libexec/check_http --verbose -I > > Socket timeout after 10 seconds > spaehfix:/usr/local/nagios # ./libexec/check_http --verbose -H > > Socket timeout after 10 seconds > <---cut here---><---cut here---><---cut here---><---cut here---><---cut > here---><---cut here---> > > and again - on the "first Web" on that host, all combinations of IP/FQDN, > -H/-I is working without giving any problems. > > Any further ideas ? Actually, after posting last night, I checked the code at found we (incorrectly) set the host name anyway. I fixed that. Can you try the CVS, or can I check the IPs from the outside world if you provide them? Or, are there true vhost names you can use with -H? -- Karl From noreply at sourceforge.net Mon Jan 27 16:56:03 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Mon Jan 27 16:56:03 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-675764 ] Check_snmp wierdness ? Message-ID: Bugs item #675764, was opened at 2003-01-27 23:12 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=675764&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Brian Ipsen (bipsen) Assigned to: Nobody/Anonymous (nobody) Summary: Check_snmp wierdness ? Initial Comment: When checking the CPU load on a cisco pix firewall using the command: /usr/libexec/nagios/check_snmp -H hostaddress - o .1.3.6.1.4.1.9.9.109.1.1.1.1.5.1 -C community -u '% CPU Load' -w 80 -c 90 The result is: SNMP WARNING - 0 % CPU Load This is using net-snmp 5.0.7 (compiuled with ucd-snmp compatability) and the plugins 1.3.0-beta2 snmp get on the oid gives 0 - it is just wierd, that the plugin returns WARNING for this result... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=675764&group_id=29880 From noreply at sourceforge.net Tue Jan 28 20:27:12 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Tue Jan 28 20:27:12 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-676524 ] check_tcp aliases coredump (_ftp,_pop) Message-ID: Bugs item #676524, was opened at 2003-01-28 21:52 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=676524&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jan Ruzicka (ruza) Assigned to: Nobody/Anonymous (nobody) Summary: check_tcp aliases coredump (_ftp,_pop) Initial Comment: Hi gang, the check_ftp and check_pop are having problems. They actually check status and write it to stdout, but they segfault before they return any return code. The check_tcp called by itself works fine. Jan ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=676524&group_id=29880 From noreply at sourceforge.net Thu Jan 30 19:44:02 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Jan 30 19:44:02 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-677803 ] check_procs on Solaris doesn't see zombies Message-ID: Bugs item #677803, was opened at 2003-01-30 22:21 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=677803&group_id=29880 Category: None Group: Release (specify) Status: Open Resolution: None Priority: 5 Submitted By: Matthew Brown (morven) Assigned to: Nobody/Anonymous (nobody) Summary: check_procs on Solaris doesn't see zombies Initial Comment: I'm running v1.3.0 beta 2. On Solaris 8 at least, check_procs does not see zombies. This is because the sscanf does not see four parameters: i.e. in check_procs.c: if (sscanf (input_buffer, PS_FORMAT, PS_VARLIST) >= 4) fails. Under Solaris, ps does not return values for command or args, and thus only three values (state, uid, ppid) are present. Suggested fix: fill command and args with empty strings before the sscanf, and change the 4 above to a 3. I've done this myself (not necessarily neatly) and it works. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=677803&group_id=29880 From noreply at sourceforge.net Thu Jan 30 19:44:02 2003 From: noreply at sourceforge.net (SourceForge.net) Date: Thu Jan 30 19:44:02 2003 Subject: [Nagiosplug-devel] [ nagiosplug-Support Requests-677876 ] some cgi's are not present Message-ID: Support Requests item #677876, was opened at 2003-01-30 16:47 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=677876&group_id=29880 Category: Install Problem (example) Group: v1.0 (example) Status: Open Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: some cgi's are not present Initial Comment: Hello, after the installation i open the index.html and all looks good, but when i click on "Reporting -> Trends" the Browser say the trends.cgi is not on Server ?! There are some cgi's lost or they are't longer supported ? regards Herbert ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=677876&group_id=29880