From ton.voon at altinity.com Fri Sep 1 09:53:12 2006 From: ton.voon at altinity.com (Ton Voon) Date: Fri, 1 Sep 2006 08:53:12 +0100 Subject: [Nagiosplug-devel] Nagios::Plugin api In-Reply-To: <815DEBA40BB0EF4AB429F834E0380C38C9ABF4@OSC-EXMB-M-001.main.ads.uscg.mil> References: <815DEBA40BB0EF4AB429F834E0380C38C9ABF4@OSC-EXMB-M-001.main.ads.uscg.mil> Message-ID: <10063E5A-DFA2-43E8-8256-9859ACEE6406@altinity.com> I've had a thought - does overriding die cause a problem with embedded perl? Design-wise, Nagios::Plugin should play nicely with embedded perl. Ton On 31 Aug 2006, at 20:36, Lawrence, Lynne wrote: > I believe that if you put the signal handler in the BEGIN{} block > of Nagios::Plugin it will take effect when the class is loaded with > the 'use' statement, even before object creation: > > package Nagios::Plugin; > use strict; > > our %STAT= > ('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4); > > BEGIN { $SIG{__DIE__} = sub { die_exit(@_) }; } > . > . > . > sub die_exit { > my $fmt = shift; > printf("Execution Error: " . $fmt, @_); > exit($STAT{UNKNOWN},); > } > > This way users would not have to include it in plugin scripts. > http://www.altinity.com T: +44 (0)870 787 9243 F: +44 (0)845 280 1725 Skype: tonvoon -------------- next part -------------- An HTML attachment was scrubbed... URL: From moshesharon at gmail.com Fri Sep 1 15:20:01 2006 From: moshesharon at gmail.com (moshe sharon) Date: Fri, 1 Sep 2006 15:20:01 +0200 Subject: [Nagiosplug-devel] ircbot :-) In-Reply-To: <20060831181128.GA20723@hexstream.co.uk> References: <20060831174017.GQ22056@vanheusden.com> <1157047305.27941.4.camel@localhost> <20060831181128.GA20723@hexstream.co.uk> Message-ID: <88ad29240609010620t1ac6a324ued3b2eef5bc4714@mail.gmail.com> Hello MSN Messenger client sounds great please post it to the list or to nagiosexchange Thanks in advance -- Moshe Sharon http://www.centerity.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From zsitfa at t-online.hu Fri Sep 1 19:49:10 2006 From: zsitfa at t-online.hu (Horvath Tamas) Date: Fri, 1 Sep 2006 19:49:10 +0200 Subject: [Nagiosplug-devel] How to write Expect plugin Message-ID: <20060901174902.5FCF9E5A52C@mail.t-online.hu> Hi Sean! Thank you your reply. I've just tried it but it did not work. And -n did not work also. When I start my script in the background it runs and do its work (read and send data from/to PIX, and read and write tempfiles), but it does not exit. And its output cannot be seen in my screen (nor send_user neither send_error outputs). After I run fg, script's data appears and script stops. I think that the problem is with the terminal and I read Exploring Expect book from cover to cover, and its Backgrounbd chapter again and again, but I don't understand how to handle this issue. My shell scripts work well with Nagios. I just do printf or echo and my output appeara in Nagios Web interface as $OUTPUT$ and in PerfParse as $PERFDATA$. Can anyone tell me how to handle this "background" issue. (I set TERM, but it does not solve the problem.) Thanks in advance, Tamas! From gavin at openfusion.com.au Fri Sep 1 22:40:09 2006 From: gavin at openfusion.com.au (Gavin Carr) Date: Sat, 2 Sep 2006 06:40:09 +1000 Subject: [Nagiosplug-devel] Nagios::Plugin api In-Reply-To: <10063E5A-DFA2-43E8-8256-9859ACEE6406@altinity.com> References: <815DEBA40BB0EF4AB429F834E0380C38C9ABF4@OSC-EXMB-M-001.main.ads.uscg.mil> <10063E5A-DFA2-43E8-8256-9859ACEE6406@altinity.com> Message-ID: <20060901204009.GA22802@openfusion.com.au> On Fri, Sep 01, 2006 at 08:53:12AM +0100, Ton Voon wrote: > I've had a thought - does overriding die cause a problem with > embedded perl? Design-wise, Nagios::Plugin should play nicely with > embedded perl. > > On 31 Aug 2006, at 20:36, Lawrence, Lynne wrote: > > >I believe that if you put the signal handler in the BEGIN{} block > >of Nagios::Plugin it will take effect when the class is loaded with > >the 'use' statement, even before object creation: > > > >package Nagios::Plugin; > >use strict; > > > >our %STAT= > >('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4); > > > >BEGIN { $SIG{__DIE__} = sub { die_exit(@_) }; } > >. > >. > >. > >sub die_exit { > > my $fmt = shift; > > printf("Execution Error: " . $fmt, @_); > > exit($STAT{UNKNOWN},); > >} > > > >This way users would not have to include it in plugin scripts. BEGIN blocks are problematic with ePN in the sense that they're only called once per ePN invocation, not once per plugin invocation, which is what a plugin author would expect. In this case it doesn't matter. OTOH, I don't think it's necessary to put the die handler in a BEGIN block - if it's done in global scope in a module it will get setup at 'use' time anyway. We only really care that it's set before the first use of die in the plugin. Cheers, Gavin From gavin at openfusion.com.au Fri Sep 1 23:20:44 2006 From: gavin at openfusion.com.au (Gavin Carr) Date: Sat, 2 Sep 2006 07:20:44 +1000 Subject: [Nagiosplug-devel] Nagios::Plugin api In-Reply-To: References: <077F1B782014ED48A58E7927914D36A001D06DFD@fai01500.bhs.bannerhealth.com> Message-ID: <20060901212044.GA22904@openfusion.com.au> On Thu, Aug 31, 2006 at 10:29:56AM +0100, Ton Voon wrote: > On 30 Aug 2006, at 21:04, Vonnahme, Nathan wrote: > > >I like that, it is more intuitive. Maybe it should default to UNKNOWN > >though-- you should explicitly throw CRITICAL or WARNING if it's an > >expected problem (the thing you're checking is down/excessive), and > >just > >plain die() (which would return UNKNOWN) if it's something that keeps > >you from checking, like if a file your check script needs isn't there. > > Agreed. UNKNOWN is a better default. Ok - default to UNKNOWN. > >What about even overloading the die and end handlers like this (I may > >not have it quite right... and you'd have to do it in the check > >script, > >not the module) ? > > I like the idea of overloading die - keeps it v simple - but only if > it doesn't need to be specified at the plugin script (eg, can we get > it automatically just by use Nagios::Plugin?). > > Also, does that mean the object will return the data? Or all the > setup stuff is class data? Overloading die is nice, but it's reasonably unexpected from a user point of view. I wonder if we should make Nagios::Plugin work something like File::Spec does: by default, nothing is exported into the user's environment, and everything is called via class or object methods e.g. Nagios::Plugin->die( 'bad result' ); $np->exit( 'everything ok' ); Then you have an alternative functional interface if you want to use exported/exportable functions instead (including overriding die, for instance), like Nagios::Plugin::Functions (cf. File::Spec::Functions): use Nagios::Plugin::Functions; die( $failure, CRITICAL ); Cheers, Gavin From rouilj at cs.umb.edu Sat Sep 2 00:17:00 2006 From: rouilj at cs.umb.edu (John P. Rouillard) Date: Fri, 01 Sep 2006 18:17:00 -0400 Subject: [Nagiosplug-devel] Nagios::Plugin api In-Reply-To: Your message of "Sat, 02 Sep 2006 07:20:44 +1000." <20060901212044.GA22904@openfusion.com.au> Message-ID: <200609012217.k81MH0cc011383@mx1.cs.umb.edu> In message <20060901212044.GA22904 at openfusion.com.au>, Gavin Carr writes: >On Thu, Aug 31, 2006 at 10:29:56AM +0100, Ton Voon wrote: >> On 30 Aug 2006, at 21:04, Vonnahme, Nathan wrote: >> >> >I like that, it is more intuitive. Maybe it should default to UNKNOWN >> >though-- you should explicitly throw CRITICAL or WARNING if it's an >> >expected problem (the thing you're checking is down/excessive), and >> >just >> >plain die() (which would return UNKNOWN) if it's something that keeps >> >you from checking, like if a file your check script needs isn't there. >> >> Agreed. UNKNOWN is a better default. > >Ok - default to UNKNOWN. > >> >What about even overloading the die and end handlers like this (I may >> >not have it quite right... and you'd have to do it in the check >> >script, >> >not the module) ? >> >> I like the idea of overloading die - keeps it v simple - but only if >> it doesn't need to be specified at the plugin script (eg, can we get >> it automatically just by use Nagios::Plugin?). >> >> Also, does that mean the object will return the data? Or all the >> setup stuff is class data? > >Overloading die is nice, but it's reasonably unexpected from a user >point of view. I wonder if we should make Nagios::Plugin work something >like File::Spec does: by default, nothing is exported into the user's >environment, and everything is called via class or object methods e.g. > > Nagios::Plugin->die( 'bad result' ); > $np->exit( 'everything ok' ); > >Then you have an alternative functional interface if you want to use >exported/exportable functions instead (including overriding die, for >instance), like Nagios::Plugin::Functions (cf. File::Spec::Functions): > > use Nagios::Plugin::Functions; > > die( $failure, CRITICAL ); Why use die at all? It is some attempt to make current programs using die return something useful? Why not use nagios_exit("msg", $UNKNOWN) or some such. Overloading is nice if you understand it, but I see a lot of people making plugins that have only a bare grasp of programming. I think overloading die is just going to bring problems. A user does a google for die to see how to use it. Does s/he get info about the overloaded function? On the other hand if they google for nagios_exit or some such they have a much better chance of finding useful info and examples. -- rouilj John Rouillard =========================================================================== My employers don't acknowledge my existence much less my opinions. From gavin at openfusion.com.au Sat Sep 2 03:07:58 2006 From: gavin at openfusion.com.au (Gavin Carr) Date: Sat, 2 Sep 2006 11:07:58 +1000 Subject: [Nagiosplug-devel] Nagios::Plugin api In-Reply-To: <200609012217.k81MH0cc011383@mx1.cs.umb.edu> References: <20060901212044.GA22904@openfusion.com.au> <200609012217.k81MH0cc011383@mx1.cs.umb.edu> Message-ID: <20060902010758.GA23483@openfusion.com.au> On Fri, Sep 01, 2006 at 06:17:00PM -0400, John P. Rouillard wrote: > >Overloading die is nice, but it's reasonably unexpected from a user > >point of view. I wonder if we should make Nagios::Plugin work something > >like File::Spec does: by default, nothing is exported into the user's > >environment, and everything is called via class or object methods e.g. > > > > Nagios::Plugin->die( 'bad result' ); > > $np->exit( 'everything ok' ); > > > >Then you have an alternative functional interface if you want to use > >exported/exportable functions instead (including overriding die, for > >instance), like Nagios::Plugin::Functions (cf. File::Spec::Functions): > > > > use Nagios::Plugin::Functions; > > > > die( $failure, CRITICAL ); > > > Why use die at all? It is some attempt to make current programs using die > return something useful? > > Why not use nagios_exit("msg", $UNKNOWN) or some such. Overloading is > nice if you understand it, but I see a lot of people making plugins > that have only a bare grasp of programming. I think overloading die is > just going to bring problems. A user does a google for die to see > how to use it. Does s/he get info about the overloaded function? > > On the other hand if they google for nagios_exit or some such they > have a much better chance of finding useful info and examples. It's a good point. In addition, we were talking about using both 'die' and 'exit', and overloading 'exit' is non-trivial. I actually used nagios_exit() in my earlier Nagios::Plugin variant, so +1 from me. Cheers, Gavin From noreply at sourceforge.net Tue Sep 5 00:19:09 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 04 Sep 2006 15:19:09 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1540327 ] check_disk C_IDFP/W_IDFP inputerror, affects 1.4.3 not 1.4.2 Message-ID: Bugs item #1540327, was opened at 2006-08-14 20:25 Message generated for change (Comment added) made by hectorlasso You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1540327&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Karl Kornel (akkornel) Assigned to: Nobody/Anonymous (nobody) Summary: check_disk C_IDFP/W_IDFP inputerror, affects 1.4.3 not 1.4.2 Initial Comment: The check_disk plugin that comes in nagios-plugins- 1.4.3 does not work for me: $ ./check_disk -w 25% -c 10% -p /home INPUT ERROR: C_IDFP (0.000000) should be less than W_IDFP (0.0) and both should be between zero and 100 percent, inclusive for /home check_disk: Could not parse arguments Usage: check_disk -w limit -c limit [-p path | -x device] [-t timeout][-m] [-e] [-W limit] [-K limit] [- v] [-q] When I configured nagios-plugins-1.4.3, I ran `./configure --prefix=/usr/local/nagios-stage -- disable-nls --disable-rpath --with-cgiurl=/cgi-bin -- with-nagios-user=nagios --with-nagios-group=nagios -- with-trusted- path=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr /local/sbin --with-mysql=/usr`, and got the following results: --with-ping6-command: /bin/ping6 -n -U -w %d -c %d %s --with-ping-command: /bin/ping -n -U -w %d -c %d %s --with-lwres: no --with-ipv6: yes --with-mysql: /usr/bin/mysql_config --with-openssl: yes --with-gnutls: no --enable-emulate-getaddrinfo: no --with-perl: /usr/bin/perl --with-cgiurl: /cgi-bin --with-nagios-user: nagios --with-nagios-group: nagios --with-trusted- path: /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/us r/local/sbin Building check_disk on 1.4.3 resulted in the following commands (and errors): if gcc -DLOCALEDIR=\"/usr/local/nagios- stage/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. - I.. -I../lib -I../intl -I/usr/include/ldap - I/usr/include/postgresql -I/usr/include -Wall -g - O2 -MT check_disk.o -MD -MP - MF ".deps/check_disk.Tpo" -c -o check_disk.o check_disk.c; \ then mv - f ".deps/check_disk.Tpo" ".deps/check_disk.Po"; else rm -f ".deps/check_disk.Tpo"; exit 1; fi check_disk.c: In function 'main': check_disk.c:171: warning: statement with no effect check_disk.c:172: warning: statement with no effect check_disk.c: At top level: check_disk.c:47: warning: 'inode_format' defined but not used /bin/sh ../libtool --mode=link --tag=CC gcc -Wall -g - O2 -L. -o check_disk check_disk.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a popen.o -lssl -lcrypto gcc -Wall -g -O2 -o check_disk check_disk.o utils.o popen.o -L/home/nagios/nagios-plugins- 1.4.3/plugins ../lib/libnagiosplug.a ../lib/libcoreuti ls.a -lssl -lcrypto NOTE: The check_disk that came with 1.4.2 was fine! When I compiled nagios-plugins-1.4.2, I ran `./configure`, and got the following results: --with-perl: /usr/bin/perl --with-cgiurl: /nagios/cgi-bin --with-nagios-user: nagios --with-nagios-group: nagios --with-trusted-path: /bin:/sbin:/usr/bin:/usr/sbin --with-ping-command: /bin/ping -n -U -w %d -c %d %s --with-ping6-command: /bin/ping6 -n -U -w %d -c %d %s --with-lwres: no --with-ipv6: yes --with-openssl: yes --enable-emulate-getaddrinfo: no Building check_disk on 1.4.2 resulted in the following commands being executed: if gcc - DLOCALEDIR=\"/usr/local/nagios/share/locale\" - DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl - I/usr/include/ldap -I/usr/include/postgresql - I/include -g -O2 -MT check_disk.o -MD -MP - MF ".deps/check_disk.Tpo" -c -o check_disk.o check_disk.c; \ then mv - f ".deps/check_disk.Tpo" ".deps/check_disk.Po"; else rm -f ".deps/check_disk.Tpo"; exit 1; fi gcc -g -O2 -L. -L/usr/lib -o check_disk check_disk.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a popen.o -I/usr/include Finally, running v1.4.2 of check_disk gives me: $ ./check_disk -w 25% -c 10% -p /home DISK OK - free space: /home 46355 MB (92%);| /home=4042MB;37797;45356;0;50396 ---------------------------------------------------------------------- Comment By: Hector Lasso (hectorlasso) Date: 2006-09-04 17:19 Message: Logged In: YES user_id=1590688 I also had this problem on a server with SUSE (kernel recompiled). After checking and checking I found out that on the arguments processing function, when the option is -p (line 457) the values are copied to a structure (a node of a linked list), however the values of w_idfp and c_idfp are not copied to the structure. I addded the following two lines: se->w_idfp = w_idfp; se->c_idfp = c_idfp; before the line "se->found = 0;" recompiled and it worked fine. I didn't have time to check all the code so the problem might be somewhere else. ---------------------------------------------------------------------- Comment By: Augustine (augustine_ab) Date: 2006-08-24 11:04 Message: Logged In: YES user_id=1583130 I experienced this problem when building plugins for AIX (code works fine on linux). It appears the issue is uninitialized name_list structure. My quick fix was to add memset after each malloc: se = (struct name_list *) malloc (sizeof (struct name_list)); memset(se,0,sizeof(struct name_list)); hope this helps. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1540327&group_id=29880 From nathan.vonnahme at bannerhealth.com Tue Sep 5 20:10:23 2006 From: nathan.vonnahme at bannerhealth.com (Vonnahme, Nathan) Date: Tue, 5 Sep 2006 10:10:23 -0800 Subject: [Nagiosplug-devel] Nagios::Plugin api Message-ID: <077F1B782014ED48A58E7927914D36A001D06E1E@fai01500.bhs.bannerhealth.com> Good point about new users, John, although I hope they will read the POD for examples before googling. Shall we just leave it as $plugin->nagios_die(CRITICAL, "aiiiii") if $bad; $plugin->nagios_exit(); # OK ? Gavin Carr wrote: > On Fri, Sep 01, 2006 at 06:17:00PM -0400, John P. Rouillard wrote: > > Why use die at all? It is some attempt to make current > programs using die > > return something useful? > > > > Why not use nagios_exit("msg", $UNKNOWN) or some such. > Overloading is > > nice if you understand it, but I see a lot of people making plugins > > that have only a bare grasp of programming. I think > overloading die is > > just going to bring problems. A user does a google for die to see > > how to use it. Does s/he get info about the overloaded function? > > > > On the other hand if they google for nagios_exit or some such they > > have a much better chance of finding useful info and examples. > > It's a good point. In addition, we were talking about using both 'die' > and 'exit', and overloading 'exit' is non-trivial. I actually used > nagios_exit() in my earlier Nagios::Plugin variant, so +1 from me. > From gavin at openfusion.com.au Thu Sep 7 04:09:29 2006 From: gavin at openfusion.com.au (Gavin Carr) Date: Thu, 7 Sep 2006 12:09:29 +1000 Subject: [Nagiosplug-devel] Nagios::Plugin api In-Reply-To: <077F1B782014ED48A58E7927914D36A001D06E1E@fai01500.bhs.bannerhealth.com> References: <077F1B782014ED48A58E7927914D36A001D06E1E@fai01500.bhs.bannerhealth.com> Message-ID: <20060907020918.GB26827@openfusion.com.au> On Tue, Sep 05, 2006 at 10:10:23AM -0800, Vonnahme, Nathan wrote: > Good point about new users, John, although I hope they will read the POD > for examples before googling. > > Shall we just leave it as > $plugin->nagios_die(CRITICAL, "aiiiii") if $bad; > $plugin->nagios_exit(); # OK > > ? I'm thinking we just go with $plugin->nagios_exit( CRITICAL, "aiiii" ) if $bad; $plugin->nagios_exit( OK, "foobar" ); on the basis that: - CORE::exit() takes a return value, so our nagios_exit is a pretty intuitive extension of that (where CORE::die() takes a message and no return value) - the order of arguments ( code => message ) mirrors the order you get in the Status Information within nagios itself. Not that significant, but maybe helpful for newbies. We can always add nagios_die as well later if people feel strongly about it. For backwards compatibility, we should also support these two: $plugin->nagios_exit( return_code => OK, message => $msg ); $plugin->die( return_code => OK, message => $msg ); That sound reasonable? Barring objections, I'll probably take a look at implementing this in the next few days. I'm going to restart the thresholds api discussion in a separate thread for clarity. Cheers, Gavin From gavin at openfusion.com.au Thu Sep 7 04:30:14 2006 From: gavin at openfusion.com.au (Gavin Carr) Date: Thu, 7 Sep 2006 12:30:14 +1000 Subject: [Nagiosplug-devel] Nagios::Plugin thresholds Message-ID: <20060907023014.GC26827@openfusion.com.au> Ton Voon scribed in a previous thread: > >> Gavin Carr pontificated thusly: > >> > >>- With thresholds, returning an object from set_thresholds seems > >> strange to me: > >> > >> $threshold = $p->set_thresholds( warning => "10:25", critical > >>=> "25:" ); > >> > >> I think that if you're going to return an object, you should just > >> use Nagios::Plugin::Threshold directly: > >> > >> $threshold = Nagios::Plugin::Threshold->new( warning => > >>"10:25", critical => "25:" ); > >> > >> Or if you want to use composition, you shouldn't return the object > >> at all - just > >> > >> $p->set_thresholds( warning => "10:25", critical => "25:" ); > >> > >> or perhaps: > >> > >> $p = Nagios::Plugin->new( warning => "10:25", critical => > >>"25:" ); > >> > >> (In practice, I guess thresholds are most often going to come in as > >> arguments anyway, so we would presumably most often want to get > >>them > >> via Nagios::Plugin::Getopt arguments somehow ...) > >> > >> If you're going with composition, then you'd call the threshold > >> get_status implicitly rather than explicitly e.g. instead of: > >> > >> $p->die( return_code => $threshold->get_status($value), message > >>=> $msg ) > >> > >> perhaps something like: > >> > >> $p->exit_check_threshold(check => $value); > >> $p->exit_check_threshold($value); > > Hmmm. I can't remember why I did it like this. There could be > multiple thresholds per plugin (check_disk can check absolute disk > free, absolute disk used, percent disk used, percent disk free, > absolute inodes free, etc), so there needs to be a list of > thresholds. Yes, they are likely to come via N::P::Getopt arguments, > but I guess they need to be pulled out at certain times too (you've > put 'check => $value' above - how do we reference 'check'?). > > In summary, I'm not sure what my position on this is yet. :) > > $p->exit_check_threshold( check => $value ) is a good idea for a > shortcut method to $p->exit( ... ). For simplicity, let's start with single thresholds. If we want to handle multiple thresholds cleverly later (as opposed to just iterating over them), I guess we layer that on top? My main point above was just that we should either expose Nagios::Plugin::Thresholds fully and let them be used directly, or hide them away entirely - it seems to me the current api is doing something in between. How about something like this: $plugin->check_threshold( check => $value, message => "page size at http://... was ${value}kB", warning => $warning, critical => $critical, ); which creates your N::P::Threshold object behind the scenes, sets the thresholds using $warning and $critical, calls N::P::Threshold->get_status, and exits iff the result is a WARNING or a CRITICAL. You might also have: $plugin->check_threshold_exit( ); which always exits i.e. it's a convenience for: $self->check_threshold( %args ); $self->nagios_exit( OK, %args{message} ); Good/bad/ugly? Cheers, Gavin From gavin at openfusion.com.au Thu Sep 7 05:48:25 2006 From: gavin at openfusion.com.au (Gavin Carr) Date: Thu, 7 Sep 2006 13:48:25 +1000 Subject: [Nagiosplug-devel] Nagios::Plugin api In-Reply-To: <54B3F5C6-1532-4C19-AA1B-6F6E17D16AB9@altinity.com> References: <20060830004026.GC10823@openfusion.com.au> <54B3F5C6-1532-4C19-AA1B-6F6E17D16AB9@altinity.com> Message-ID: <20060907034825.GA27290@openfusion.com.au> On Wed, Aug 30, 2006 at 10:19:25AM +0100, Ton Voon wrote: > > On 30 Aug 2006, at 01:40, Gavin Carr wrote: > >- Implementation detail: Nagios::Plugin does a 'use 5.008004' - is > >that deliberate? If not, how backwards compatible do we want to be? The > >code uses lots of 'our's and 'use warnings', both of which are 5.6-isms, > >I think. Do we want to be able to work with older perls? There are still > >lots of 5.005003 installs out there, for instance. > > I have to admit to ignorance between all the different perl versions. > Is there somewhere that highlights the differences between perl > releases? This is a tough call. The only stuff I've been able to find are perlhist and the various perlNNNdelta man pages (web versions here: http://perldoc.perl.org/index-history.html ). There's also Module::CoreList that will tell you when a particular module made it into the core, but that's not particularly relevant here either. I'd be surprised if the current Nagios::Plugin code wouldn't work on anything >= 5.6.0 - anyone got an install they could test it on? The real question is if we want to support anything earlier. 'our' and 'use warnings' were introduced in 5.6.0. 'our' we can replace easily with 'use vars', but I'm not clear on whether we can do 'local $^W = 1' in a module instead of 'use warnings' and have that to the right thing. I guess worst case we could not have warnings turned on in the modules themselves, but turn them on for tests, say? Cheers, Gavin From nathan.vonnahme at bannerhealth.com Thu Sep 7 19:27:42 2006 From: nathan.vonnahme at bannerhealth.com (Vonnahme, Nathan) Date: Thu, 7 Sep 2006 09:27:42 -0800 Subject: [Nagiosplug-devel] Nagios::Plugin api Message-ID: <077F1B782014ED48A58E7927914D36A001D06E4C@fai01500.bhs.bannerhealth.com> I guess I would first try removing the 'use 5.008004' line, getting it the way we want it with perl 5.8, and ignoring older perls for now-- we should be compatible with any relatively recent build of perl, and it's easy enough to retrofit if someone needs it. > -----Original Message----- > From: nagiosplug-devel-bounces at lists.sourceforge.net > [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On > Behalf Of Gavin Carr > Sent: Wednesday, September 06, 2006 7:48 PM > To: Nagios Plugin Development Mailing List > Subject: Re: [Nagiosplug-devel] Nagios::Plugin api > > On Wed, Aug 30, 2006 at 10:19:25AM +0100, Ton Voon wrote: > > > > On 30 Aug 2006, at 01:40, Gavin Carr wrote: > > >- Implementation detail: Nagios::Plugin does a 'use > 5.008004' - is > > >that deliberate? If not, how backwards compatible do we > want to be? The > > >code uses lots of 'our's and 'use warnings', both of which > are 5.6-isms, > > >I think. Do we want to be able to work with older perls? > There are still > > >lots of 5.005003 installs out there, for instance. > > > > I have to admit to ignorance between all the different perl > versions. > > Is there somewhere that highlights the differences between perl > > releases? This is a tough call. > > The only stuff I've been able to find are perlhist and the various > perlNNNdelta man pages (web versions here: > > http://perldoc.perl.org/index-history.html > > ). There's also Module::CoreList that will tell you when a particular > module made it into the core, but that's not particularly > relevant here > either. > > I'd be surprised if the current Nagios::Plugin code wouldn't work > on anything >= 5.6.0 - anyone got an install they could test it on? > > The real question is if we want to support anything earlier. 'our' > and 'use warnings' were introduced in 5.6.0. 'our' we can replace > easily with 'use vars', but I'm not clear on whether we can do > 'local $^W = 1' in a module instead of 'use warnings' and have that > to the right thing. > > I guess worst case we could not have warnings turned on in the modules > themselves, but turn them on for tests, say? > > Cheers, > Gavin > > > -------------------------------------------------------------- > ----------- > Using Tomcat but need to do more? Need to support web > services, security? > Get stuff done quickly with pre-integrated technology to make > your job easier > Download IBM WebSphere Application Server v.1.0.1 based on > Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057& > dat=121642 > _______________________________________________________ > Nagios Plugin Development Mailing List > Nagiosplug-devel at lists.sourceforge.net > Unsubscribe at > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > ::: Please include plugins version (-v) and OS when reporting > any issue. > ::: Messages without supporting info will risk being sent to /dev/null > From nathan.vonnahme at bannerhealth.com Thu Sep 7 20:00:15 2006 From: nathan.vonnahme at bannerhealth.com (Vonnahme, Nathan) Date: Thu, 7 Sep 2006 10:00:15 -0800 Subject: [Nagiosplug-devel] Nagios::Plugin thresholds Message-ID: <077F1B782014ED48A58E7927914D36A001D06E4D@fai01500.bhs.bannerhealth.com> erm, I guess I'm kind of re-blending this with the general API discussion: Gavin wrote, though Outlook is too stupid to quote correctly: > How about something like this: > > $plugin->check_threshold( > check => $value, message => "page size at http://... was > ${value}kB", > warning => $warning, critical => $critical, > ); > > which creates your N::P::Threshold object behind the scenes, sets the > thresholds using $warning and $critical, calls > N::P::Threshold->get_status, > and exits iff the result is a WARNING or a CRITICAL. > > You might also have: > > $plugin->check_threshold_exit( ); > > which always exits i.e. it's a convenience for: > > $self->check_threshold( %args ); > $self->nagios_exit( OK, %args{message} ); Wouldn't check_threshold return a valid nagios status code (OK, WARNING, CRITICAL) ? Also, we're talking about subsuming the GetOpts module under the main plugin API, right, so the prelude to the example would be something like: my $plugin = Nagios::Plugin->new; $plugin->define_arg( spec => 'warning|w=s', help => qq{-w, --warning=INTEGER:INTEGER blah blah}, ); $plugin->define_arg( spec => 'critical|c=s', help => qq{-c, --critical=INTEGER:INTEGER blah blah }, ); alarm $plugin->timeout; my $value = get_my_plugin_specific_stuff_here(); my $message = "page size at http://... was ${value}kB"; # then either my $return_status = $plugin->check_threshold( check => $value, warning => $plugin->opt('warning'), # it would have to call Nagios::Plugin::Getopt::getopts() # the first time we ask for an opt() critical => $plugin->opt('critical'), ); $plugin->nagios_exit($return_status, $message); # or a shortcut like $plugin->check_threshold_exit( check => $value, message => $message, warning => $plugin->opt('warning'), critical => $plugin->opt('critical'), ); and I would vote to *not* have that shortcut since it doesn't really save or clarify... you might just as well say: $plugin->nagios_exit( $plugin->check_threshold( check => $value, warning => $plugin->opt('warning'), critical => $plugin->opt('critical'), ), $message ); also, I would still like to have a die() method so I'd be able to say something like: my $value = get_my_plugin_specific_stuff_here() or $plugin->die("couldn't check stuff because of foo! $!"); # returns UNKNOWN plus message On a side note, Gavin, is there any problem with standardizing on one spelling of license/licence in Getopt.pm ? From gavin at openfusion.com.au Fri Sep 8 01:19:44 2006 From: gavin at openfusion.com.au (Gavin Carr) Date: Fri, 8 Sep 2006 09:19:44 +1000 Subject: [Nagiosplug-devel] Nagios::Plugin thresholds In-Reply-To: <077F1B782014ED48A58E7927914D36A001D06E4D@fai01500.bhs.bannerhealth.com> References: <077F1B782014ED48A58E7927914D36A001D06E4D@fai01500.bhs.bannerhealth.com> Message-ID: <20060907231944.GB30817@openfusion.com.au> On Thu, Sep 07, 2006 at 10:00:15AM -0800, Vonnahme, Nathan wrote: > erm, I guess I'm kind of re-blending this with the general API > discussion: > > Gavin wrote, though Outlook is too stupid to quote correctly: > > > How about something like this: > > > > $plugin->check_threshold( > > check => $value, message => "page size at http://... was > > ${value}kB", > > warning => $warning, critical => $critical, > > ); > > > > which creates your N::P::Threshold object behind the scenes, sets the > > thresholds using $warning and $critical, calls > > N::P::Threshold->get_status, > > and exits iff the result is a WARNING or a CRITICAL. > > > > You might also have: > > > > $plugin->check_threshold_exit( ); > > > > which always exits i.e. it's a convenience for: > > > > $self->check_threshold( %args ); > > $self->nagios_exit( OK, %args{message} ); > > > Wouldn't check_threshold return a valid nagios status code (OK, WARNING, > CRITICAL) ? > # then either > > my $return_status = $plugin->check_threshold( > check => $value, > warning => $plugin->opt('warning'), # it would have > to call Nagios::Plugin::Getopt::getopts() > # the first time > we ask for an opt() > critical => $plugin->opt('critical'), > ); > $plugin->nagios_exit($return_status, $message); > > # or a shortcut like > > $plugin->check_threshold_exit( > check => $value, > message => $message, > warning => $plugin->opt('warning'), > critical => $plugin->opt('critical'), > ); > > and I would vote to *not* have that shortcut since it doesn't really > save or clarify... you might just as well say: > > $plugin->nagios_exit( > $plugin->check_threshold( > check => $value, > warning => $plugin->opt('warning'), > critical => $plugin->opt('critical'), > ), > $message > ); Yes, maybe you're right - there's not much in it. Maybe we leave the shortcuts for now then? If we find down the track they would make things easier (esp. for newbies) then they're easy enough to layer on top. More on check_threshold, I think we should make 'warning' and 'critical' default to $plugin->opt('warning') and $plugin->opt('critical') if those are defined, as that's likely to be far and away the common use case. That would mean your example above just becomes: my $return_status = $plugin->check_threshold( check => $value ); $plugin->nagios_exit( $return_status, $message ); Maybe we should allow: my $return_status = $plugin->check_threshold( $value ); for that case as well? So does this mean you're putting your hand up to implement this Nathan? ;-) > also, I would still like to have a die() method so I'd be able to say > something like: > > my $value = get_my_plugin_specific_stuff_here() > or $plugin->die("couldn't check stuff because of foo! > $!"); # returns UNKNOWN plus message Okay, I guess that's a reasonable convenience method. > On a side note, Gavin, is there any problem with standardizing on one > spelling of license/licence in Getopt.pm ? Er, well I speak the Queen's English, in which licence is the noun, and license is the verb. I like helping American's understand that there's is not the only brand on the planet, but I'm not _too_ much of a linguistic Nazi. ;-) So no, if you want to Americanise it I don't really care. Cheers, Gavin From nathan.vonnahme at bannerhealth.com Fri Sep 8 22:43:43 2006 From: nathan.vonnahme at bannerhealth.com (Vonnahme, Nathan) Date: Fri, 8 Sep 2006 12:43:43 -0800 Subject: [Nagiosplug-devel] Nagios::Plugin thresholds Message-ID: <077F1B782014ED48A58E7927914D36A001D06E78@fai01500.bhs.bannerhealth.com> > -----Original Message----- > From: nagiosplug-devel-bounces at lists.sourceforge.net > [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On > Behalf Of Gavin Carr > Sent: Thursday, September 07, 2006 3:20 PM > More on check_threshold, I think we should make 'warning' and > 'critical' > default to $plugin->opt('warning') and > $plugin->opt('critical') if those > are defined, as that's likely to be far and away the common use case. > That would mean your example above just becomes: > > my $return_status = $plugin->check_threshold( check => $value ); > $plugin->nagios_exit( $return_status, $message ); > > Maybe we should allow: > > my $return_status = $plugin->check_threshold( $value ); > > for that case as well? > > So does this mean you're putting your hand up to implement > this Nathan? ;-) > I'd be happy to take a crack at it after November 1, but I won't be able to until then. > > On a side note, Gavin, is there any problem with > standardizing on one > > spelling of license/licence in Getopt.pm ? > > Er, well I speak the Queen's English, in which licence is the > noun, and > license is the verb. I like helping American's understand > that there's is > not the only brand on the planet, but I'm not _too_ much of a > linguistic > Nazi. ;-) > > So no, if you want to Americanise it I don't really care. Ah. I had never noticed that verb/noun distinction! I thought it was just half American spelling and half Queen's and was going to s/licen[cs]/licens/gi to minimize future confusion. But this paragraph is still inconsistent, I think: =item license License text, included in the longer --help output (see below for an example). By default, this is set to the standard nagios plugins GPL licence text: This nagios plugin is free software, and comes with ABSOLUTELY NO WARRANTY. It may be used, redistributed and/or modified under the terms of the GNU General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt). and there's this line which looked like a mistake to me (though I think it works correctly on closer inspection): license => { default => $DEFAULT{licence} }, I think the noun is meant in all those cases, so we could just s/licen[cs]/licenc/gi except for the GPL URLs, right? From Paul.McNally at meridianp2p.com Thu Sep 7 16:39:47 2006 From: Paul.McNally at meridianp2p.com (Paul.McNally at meridianp2p.com) Date: Thu, 7 Sep 2006 15:39:47 +0100 Subject: [Nagiosplug-devel] Updated check_log Message-ID: Hi All, Please find attached a updated version of the check_log script, I have resolved the following issue that affected us 1. If there was an error in the log on first run it was ignored 2. The log file gets altered while the check is running (VERY unlucky!) 3. If the log file rolls over a false positive is sent the next time the check is run I hope that they are of some use! (See attached file: check_log) Regards, Paul Mc Nally Senior IT Systems Administrator Meridian BPO -------------- next part -------------- A non-text attachment was scrubbed... Name: check_log Type: application/octet-stream Size: 7046 bytes Desc: not available URL: From Mikael.Lammentausta at student.savonia-amk.fi Fri Sep 8 10:14:56 2006 From: Mikael.Lammentausta at student.savonia-amk.fi (Mikael Lammentausta) Date: Fri, 8 Sep 2006 11:14:56 +0300 Subject: [Nagiosplug-devel] check_sensors rework Message-ID: The official check_sensors plugin didn't report any info other than a regexp 'ALARM' from lm_sensors. I rewrote the plugin to send data, and have been making nice plots with nagios-grapher a few days now. This version reports cpu, motherboard and hard drive temperatures, fan speeds and voltages (in separate instances). Warning and critical level setting only affects cpu temperature and all fans. By default this plugin should work like the earlier version, the switches modify the operation mode. See --help for more information. -- #!/usr/bin/env bash # gets temperature, fan speed and voltages from lm_sensors # and smartctl for HDD temp # Copyright (C) 2006 Mikael Lammentausta PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/nagios/sbin:/usr/local/nagios/sbin PROGNAME=`basename $0` PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'` REVISION=`echo '$Revision: 2.0 $' | sed -e 's/[^0-9.]//g'` #. $PROGPATH/utils.sh print_usage() { echo "Usage: $PROGNAME [options]" echo " e.g. $PROGNAME -T temperature -w 50 -c 60 -d /dev/hda,/dev/hdb" echo echo "Options:" echo -e "\t --help | -h print help" echo -e "\t --version | -V print version" echo -e "\t --verbose | -v be verbose" echo -e "\t --type | -T [type] " echo -e "\t temperature check and print temperature data" echo -e "\t voltages check and print voltage data" echo -e "\t fan check and print fan data" echo -e "\t -w [value] set warning value" echo -e "\t -c [value] set critical value" echo -e "\t -d [hdd drives] set hard drive to scan, comma-separated" echo -e "\t -dd [driver type] set hard drive type for smartctl (default ata)" echo echo "If no options are given, $PROGRAME will print only status." echo "NOTE: you can only ask one data type at once, $PROGNAME will" echo " not output temp, voltage and fan info at the same time." echo " Critical/warning level only watches the CPU temperature." echo " You cannot set levels for voltages." echo } print_help() { print_revision $PROGNAME $REVISION echo echo "This plugin checks hardware status using the lm_sensors package." echo print_usage echo support exit 3 } # set defaults check_temp=0 check_voltages=0 check_fan=0 check_smart=0 isverbose=0 hddtype="ata" # get the data sensordata=$(sensors 2>&1) status=$? # test status of lm_sensors if [ ! "$(type -p sensors)" ]; then echo "SENSORS UNKNOWN - command not found (did you install lmsensors?)" exit -1 elif [ ! "$(type -p smartctl)" ] && [ ${check_smart} -eq 1 ]; then echo "Smartctl binary not found - no data available from hard drives" echo check_smart=0 elif test ${status} -ne 0 ; then echo "WARNING - sensors returned state $status" exit -1 elif [ $check_smart -eq 1 ] && [ ! "$hdd_drive" ]; then echo "No HDD drive defined. Use the -d switch." exit -1 fi # all is ok if [ $isverbose -eq 1 ]; then echo -e "${sensordata}" fi # put the multiple items given at the prompt to an array form_hdd_array() { IFS_bak="$IFS" IFS="," local drive hdd_drives[0]="reserved" for drive in ${1}; do hdd_drives[${#hdd_drives[@]}]="$drive" done IFS="$IFS_bak" } # check functions check_temp() { cpu_temp="$(grep -i 'cpu temp' <<< "${sensordata}" | \ grep -Eo '[0-9\.]+[[:punct:]]?[ ]?[CF]+' | head -n 1)" mobo_temp="$(grep -i 'M/B temp' <<< "${sensordata}" | \ grep -Eo '\+[0-9]*[[:punct:]]?[ ]?[CF]+' | head -n 1)" local drive hdd_temp[0]="reserved" for drive in $(seq 1 1 ${#hdd_drives[@]}); do [ -e "${hdd_drives[$drive]}" ] && \ hdd_temp[${#hdd_temp[@]}]="$(smartctl -A ${hdd_drives[$drive]} -d $hddtype | \ grep -i temperature | \ awk '{for (i=10; i<=NF; i++) printf("%s ",$i);printf ("\n")}') C" done } # check fan speed check_fan() { fans="$(grep -i 'fan' <<< "${sensordata}" | cut -d'(' -f 1 )" } # check voltages check_voltages() { # parse all voltages nicely and put into one string voltages="$(sensors | grep -E '[0-9]{2}\ V' | \ cut -d'(' -f 1 | sed 's/\ *//g ; s/:/\ =\ /' | \ tr '\n' '; ' )" } main() { # temperature if [ $check_temp -eq 1 ]; then check_temp local cpu_status=0 # if either temp exceeds critical.. [ "$critical" ] && \ if [ $(grep -Eo '[0-9]+' <<< ${cpu_temp}) -ge $critical ]; then # [ $(grep -Eo '[0-9]+' <<< ${mobo_temp}) -ge $critical ]; then echo -n "[CRITICAL] " cpu_status=2 fi # if either temp exceeds warning... [ "$warning" ] && \ if [ $(grep -Eo '[0-9]+' <<< ${cpu_temp}) -ge $warning ]; then # [ $(grep -Eo '[0-9]+' <<< ${mobo_temp}) -ge $warning ]; then echo "[WARNING] " cpu_status=1 fi # output data echo -n "CPU = ${cpu_temp} MOTHERBOARD = ${mobo_temp} " for drive in $(seq 1 1 ${#hdd_drives[@]}); do echo -n "${hdd_drives[$drive]} = ${hdd_temp[$drive]} " done exit $cpu_status # fan elif [ $check_fan -eq 1 ]; then check_fan local fan_status=0 local worst_state=0 IFS_bak="$IFS" IFS=$'\n' for fan in $fans; do fan_status=0 fan_name="$(awk -F':' {'print $1'} <<< $fan )" speed="$(awk /[0-9]+/{'print $2'} <<< $fan)" # if a fan exceeds critical.. [ "$critical" ] && \ if [ $speed -le $critical ]; then fan_status=2 fi # if a fan exceeds warning.. [ "$warning" ] && \ if [ $speed -le $warning ]; then fan_status=1 fi # normal status -eq 0 [ $fan_status -eq 2 ] && echo -n "[CRITICAL]: " [ $fan_status -eq 1 ] && echo -n "[WARNING]: " echo -n "${fan_name} = ${speed} RPM " # remember worst state [ $fan_status -gt $worst_state ] && $worst_state=$fan_status done echo exit $worst_state # voltages elif [ $check_voltages -eq 1 ]; then # no critical/warning for voltages! check_voltages echo "$voltages" exit 0 # default operation else if echo ${sensordata} | egrep ALARM > /dev/null; then echo SENSOR CRITICAL - Sensor alarm detected! exit 2 else echo sensor ok exit 0 fi fi } # parse cmd arguments if [ "$#" -gt 0 ]; then while [ "$#" -gt 0 ]; do case "$1" in '--help'|'-h') print_help exit 3 ;; '--version'|'-V') print_revision $PROGNAME $REVISION exit 3 ;; '--verbose'|'-v') isverbose=1 shift 1 ;; '-T'|'--type') case $2 in 'temp'|'temperature') check_temp=1 check_smart=1 ;; 'voltages') check_voltages=1 ;; 'fan') check_fan=1 ;; *) echo "Unknown type!" exit 3 ;; esac shift 2 ;; '-c') critical="$2" shift 2 ;; '-w') warning="$2" shift 2 ;; '-d') form_hdd_array "$2" # drives are now in $hdd_drives[] shift 2 ;; '-dd') hddtype="$2" ;; *) echo "Unknown option!" print_usage exit 3 ;; esac done fi main -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.karabedyants at dgma.donetsk.ua Mon Sep 11 12:26:59 2006 From: v.karabedyants at dgma.donetsk.ua (=?koi8-r?B?98nL1M/SIOvB0sHCxcTRzsM=?=) Date: Mon, 11 Sep 2006 13:26:59 +0300 Subject: [Nagiosplug-devel] error on freebsd 6.0 Message-ID: <000601c6d58c$d0a52760$6311a8c0@dsea.intra.net> uname -a FreeBSD freeNAGIOS 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov 3 09:36:13 UTC 2005 root at x64.samsco.home:/usr/obj/usr/src/sys/GENERIC i386 # ./check_dhcp Error: Could not bind to DHCP socket (port 68)! Check your privileges... freeNAGIOS# ps -ax PID TT STAT TIME COMMAND 0 ?? WLs 0:00.00 [swapper] 1 ?? SLs 0:12.76 /sbin/init -- 2 ?? DL 0:27.27 [g_event] 3 ?? DL 0:48.36 [g_up] 4 ?? DL 0:59.74 [g_down] 5 ?? DL 0:00.00 [thread taskq] 6 ?? DL 0:00.00 [kqueue taskq] 7 ?? DL 0:00.00 [acpi_task0] 8 ?? DL 0:00.00 [acpi_task1] 9 ?? DL 0:00.00 [acpi_task2] 10 ?? DL 0:00.00 [ktrace] 11 ?? RL 4175:50.34 [idle] 12 ?? WL 0:00.00 [irq0: clk] 13 ?? WL 0:00.01 [irq1: atkbd0] 14 ?? WL 0:00.00 [irq3: sio1] 15 ?? WL 0:00.00 [irq4: sio0] 16 ?? WL 0:00.00 [irq5:] 17 ?? WL 0:00.00 [irq6: fdc0] 18 ?? WL 0:00.00 [irq7: ppc0] 19 ?? WL 0:00.00 [irq8: rtc] 20 ?? WL 0:00.00 [irq9: uhci0 acpi0] 21 ?? WL 0:29.66 [irq10: rl0] 22 ?? WL 0:00.00 [irq11:] 23 ?? WL 0:00.00 [irq12:] 24 ?? WL 0:00.00 [irq13:] 25 ?? WL 0:12.18 [irq14: ata0] 26 ?? WL 0:00.00 [irq15: ata1] 27 ?? WL 6:07.43 [swi4: clock sio] 28 ?? WL 0:00.00 [swi3: vm] 29 ?? WL 0:37.04 [swi1: net] 30 ?? DL 0:30.99 [yarrow] 31 ?? WL 0:00.00 [swi6:+] 32 ?? WL 0:00.00 [swi5:+] 33 ?? WL 0:00.00 [swi2: cambio] 34 ?? WL 0:00.00 [swi6: task queue] 35 ?? DL 0:00.05 [usb0] 36 ?? DL 0:00.00 [usbtask] 37 ?? DL 0:02.63 [fdc0] 38 ?? WL 0:00.00 [swi0: sio] 39 ?? DL 0:02.25 [pagedaemon] 40 ?? DL 0:00.00 [vmdaemon] 41 ?? DL 7:20.76 [pagezero] 42 ?? DL 0:03.12 [bufdaemon] 43 ?? DL 0:05.05 [vnlru] 44 ?? DL 0:37.49 [syncer] 45 ?? IL 0:00.00 [nfsiod 0] 46 ?? IL 0:00.00 [nfsiod 1] 47 ?? IL 0:00.00 [nfsiod 2] 48 ?? IL 0:00.00 [nfsiod 3] 49 ?? DL 0:22.98 [schedcpu] 228 ?? Is 0:00.01 /sbin/devd 257 ?? Ss 0:04.01 /usr/sbin/syslogd -s 339 ?? Is 0:00.60 /usr/sbin/usbd 380 ?? Is 0:00.02 /usr/sbin/sshd 393 ?? Is 0:01.86 /usr/sbin/cron -s 421 ?? Is 0:00.00 /usr/sbin/inetd -wW -C 60 60713 ?? Ss 0:01.19 sshd: root at ttyp0 (sshd) 61270 ?? Ss 0:00.08 /usr/local/sbin/httpd 61271 ?? I 0:00.02 /usr/local/sbin/httpd 61272 ?? I 0:00.03 /usr/local/sbin/httpd 61273 ?? I 0:00.02 /usr/local/sbin/httpd 61274 ?? I 0:00.02 /usr/local/sbin/httpd 61275 ?? I 0:00.02 /usr/local/sbin/httpd 61375 ?? I 0:00.01 /usr/local/sbin/httpd 62468 ?? I 0:00.02 /usr/local/sbin/httpd 63536 ?? S 0:00.01 ./nagios -d /usr/local/nagios/etc/nagios.cfg 63537 ?? RE 0:00.02 [sh] 63540 ?? S 0:00.03 send-mail -i nagios-admin at localhost (sendmail) 98860 ?? Ss 10:19.05 ./nagios -d /usr/local/nagios/etc/nagios.cfg 437 v0 Is+ 0:00.01 /usr/libexec/getty Pc ttyv0 438 v1 Is+ 0:00.01 /usr/libexec/getty Pc ttyv1 439 v2 Is+ 0:00.01 /usr/libexec/getty Pc ttyv2 440 v3 Is+ 0:00.01 /usr/libexec/getty Pc ttyv3 441 v4 Is+ 0:00.01 /usr/libexec/getty Pc ttyv4 442 v5 Is+ 0:00.01 /usr/libexec/getty Pc ttyv5 443 v6 Is+ 0:00.01 /usr/libexec/getty Pc ttyv6 444 v7 Is+ 0:00.01 /usr/libexec/getty Pc ttyv7 60716 p0 Ss 0:00.08 -csh (csh) 63545 p0 R+ 0:00.00 ps -ax Please Help me !!!! -------------- next part -------------- An HTML attachment was scrubbed... URL: From v.karabedyants at dgma.donetsk.ua Mon Sep 11 13:25:24 2006 From: v.karabedyants at dgma.donetsk.ua (=?koi8-r?B?98nL1M/SIOvB0sHCxcTRzsM=?=) Date: Mon, 11 Sep 2006 14:25:24 +0300 Subject: [Nagiosplug-devel] error on freebsd 6.0 References: <000601c6d58c$d0a52760$6311a8c0@dsea.intra.net> Message-ID: <001501c6d594$f98c85d0$6311a8c0@dsea.intra.net> # ./check_dhcp -V check_dhcp (nagios-plugins 1.4.3) 1.1 nagios version 2.5 ----- Original Message ----- From: ?????? ?????????? ; nagiosplug-devel-bounces at lists.sourceforge.net To: nagiosplug-devel at lists.sourceforge.net Sent: Monday, September 11, 2006 1:26 PM Subject: [Nagiosplug-devel] error on freebsd 6.0 uname -a FreeBSD freeNAGIOS 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov 3 09:36:13 UTC 2005 root at x64.samsco.home:/usr/obj/usr/src/sys/GENERIC i386 # ./check_dhcp Error: Could not bind to DHCP socket (port 68)! Check your privileges... freeNAGIOS# ps -ax PID TT STAT TIME COMMAND 0 ?? WLs 0:00.00 [swapper] 1 ?? SLs 0:12.76 /sbin/init -- 2 ?? DL 0:27.27 [g_event] 3 ?? DL 0:48.36 [g_up] 4 ?? DL 0:59.74 [g_down] 5 ?? DL 0:00.00 [thread taskq] 6 ?? DL 0:00.00 [kqueue taskq] 7 ?? DL 0:00.00 [acpi_task0] 8 ?? DL 0:00.00 [acpi_task1] 9 ?? DL 0:00.00 [acpi_task2] 10 ?? DL 0:00.00 [ktrace] 11 ?? RL 4175:50.34 [idle] 12 ?? WL 0:00.00 [irq0: clk] 13 ?? WL 0:00.01 [irq1: atkbd0] 14 ?? WL 0:00.00 [irq3: sio1] 15 ?? WL 0:00.00 [irq4: sio0] 16 ?? WL 0:00.00 [irq5:] 17 ?? WL 0:00.00 [irq6: fdc0] 18 ?? WL 0:00.00 [irq7: ppc0] 19 ?? WL 0:00.00 [irq8: rtc] 20 ?? WL 0:00.00 [irq9: uhci0 acpi0] 21 ?? WL 0:29.66 [irq10: rl0] 22 ?? WL 0:00.00 [irq11:] 23 ?? WL 0:00.00 [irq12:] 24 ?? WL 0:00.00 [irq13:] 25 ?? WL 0:12.18 [irq14: ata0] 26 ?? WL 0:00.00 [irq15: ata1] 27 ?? WL 6:07.43 [swi4: clock sio] 28 ?? WL 0:00.00 [swi3: vm] 29 ?? WL 0:37.04 [swi1: net] 30 ?? DL 0:30.99 [yarrow] 31 ?? WL 0:00.00 [swi6:+] 32 ?? WL 0:00.00 [swi5:+] 33 ?? WL 0:00.00 [swi2: cambio] 34 ?? WL 0:00.00 [swi6: task queue] 35 ?? DL 0:00.05 [usb0] 36 ?? DL 0:00.00 [usbtask] 37 ?? DL 0:02.63 [fdc0] 38 ?? WL 0:00.00 [swi0: sio] 39 ?? DL 0:02.25 [pagedaemon] 40 ?? DL 0:00.00 [vmdaemon] 41 ?? DL 7:20.76 [pagezero] 42 ?? DL 0:03.12 [bufdaemon] 43 ?? DL 0:05.05 [vnlru] 44 ?? DL 0:37.49 [syncer] 45 ?? IL 0:00.00 [nfsiod 0] 46 ?? IL 0:00.00 [nfsiod 1] 47 ?? IL 0:00.00 [nfsiod 2] 48 ?? IL 0:00.00 [nfsiod 3] 49 ?? DL 0:22.98 [schedcpu] 228 ?? Is 0:00.01 /sbin/devd 257 ?? Ss 0:04.01 /usr/sbin/syslogd -s 339 ?? Is 0:00.60 /usr/sbin/usbd 380 ?? Is 0:00.02 /usr/sbin/sshd 393 ?? Is 0:01.86 /usr/sbin/cron -s 421 ?? Is 0:00.00 /usr/sbin/inetd -wW -C 60 60713 ?? Ss 0:01.19 sshd: root at ttyp0 (sshd) 61270 ?? Ss 0:00.08 /usr/local/sbin/httpd 61271 ?? I 0:00.02 /usr/local/sbin/httpd 61272 ?? I 0:00.03 /usr/local/sbin/httpd 61273 ?? I 0:00.02 /usr/local/sbin/httpd 61274 ?? I 0:00.02 /usr/local/sbin/httpd 61275 ?? I 0:00.02 /usr/local/sbin/httpd 61375 ?? I 0:00.01 /usr/local/sbin/httpd 62468 ?? I 0:00.02 /usr/local/sbin/httpd 63536 ?? S 0:00.01 ./nagios -d /usr/local/nagios/etc/nagios.cfg 63537 ?? RE 0:00.02 [sh] 63540 ?? S 0:00.03 send-mail -i nagios-admin at localhost (sendmail) 98860 ?? Ss 10:19.05 ./nagios -d /usr/local/nagios/etc/nagios.cfg 437 v0 Is+ 0:00.01 /usr/libexec/getty Pc ttyv0 438 v1 Is+ 0:00.01 /usr/libexec/getty Pc ttyv1 439 v2 Is+ 0:00.01 /usr/libexec/getty Pc ttyv2 440 v3 Is+ 0:00.01 /usr/libexec/getty Pc ttyv3 441 v4 Is+ 0:00.01 /usr/libexec/getty Pc ttyv4 442 v5 Is+ 0:00.01 /usr/libexec/getty Pc ttyv5 443 v6 Is+ 0:00.01 /usr/libexec/getty Pc ttyv6 444 v7 Is+ 0:00.01 /usr/libexec/getty Pc ttyv7 60716 p0 Ss 0:00.08 -csh (csh) 63545 p0 R+ 0:00.00 ps -ax Please Help me !!!! # This e-mail and any attached documents may contain confidential or proprietary information. If you are not the intended recipient, please advise the sender immediately and delete this e-mail and all attached documents from your computer system. Any unauthorised disclosure, distribution or copying hereof is prohibited. Ce courriel et les documents qui y sont attaches peuvent contenir des informations confidentielles. Au cas ou vous ne seriez pas le destinataire de ce courriel, vous etes prie d'en informer l'expediteur immediatement et de le detruire ainsi que tous les documents attaches de votre systeme informatique. Toute divulgation, distribution ou copie du present courriel et des documents attaches sans autorisation prealable de son emetteur est interdite. # ------------------------------------------------------------------------------ ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ------------------------------------------------------------------------------ _______________________________________________________ Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel ::: Please include plugins version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null -------------- next part -------------- An HTML attachment was scrubbed... URL: From ae at op5.se Mon Sep 11 13:49:20 2006 From: ae at op5.se (Andreas Ericsson) Date: Mon, 11 Sep 2006 13:49:20 +0200 Subject: [Nagiosplug-devel] error on freebsd 6.0 In-Reply-To: <000601c6d58c$d0a52760$6311a8c0@dsea.intra.net> References: <000601c6d58c$d0a52760$6311a8c0@dsea.intra.net> Message-ID: <45054D40.2010806@op5.se> ?????? ?????????? wrote: > uname -a > FreeBSD freeNAGIOS 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov 3 09:36:13 UTC 2005 root at x64.samsco.home:/usr/obj/usr/src/sys/GENERIC i386 > # ./check_dhcp > Error: Could not bind to DHCP socket (port 68)! Check your privileges... > check_dhcp needs to bind a socket to a port in the privileged range (1-1024). In order to do this, it must be run as root. To set it to always run as root, you can do the following (also as root) chown root:root check_dhcp chmod 4755 check_dhcp Note that there are other trickeries which one can resort to in order to let a single process execute certain commands as root, and yet others to allow programs running as arbitrary users to bind ports in the privileged range. Such trickery generally provides a better security but are also more cumbersome to set up. Google probably provides ample resources on how to implement such a solution for your particular system should you prefer not to take the actions posted above. -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 From noreply at sourceforge.net Tue Sep 12 09:24:30 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 12 Sep 2006 00:24:30 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1556886 ] check_ntp ---> Memory fault Message-ID: Bugs item #1556886, was opened at 2006-09-12 03:24 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1556886&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Ciro Iriarte (cyruspy) Assigned to: Nobody/Anonymous (nobody) Summary: check_ntp ---> Memory fault Initial Comment: The plugin works fine if i don't ask for jitter checking, but if i do it just gives Memory Fault. Linux x86_64: asusis-ope2:/etc/nagios # /usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j 2 -k 3 Segmentation fault asusis-ope2:/etc/nagios # /usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j 2.0 -k 3.0 Segmentation fault asusis-ope2:/etc/nagios # /usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j 2,0 -k 3,0 Segmentation fault Tru64: iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins> ./check_ntp -H 10.129.4.140 -j 2 -k 3 Memory fault iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins> ./check_ntp -H 10.129.4.140 -j 2.0 -k 3.0 Memory fault iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins> ./check_ntp -H 10.129.4.140 -j 2,0 -k 3,0 Memory fault ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1556886&group_id=29880 From noreply at sourceforge.net Tue Sep 12 09:25:01 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 12 Sep 2006 00:25:01 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1556886 ] check_ntp ---> Memory fault Message-ID: Bugs item #1556886, was opened at 2006-09-12 03:24 Message generated for change (Settings changed) made by cyruspy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1556886&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. >Category: Argument proccessing >Group: CVS Status: Open Resolution: None Priority: 5 Submitted By: Ciro Iriarte (cyruspy) Assigned to: Nobody/Anonymous (nobody) Summary: check_ntp ---> Memory fault Initial Comment: The plugin works fine if i don't ask for jitter checking, but if i do it just gives Memory Fault. Linux x86_64: asusis-ope2:/etc/nagios # /usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j 2 -k 3 Segmentation fault asusis-ope2:/etc/nagios # /usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j 2.0 -k 3.0 Segmentation fault asusis-ope2:/etc/nagios # /usr/lib/nagios/plugins/check_ntp -H 10.129.4.140 -j 2,0 -k 3,0 Segmentation fault Tru64: iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins> ./check_ntp -H 10.129.4.140 -j 2 -k 3 Memory fault iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins> ./check_ntp -H 10.129.4.140 -j 2.0 -k 3.0 Memory fault iriartec at es45-1:/usr/users/iriartec/src/nagios-plugins-HEAD-200609062352/plugins> ./check_ntp -H 10.129.4.140 -j 2,0 -k 3,0 Memory fault ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1556886&group_id=29880 From noreply at sourceforge.net Wed Sep 13 05:19:29 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 12 Sep 2006 20:19:29 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Feature Requests-1525717 ] Performance data in check_disk Message-ID: Feature Requests item #1525717, was opened at 2006-07-20 02:42 Message generated for change (Settings changed) made by cyruspy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397600&aid=1525717&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Deleted Priority: 5 Submitted By: Ciro Iriarte (cyruspy) Assigned to: Nobody/Anonymous (nobody) Summary: Performance data in check_disk Initial Comment: Is it going to be added again to check_disk after the last fixes? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397600&aid=1525717&group_id=29880 From gary at primeexalia.com Wed Sep 13 06:25:45 2006 From: gary at primeexalia.com (Gary W. Smith) Date: Tue, 12 Sep 2006 21:25:45 -0700 Subject: [Nagiosplug-devel] Weird plugin failure with nrpe Message-ID: <57F9959B46E0FA4D8BA88AEDFBE5829024E8A9@pxtbenexd01.pxt.primeexalia.com> I have two boxes with different distro's. Box 1 is a RHEL4 (testnodeb). On this box everything seems to work fine (or fine enough). Box 2 is based on rPath (testnodec). I have compiled and installed the nagios-plugins on both boxes. They appear to work fine from the command line. Both return the expected results. We run into a problem when calling check_nrpe with the check_mailq command. Here is the debug output: Sep 12 20:09:35 testnodec nrpe[10599]: Connection from 10.0.12.30 port 34830 Sep 12 20:09:35 testnodec nrpe[10599]: Host address is in allowed_hosts Sep 12 20:09:35 testnodec nrpe[10599]: Handling the connection... Sep 12 20:09:35 testnodec nrpe[10599]: Host is asking for command 'check_load' to be run... Sep 12 20:09:35 testnodec nrpe[10599]: Running command: /usr/lib/nagios/plugins/check_load -w 15,10,5 -c 30,25,20 Sep 12 20:09:35 testnodec nrpe[10599]: Command completed with return code 0 and output: OK - load average: 0.15, 0.24, 0.12|load1=0.150;15.000;30.000;0; load5=0.240;10.000;25.000;0; load15=0.120;5.000;20.000;0; Sep 12 20:09:35 testnodec nrpe[10599]: Return Code: 0, Output: OK - load average: 0.15, 0.24, 0.12|load1=0.150;15.000;30.000;0; load5=0.240;10.000;25.000;0; load15=0.120;5.000;20.000;0; Sep 12 20:09:35 testnodec nrpe[10599]: Connection from 10.0.12.30 closed. Sep 12 20:09:37 testnodec nrpe[10603]: Connection from 10.0.12.30 port 35086 Sep 12 20:09:37 testnodec nrpe[10603]: Host address is in allowed_hosts Sep 12 20:09:37 testnodec nrpe[10603]: Handling the connection... Sep 12 20:09:37 testnodec nrpe[10603]: Host is asking for command 'check_mailq' to be run... Sep 12 20:09:37 testnodec nrpe[10603]: Running command: /usr/lib/nagios/plugins/check_mailq -w 50 -c 100 -M postfix Sep 12 20:09:38 testnodec nrpe[10603]: Command completed with return code 2 and output: Sep 12 20:09:38 testnodec nrpe[10603]: Return Code: 2, Output: NRPE: Unable to read output Sep 12 20:09:38 testnodec nrpe[10603]: Connection from 10.0.12.30 closed. [root at testnodec plugins]# /usr/lib/nagios/plugins/check_mailq -w 50 -c 100 -M postfix OK: mailq (7) is below threshold (50/100)|unsent=7;50;100;0 On the rPath box you can see that running check_mailq from the command line works just fine. But calling it from nrpe ends with Unable to read output. Again, on the RHEL4 box everything works fine. My intent is to port this over to rPath. I have also verified that the check_mailq file (which is a perl script) is identical on both boxes. I was wondering if anyone has some ideas on this? Gary Wayne Smith -------------- next part -------------- An HTML attachment was scrubbed... URL: From moshesharon at gmail.com Wed Sep 13 10:23:59 2006 From: moshesharon at gmail.com (moshe sharon) Date: Wed, 13 Sep 2006 10:23:59 +0200 Subject: [Nagiosplug-devel] Weird plugin failure with nrpe In-Reply-To: <57F9959B46E0FA4D8BA88AEDFBE5829024E8A9@pxtbenexd01.pxt.primeexalia.com> References: <57F9959B46E0FA4D8BA88AEDFBE5829024E8A9@pxtbenexd01.pxt.primeexalia.com> Message-ID: <88ad29240609130123x7bed8b61le9ddf66b2392f3ae@mail.gmail.com> Hello I'm guessing its permissions problems. please run your check_command with the user you running NRPE. -- Moshe Sharon http://www.centerity.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From lewis at wsc.com Wed Sep 13 16:51:11 2006 From: lewis at wsc.com (lewis at wsc.com) Date: Wed, 13 Sep 2006 10:51:11 -0400 Subject: [Nagiosplug-devel] Troubles with Check_mem.pl Message-ID: <852D587BA6C9634FA0797B5A59D2819C86B19C@VOO-EXCHANGE03.internal.sungard.corp> On Red Hat AS 3 systems, with perl 5.8.0 the check_mem.pl script is an unreliable indicator of the remaining memory. I've had cases where it reports a problem where none exists, or fails to report a problem where memory is critically low. I'm not an experienced perl programmer, but I swapped in some code to use top, instead of vmstat, and then to deal with the output from that operation. I think it works better. A patch file is attached. The original work is GPL'ed so these derivative modifications are as well, if anyone cares to use this change. I'd be happy to hear why this change *won't* work, by the way. Be well, Karl Karl W. Lewis Wall Street Concepts 44 Wall Street New York, NY 10005 (646) 443-8791 (212) 797-9897 FAX -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: check_mem_pl_patch Type: application/octet-stream Size: 1489 bytes Desc: check_mem_pl_patch URL: From Thomas at zango.com Wed Sep 13 17:01:15 2006 From: Thomas at zango.com (Thomas Guyot-Sionnest) Date: Wed, 13 Sep 2006 08:01:15 -0700 Subject: [Nagiosplug-devel] Troubles with Check_mem.pl Message-ID: free is likely the command you'll want to use. Invoked as "free -k" it will report the same numbers as top (You can also get them in -b(ytes) -m(egs) and -g(igs)), but should run much faster and be easier to parse. Thomas > -----Original Message----- > From: nagiosplug-devel-bounces at lists.sourceforge.net > [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On > Behalf Of lewis at wsc.com > Sent: September 13, 2006 10:51 > To: nagiosplug-devel at lists.sourceforge.net > Subject: [Nagiosplug-devel] Troubles with Check_mem.pl > > On Red Hat AS 3 systems, with perl 5.8.0 the check_mem.pl > script is an unreliable indicator of the remaining memory. > I've had cases where it reports a problem where none exists, > or fails to report a problem where memory is critically low. > > > > I'm not an experienced perl programmer, but I swapped in some > code to use top, instead of vmstat, and then to deal with the > output from that operation. I think it works better. > > > > A patch file is attached. The original work is GPL'ed so > these derivative modifications are as well, if anyone cares > to use this change. > > > > I'd be happy to hear why this change *won't* work, by the way. > > > > Be well, > > > > Karl > > > > Karl W. Lewis > > Wall Street Concepts > > 44 Wall Street > > New York, NY 10005 > > (646) 443-8791 > > (212) 797-9897 FAX > > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3022 bytes Desc: not available URL: From gary at primeexalia.com Wed Sep 13 18:19:28 2006 From: gary at primeexalia.com (Gary W. Smith) Date: Wed, 13 Sep 2006 09:19:28 -0700 Subject: [Nagiosplug-devel] Weird plugin failure with nrpe In-Reply-To: <88ad29240609130123x7bed8b61le9ddf66b2392f3ae@mail.gmail.com> Message-ID: <57F9959B46E0FA4D8BA88AEDFBE5829024E8AA@pxtbenexd01.pxt.primeexalia.com> Moshe, That's what I thought at first (I dug around before asking the question). What I ended up doing is renaming check_mailq and creating a wrapper that logged the output. Check_mailq apparently couldn't find utils.pm when running from nrpe but it can locally. If I added a cd /path/to/utils.pm in that script it works fine. Gary Wayne Smith ________________________________________ From: nagiosplug-devel-bounces at lists.sourceforge.net [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On Behalf Of moshe sharon Sent: Wednesday, September 13, 2006 1:24 AM To: Nagios Plugin Development Mailing List Subject: Re: [Nagiosplug-devel] Weird plugin failure with nrpe Hello ? I'm guessing its permissions problems. please run your check_command with the user you running NRPE. ? --? Moshe Sharon http://www.centerity.com From Thomas at zango.com Wed Sep 13 21:06:03 2006 From: Thomas at zango.com (Thomas Guyot-Sionnest) Date: Wed, 13 Sep 2006 12:06:03 -0700 Subject: [Nagiosplug-devel] Troubles with Check_mem.pl Message-ID: It's a good idea to submit a new patch so other users may use it... The best thing to do is file a bug report on http://sourceforge.net/projects/nagiosplug/ and then upload your patch in the bug report as a suggestion to fix the problem. BTW I just tested and I see what's wrong. On my system it uses the buff column instead of the free column, and uses the free column as used (my vmstat doesn't provide a used collumn, it looks like the guy who wrote this script has a different vmstat). Also, it should be allowed to substract buffers and cache from the memory count. On systems with very constant memory usage you may end up having no free memory but a lot of cached memory that can be used right away if an application needs it. Ex, on a one server I have 99.8% ram used, but I have 5.7G (Yeah, this is Gigs) of cached memory. If I substract buffers and cache I go down to 81% A system low on memory will have almost no buffers and cache. Buffers and cache are used to speed-up the system when memory is available. Thomas > -----Original Message----- > From: lewis at wsc.com [mailto:lewis at wsc.com] > Sent: September 13, 2006 11:38 > To: Thomas Guyot-Sionnest > Subject: RE: [Nagiosplug-devel] Troubles with Check_mem.pl > > [Responding off-list, because I'm not sure of the appropriate > etiquette; > I don't wish to pester *everyone* with this conversation.] > > Oooooh. Yes, that is a better idea, thanks. May I make that change > and then resubmit the patch, or should I just make the change > in my own > stuff and assume no one else cares? > > It isn't so much easier to parse... (the computer does almost all that > work), but it is much faster. > > Thanks again. > > Be well, > > Karl > > -----Original Message----- > From: nagiosplug-devel-bounces at lists.sourceforge.net > [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On Behalf Of > Thomas Guyot-Sionnest > Sent: Wednesday, September 13, 2006 11:01 AM > To: Nagios Plugin Development Mailing List > Subject: Re: [Nagiosplug-devel] Troubles with Check_mem.pl > > free is likely the command you'll want to use. Invoked as "free -k" it > will > report the same numbers as top (You can also get them in -b(ytes) > -m(egs) > and -g(igs)), but should run much faster and be easier to parse. > > Thomas > > > -----Original Message----- > > From: nagiosplug-devel-bounces at lists.sourceforge.net > > [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On > > Behalf Of lewis at wsc.com > > Sent: September 13, 2006 10:51 > > To: nagiosplug-devel at lists.sourceforge.net > > Subject: [Nagiosplug-devel] Troubles with Check_mem.pl > > > > On Red Hat AS 3 systems, with perl 5.8.0 the check_mem.pl > > script is an unreliable indicator of the remaining memory. > > I've had cases where it reports a problem where none exists, > > or fails to report a problem where memory is critically low. > > > > > > > > I'm not an experienced perl programmer, but I swapped in some > > code to use top, instead of vmstat, and then to deal with the > > output from that operation. I think it works better. > > > > > > > > A patch file is attached. The original work is GPL'ed so > > these derivative modifications are as well, if anyone cares > > to use this change. > > > > > > > > I'd be happy to hear why this change *won't* work, by the way. > > > > > > > > Be well, > > > > > > > > Karl > > > > > > > > Karl W. Lewis > > > > Wall Street Concepts > > > > 44 Wall Street > > > > New York, NY 10005 > > > > (646) 443-8791 > > > > (212) 797-9897 FAX > > > > > > > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3022 bytes Desc: not available URL: From stuart.beck at mnetcorporation.com Thu Sep 14 03:32:32 2006 From: stuart.beck at mnetcorporation.com (Stuart Beck) Date: Thu, 14 Sep 2006 11:02:32 +0930 Subject: [Nagiosplug-devel] acknowledgement status macro Message-ID: <4508B130.5010503@mnetcorporation.com> Hi, I'm trying to write a small script that works similar to the cluster2 plugin Basic idea: problem states for several services are passed through and aggregated in the new plugin, any criticals / warnings are alerted appropriately. if a service enters critical state without being acknowledged, the new plugin goes to critical state, and when the problem has been acknowledged the plugin moves back to warning state, this way if another service attached to the plugin goes critical I get a new critical alert for the clustered cervice. So I want to be able to have the acknowledgement status passed up the chain to the plugin, however I cannot find a macro for the acknowledgement status. does such a beast exist or am I doomed to failure until nagios is updated to include it? -- Stuart Beck Systems Administrator m.Net Corporation Level 13, 99 Gawler Place Adelaide SA 5000, Australia From michael_luebben at web.de Mon Sep 18 09:26:39 2006 From: michael_luebben at web.de (=?iso-8859-15?Q?Michael_L=FCbben?=) Date: Mon, 18 Sep 2006 09:26:39 +0200 Subject: [Nagiosplug-devel] Changes and Bugfixing on Plugin check_sap.sh Message-ID: <724565839@web.de> Hello together, i've made little changes on the plugin check_sap.sh: 1.) It output now error-messages, when SAP has a problem! This was a Idea from Joerg Linge! 2.) When sapinfo timed out, the plugin give a ok to nagios back! This is a bug! This was fixed in this plugin! Bye Michael Luebben _______________________________________________________________________ Viren-Scan f?r Ihren PC! Jetzt f?r jeden. Sofort, online und kostenlos. Gleich testen! http://www.pc-sicherheit.web.de/freescan/?mc=022222 -------------- next part -------------- A non-text attachment was scrubbed... Name: check_sap.tar.gz Type: application/x-gzip Size: 1507 bytes Desc: not available URL: From axel.staacke at freenet-ag.de Mon Sep 18 09:26:57 2006 From: axel.staacke at freenet-ag.de (axel.staacke at freenet-ag.de) Date: Mon, 18 Sep 2006 09:26:57 +0200 Subject: [Nagiosplug-devel] Abwesenheitsnotiz In-Reply-To: <724565839@web.de> References: <724565839@web.de> Message-ID: Dieser Account steht nicht mehr zur Verf?gung. Bitte wenden Sie sich an From gary at primeexalia.com Tue Sep 19 20:33:53 2006 From: gary at primeexalia.com (Gary W. Smith) Date: Tue, 19 Sep 2006 11:33:53 -0700 Subject: [Nagiosplug-devel] check_nrpe question Message-ID: <57F9959B46E0FA4D8BA88AEDFBE58290193C83@pxtbenexd01.pxt.primeexalia.com> I have a nagios server that makes a call to a server running nrpe to collect data. The server running nrpe itself uses check_nt to collect some data from some Wintel boxes behind it's firewall. The nrpe server has the following command in place on the remote nrpe server. command[check_data_01_services]=/usr/lib/nagios/plugins/check_nt -H 10.94.64.4 -p 8244 -v SERVICESTATE -d SHOWALL -l MSExchangeIS,MSExchangeMGMT,MSExchangeMTA,MSExchangeSA,RESvc,MSSQL\$ATAC ENTER,SMTPSVC,SPTServer,W3SVC,lanmanserver,BackupExecAgentAccelerator,II SADMIN,Spooler This command when executed on the nagios box reports all okay. All seems good there. On the nagios server I call the remote nrpe command and I get the following error. /usr/lib/nagios/plugins/check_nrpe -H REMOTEHOST -p REMOTEPORT -c check_data_01_services MSExchangeIS: Started - MSExchangeMGMT: Started - MSExchangeMTA: Started - MSExchangeSA: Started - RESvc: Started - MSSQL$ATACENTER: Started - SMTPSVC: Started - SPTServer: Started - W3SVC: Started - lanmanserver: Started - BackupExecAgentAccelerator: Started - IISADMIN: Started - Spooler$: Unknown Note the $ after spooler. Even if I remove spooler from the nrpe config file it then dies on IISADMIN, etc. I have 3 other servers that I check in the same way without any siginificant problem. Here is the configuration portion of nagios. define service { service_description Service State use generic-service host_name REMOTEHOSTNAME check_command check_nrpe!check_data_01_services } define service { name generic-service is_volatile 0 check_period 24X7 max_check_attempts 5 normal_check_interval 30 retry_check_interval 1 active_checks_enabled 1 passive_checks_enabled 1 parallelize_check 1 obsess_over_service 1 check_freshness 1 freshness_threshold 0 notifications_enabled 1 notification_interval 120 notification_period 24X7 notification_options u,c,w,r event_handler_enabled 1 flap_detection_enabled 1 low_flap_threshold 0 high_flap_threshold 0 process_perf_data 1 retain_status_information 1 retain_nonstatus_information 1 contact_groups all-admins register 0 } Any ideas? -------------- next part -------------- An HTML attachment was scrubbed... URL: From Thomas at zango.com Tue Sep 19 21:55:15 2006 From: Thomas at zango.com (Thomas Guyot-Sionnest) Date: Tue, 19 Sep 2006 12:55:15 -0700 Subject: [Nagiosplug-devel] check_nrpe question Message-ID: I had the same problem but in in a different context. I'm not sure it it will help, but try: - replacing the \ by $ ('$$' instead of '\$') - removing the \ before the $ - Each change above while enclosing the service list in single quotes ([...] -l 'serv1,serv$$23,etc' [...]) As a last resort you could add a comma at the end of the list, so all checks will be performed but you will allways see something like ": Unknown". Return status should be ok as well. Good luck... Thomas > -----Original Message----- > From: nagiosplug-devel-bounces at lists.sourceforge.net > [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On > Behalf Of Gary W. Smith > Sent: September 19, 2006 14:34 > To: nagiosplug-devel at lists.sourceforge.net > Subject: [Nagiosplug-devel] check_nrpe question > > I have a nagios server that makes a call to a server running > nrpe to collect data. The server running nrpe itself uses > check_nt to collect some data from some Wintel boxes behind > it's firewall. > > The nrpe server has the following command in place on the > remote nrpe server. > > command[check_data_01_services]=/usr/lib/nagios/plugins/check_ nt -H 10.94.64.4 -p 8244 -v SERVICESTATE -d SHOWALL -l > MSExchangeIS,MSExchangeMGMT,MSExchangeMTA,MSExchangeSA,RESvc,M > SSQL\$ATACENTER,SMTPSVC,SPTServer,W3SVC,lanmanserver,BackupExe > cAgentAccelerator,IISADMIN,Spooler > > This command when executed on the nagios box reports all > okay. All seems good there. > > On the nagios server I call the remote nrpe command and I get > the following error. > > /usr/lib/nagios/plugins/check_nrpe -H REMOTEHOST -p > REMOTEPORT -c check_data_01_services > > MSExchangeIS: Started - MSExchangeMGMT: Started - > MSExchangeMTA: Started - MSExchangeSA: Started - RESvc: > Started - MSSQL$ATACENTER: Started - SMTPSVC: Started - > SPTServer: Started - W3SVC: Started - lanmanserver: Started - > BackupExecAgentAccelerator: Started - IISADMIN: Started - > Spooler$: Unknown > > Note the $ after spooler. Even if I remove spooler from the > nrpe config file it then dies on IISADMIN, etc. I have 3 > other servers that I check in the same way without any > siginificant problem. > > > Here is the configuration portion of nagios. > > define service { > > service_description Service State > > use generic-service > > host_name REMOTEHOSTNAME > > check_command check_nrpe!check_data_01_services > > } > > define service { > > name generic-service > > is_volatile 0 > > check_period 24X7 > > max_check_attempts 5 > > normal_check_interval 30 > > retry_check_interval 1 > > active_checks_enabled 1 > > passive_checks_enabled 1 > > parallelize_check 1 > > obsess_over_service 1 > > check_freshness 1 > > freshness_threshold 0 > > notifications_enabled 1 > > notification_interval 120 > > notification_period 24X7 > > notification_options u,c,w,r > > event_handler_enabled 1 > > flap_detection_enabled 1 > > low_flap_threshold 0 > > high_flap_threshold 0 > > process_perf_data 1 > > retain_status_information 1 > > retain_nonstatus_information 1 > > contact_groups all-admins > > register 0 > > } > > Any ideas? > > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3022 bytes Desc: not available URL: From gary at primeexalia.com Tue Sep 19 22:10:56 2006 From: gary at primeexalia.com (Gary W. Smith) Date: Tue, 19 Sep 2006 13:10:56 -0700 Subject: [Nagiosplug-devel] check_nrpe question In-Reply-To: Message-ID: <57F9959B46E0FA4D8BA88AEDFBE58290193C85@pxtbenexd01.pxt.primeexalia.com> $$ and '' make it work fine now. Thanks. -----Original Message----- From: nagiosplug-devel-bounces at lists.sourceforge.net [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On Behalf Of Thomas Guyot-Sionnest Sent: Tuesday, September 19, 2006 12:55 PM To: Nagios Plugin Development Mailing List Subject: Re: [Nagiosplug-devel] check_nrpe question I had the same problem but in in a different context. I'm not sure it it will help, but try: - replacing the \ by $ ('$$' instead of '\$') - removing the \ before the $ - Each change above while enclosing the service list in single quotes ([...] -l 'serv1,serv$$23,etc' [...]) As a last resort you could add a comma at the end of the list, so all checks will be performed but you will allways see something like ": Unknown". Return status should be ok as well. Good luck... Thomas > -----Original Message----- > From: nagiosplug-devel-bounces at lists.sourceforge.net > [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On > Behalf Of Gary W. Smith > Sent: September 19, 2006 14:34 > To: nagiosplug-devel at lists.sourceforge.net > Subject: [Nagiosplug-devel] check_nrpe question > > I have a nagios server that makes a call to a server running > nrpe to collect data. The server running nrpe itself uses > check_nt to collect some data from some Wintel boxes behind > it's firewall. > > The nrpe server has the following command in place on the > remote nrpe server. > > command[check_data_01_services]=/usr/lib/nagios/plugins/check_ nt -H 10.94.64.4 -p 8244 -v SERVICESTATE -d SHOWALL -l > MSExchangeIS,MSExchangeMGMT,MSExchangeMTA,MSExchangeSA,RESvc,M > SSQL\$ATACENTER,SMTPSVC,SPTServer,W3SVC,lanmanserver,BackupExe > cAgentAccelerator,IISADMIN,Spooler > > This command when executed on the nagios box reports all > okay. All seems good there. > > On the nagios server I call the remote nrpe command and I get > the following error. > > /usr/lib/nagios/plugins/check_nrpe -H REMOTEHOST -p > REMOTEPORT -c check_data_01_services > > MSExchangeIS: Started - MSExchangeMGMT: Started - > MSExchangeMTA: Started - MSExchangeSA: Started - RESvc: > Started - MSSQL$ATACENTER: Started - SMTPSVC: Started - > SPTServer: Started - W3SVC: Started - lanmanserver: Started - > BackupExecAgentAccelerator: Started - IISADMIN: Started - > Spooler$: Unknown > > Note the $ after spooler. Even if I remove spooler from the > nrpe config file it then dies on IISADMIN, etc. I have 3 > other servers that I check in the same way without any > siginificant problem. > > > Here is the configuration portion of nagios. > > define service { > > service_description Service State > > use generic-service > > host_name REMOTEHOSTNAME > > check_command check_nrpe!check_data_01_services > > } > > define service { > > name generic-service > > is_volatile 0 > > check_period 24X7 > > max_check_attempts 5 > > normal_check_interval 30 > > retry_check_interval 1 > > active_checks_enabled 1 > > passive_checks_enabled 1 > > parallelize_check 1 > > obsess_over_service 1 > > check_freshness 1 > > freshness_threshold 0 > > notifications_enabled 1 > > notification_interval 120 > > notification_period 24X7 > > notification_options u,c,w,r > > event_handler_enabled 1 > > flap_detection_enabled 1 > > low_flap_threshold 0 > > high_flap_threshold 0 > > process_perf_data 1 > > retain_status_information 1 > > retain_nonstatus_information 1 > > contact_groups all-admins > > register 0 > > } > > Any ideas? > > From aravind at freeshell.org Wed Sep 20 08:31:49 2006 From: aravind at freeshell.org (Aravind Gottipati) Date: Wed, 20 Sep 2006 06:31:49 +0000 Subject: [Nagiosplug-devel] check_http - Possible bug following redirects. Message-ID: <20060920063149.GA15084@SDF.LONESTAR.ORG> Hi, I could not get check_http to follow http redirects. It fails in cases where the return headers have a line that starts with L like this example below. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= check_http -I 63.245.209.26 -H www.worldfirefoxday.com -f follow -v -u / GET / HTTP/1.0 User-Agent: check_http/1.81 (nagios-plugins 1.4.1) Host: www.worldfirefoxday.com http://63.245.209.26:80/ is 439 characters STATUS: HTTP/1.1 302 Found **** HEADER **** Date: Wed, 20 Sep 2006 06:12:31 GMT Server: Apache/2.0.52 (Red Hat) Last-Modified: Wed, 20 Sep 2006 06:12:31 GMT Pragma: no-cache Location: http://www.worldfirefoxday.com/en/ Content-Length: 0 Connection: close Content-Type: text/html; charset=UTF-8 **** CONTENT **** GET /Last-Modified: HTTP/1.0 User-Agent: check_http/1.81 (nagios-plugins 1.4.1) Host: www.worldfirefoxday.com http://www.worldfirefoxday.com:80/Last-Modified: is 483 characters STATUS: HTTP/1.1 404 Not Found -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The problem seems to be with line in the redir function in check_http.c if (sscanf (pos, "%[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]:%n", xx, &i) < 1) { Checking the value of i seems to be a better indicator of the match than the return value of sscanf. The following patch fixes this problem for me. Aravind. diff -uNr nagios-plugins-1.4.3/plugins/check_http.c nagios-plugins-1.4.3_new/plugins/check_http.c --- nagios-plugins-1.4.3/plugins/check_http.c 2006-04-05 00:58:27.000000000 -0700 +++ nagios-plugins-1.4.3_new/plugins/check_http.c 2006-08-30 02:34:35.000000000 -0700 @@ -1073,9 +1073,8 @@ die (STATE_UNKNOWN, _("Could not allocate url\n")); while (pos) { - - if (sscanf (pos, "%[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]:%n", xx, &i) < 1) { - + sscanf (pos, "%[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]:%n", xx, &i); + if (i == 0) { pos += (size_t) strcspn (pos, "\r\n"); pos += (size_t) strspn (pos, "\r\n"); if (strlen(pos) == 0) From harisekhon at gmail.com Wed Sep 20 12:44:10 2006 From: harisekhon at gmail.com (Hari Sekhon) Date: Wed, 20 Sep 2006 11:44:10 +0100 Subject: [Nagiosplug-devel] check_disk_smb Max Connections patch Message-ID: I was getting an annoying error with check_disk_smb saying that the output from smbclient was not suitable but I know this was occurring because the Windows machine had reached it's connection limit (workstation limited to 10 windows connections). So I had a look at the check_disk_smb script wrapper for smbclient and decided that I could add this condition. I downloaded the most recent version I could find ( nagios-plugins-HEAD-200609192352 ) and made the patch for that version where it is called check_disk_smb.pl in the hopes of making it easier for you devs to accept. The patch is attached. I now get the message "Max Number of Connections Reached. Request refused" for the status result NT_STATUS_REQUEST_NOT_ACCEPTED, which is nicer since it tells you what the problem is in Nagios alerts. I am using this successfully at the moment on an older version but I've re-made the patch for the new version for you guys. I'd also like to take this opportunity to apologise if this is not to your standards, I am not a perl programmer, I read some perl but don't code it professionally... yet. All suggestions welcome if I need improvement in any way. ps. thanks for the good work so far! -h -- Hari Sekhon -------------- next part -------------- A non-text attachment was scrubbed... Name: check_disk_smb.patch Type: application/octet-stream Size: 220 bytes Desc: not available URL: From noreply at sourceforge.net Thu Sep 21 02:41:57 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 20 Sep 2006 17:41:57 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1562572 ] check_http redirection fix Message-ID: Patches item #1562572, was opened at 2006-09-20 19:41 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1562572&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bugfix Group: None Status: Open Resolution: None Priority: 5 Submitted By: Aravind Gottipati (gottipati) Assigned to: Nobody/Anonymous (nobody) Summary: check_http redirection fix Initial Comment: check_http fails to follow http redirects. It fails in cases where the return headers have a line that starts with L like this example below. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= check_http -I 63.245.209.26 -H www.worldfirefoxday.com -f follow -v -u / GET / HTTP/1.0 User-Agent: check_http/1.81 (nagios-plugins 1.4.1) Host: www.worldfirefoxday.com http://63.245.209.26:80/ is 439 characters STATUS: HTTP/1.1 302 Found **** HEADER **** Date: Wed, 20 Sep 2006 06:12:31 GMT Server: Apache/2.0.52 (Red Hat) Last-Modified: Wed, 20 Sep 2006 06:12:31 GMT Pragma: no-cache Location: http://www.worldfirefoxday.com/en/ Content-Length: 0 Connection: close Content-Type: text/html; charset=UTF-8 **** CONTENT **** GET /Last-Modified: HTTP/1.0 User-Agent: check_http/1.81 (nagios-plugins 1.4.1) Host: www.worldfirefoxday.com http://www.worldfirefoxday.com:80/Last-Modified: is 483 characters STATUS: HTTP/1.1 404 Not Found -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The problem seems to be with this line in the redir function in check_http.c if (sscanf (pos, "%[Ll]%*[Oo]%*[Cc]%*[Aa]%*[Tt]%*[Ii]%*[Oo]%*[Nn]:%n", xx, &i) < 1) { Checking the value of i seems to be a better indicator of the match than the return value of sscanf. The following patch fixes this problem for me. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1562572&group_id=29880 From noreply at sourceforge.net Thu Sep 21 14:22:59 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 21 Sep 2006 05:22:59 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1562838 ] Check_mem.pl misreports on RHEL3 Message-ID: Bugs item #1562838, was opened at 2006-09-21 08:22 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1562838&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None Status: Open Resolution: None Priority: 5 Submitted By: Karl W. Lewis (theunbeliever) Assigned to: Nobody/Anonymous (nobody) Summary: Check_mem.pl misreports on RHEL3 Initial Comment: vmstat appears to work differently on RH EL R3 than in the original author's system, such that memory is reported as critical when there really is no problem. I've created a patch (attached) that converts to use "free" instead, and then it subtracts buffers and cache from used to arrive at the appropriate number. Thomas Guyot-Sionnest [Thomas at zango dot com] provided several helpful suggestions. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1562838&group_id=29880 From noreply at sourceforge.net Mon Sep 25 09:22:05 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 25 Sep 2006 00:22:05 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1564880 ] check_ping does not work! Message-ID: Bugs item #1564880, was opened at 2006-09-25 10:22 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1564880&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None Status: Open Resolution: None Priority: 5 Submitted By: GriS (gristchyuk) Assigned to: Nobody/Anonymous (nobody) Summary: check_ping does not work! Initial Comment: In version 1.4.3 check_ping does not work on RHEL 4 AS and RH 9.0. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1564880&group_id=29880 From marc.poisson at amoi.net Fri Sep 22 09:32:06 2006 From: marc.poisson at amoi.net (Marc POISSON) Date: Fri, 22 Sep 2006 09:32:06 +0200 Subject: [Nagiosplug-devel] Nagios Plugins - check_ping Message-ID: <45139176.3090805@amoi.net> Hello, I use your check_ping plugin, and I find an problem : if you "ping x.x.x.x" and the response is "icmp_seq=1 Time to live exceeded", then your plugin check ok. Can you modify you program to check nok for this case ? Thanks. From ae at op5.se Mon Sep 25 10:39:14 2006 From: ae at op5.se (Andreas Ericsson) Date: Mon, 25 Sep 2006 10:39:14 +0200 Subject: [Nagiosplug-devel] Nagios Plugins - check_ping In-Reply-To: <45139176.3090805@amoi.net> References: <45139176.3090805@amoi.net> Message-ID: <451795B2.2020609@op5.se> Marc POISSON wrote: > Hello, > > I use your check_ping plugin, and I find an problem : > if you "ping x.x.x.x" and the response is "icmp_seq=1 Time to live > exceeded", then your plugin check ok. > > Can you modify you program to check nok for this case ? > Try using check_icmp instead. It will return CRITICAL on these occasions. You can also increase the ttl that check_icmp uses to send out its packets if you want to check hosts that live many hops away. -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 From noreply at sourceforge.net Wed Sep 27 19:43:30 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 27 Sep 2006 10:43:30 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-1547070 ] HP-UX 11.23/parisc & 1.4.3 Message-ID: Bugs item #1547070, was opened at 2006-08-26 09:10 Message generated for change (Comment added) made by mordecai You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1547070&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Compilation Group: Release (specify) Status: Open Resolution: None Priority: 5 Submitted By: Touche Julien (neomagic) Assigned to: Nobody/Anonymous (nobody) Summary: HP-UX 11.23/parisc & 1.4.3 Initial Comment: i try to compile nagios-plugins (1.4.3) on HP-UX 11i v2 (or 11.23) / parisc and get two quirks: * compilation of check_swap if gcc -DLOCALEDIR=\"/opt/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl -I/opt/openssl/include -I/opt/openssl/include -Wall -g -O2 -MT check_swap.o -MD -MP -MF ".deps/check_swap.Tpo" -c -o check_swap.o check_swap.c; \ then mv -f ".deps/check_swap.Tpo" ".deps/check_swap.Po"; else rm -f ".deps/check_swap.Tpo"; exit 1; fi check_swap.c: In function `main': check_swap.c:55: warning: unused variable `tmp_mb' check_swap.c: In function `process_arguments': check_swap.c:396: warning: implicit declaration of function `floorf' /bin/sh ../libtool --mode=link --tag=CC gcc -Wall -g -O2 -L. -R/opt/openssl/lib -o check_swap check_swap.o -lm utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a popen.o -lintl -lgen -lssl -lcrypto gcc -Wall -g -O2 -o check_swap check_swap.o utils.o popen.o -L/export/tmp/nrpe/nagios-plugins-1.4.3/plugins -lm ../lib/libnagiosplug.a ../lib/libcoreutils.a /usr/local/lib/libintl.sl -L/usr/local/lib /usr/local/lib/libiconv.sl -lc -lgen -lssl -lcrypto -Wl,+b -Wl,/usr/local/lib:/opt/openssl/lib /usr/ccs/bin/ld: Unsatisfied symbols: floorf (first referenced in check_swap.o) (code) collect2: ld returned 1 exit status *** Error exit code 1 even with a good configure: checking for swap... no checking for swapinfo... /usr/sbin/swapinfo checking for /usr/sbin/swapinfo format... using HP-UX format swapinfo checking for lsps... no checking for sys/stat.h... (cached) yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking for sys/swap.h... yes checking whether swapctl is declared... no checking for swaptbl_t... no checking for swapent_t... no checking for struct swapent.se_nblks... no * execution of check_disk # /opt/nagios/libexec/check_disk -w 20 -c 10 -p / -p /tmp -p /usr -p /var INPUT ERROR: C_IDFP (0.000000) should be less than W_IDFP (0.0) and both should be between zero and 100 percent, inclusive for / INPUT ERROR: C_IDFP (0.000000) should be less than W_IDFP (0.0) and both should be between zero and 100 percent, inclusive for /tmp INPUT ERROR: C_IDFP (4391739930864948500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000) should be less than W_IDFP (3862472858398281400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0) and both should be between zero and 100 percent, inclusive for /usr INPUT ERROR: C_IDFP (21143572731146757000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000) should be less than W_IDFP (14255999733776453000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.0) and both should be between zero and 100 percent, inclusive for /var check_disk: Could not parse arguments Usage: check_disk -w limit -c limit [-p path | -x device] [-t timeout][-m] [-e] [-W limit] [-K limit] [-v] [-q] # bdf Filesystem kbytes used avail %used Mounted on /dev/vg00/lvol0 819200 336688 478792 41% / /dev/vg00/lvol1 8192000 1667256 6473832 20% /var /dev/vg00/lvol2 5242880 2185480 3033560 42% /usr /dev/vg00/lvol3 1048576 184120 857952 18% /tmp [...] ---------------------------------------------------------------------- Comment By: Jay Lucky (mordecai) Date: 2006-09-27 17:43 Message: Logged In: YES user_id=47867 I came across this problem as well. The compile error on check_swap is because HPUX doesn't have floorf, so you can edit the plugins/common.h file and enable the inline substitution that's been done for Sun. /* Solaris does not have floorf, but floor works. Should probably be in configure */ /* Neither does HPUX! And yes, it should be in configure? */ #if defined(__sun) || defined(__sun__) || defined(__hpux) || defined(__hpux__) static inline float floorf (float x) { return floor(x); } #endif Probably a dirty hack, but it works... As for check_disk, the CVS version works fine for me. There appear to be signifigant differences in the 1.4.3 release tarball and the CVS source tree for this plug-in. Go with a current CVS tree if you want to get this working under HPUX. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1547070&group_id=29880 From noreply at sourceforge.net Fri Sep 29 02:08:13 2006 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 28 Sep 2006 17:08:13 -0700 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1567390 ] utils.pm is_hostname Message-ID: Patches item #1567390, was opened at 2006-09-28 17:08 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1567390&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Bugfix Group: None Status: Open Resolution: None Priority: 5 Submitted By: O'Shaughnessy Evans (shaug) Assigned to: Nobody/Anonymous (nobody) Summary: utils.pm is_hostname Initial Comment: Patch allows is_hostname() to recognize hosts and domains that begin with numbers. Current version of is_hostname() only allows numbers to exist in subsequent characters, but this no longer matches current DNS usage standards. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1567390&group_id=29880 From gh at mixxerinc.com Fri Sep 29 03:44:00 2006 From: gh at mixxerinc.com (garrett honeycutt) Date: Thu, 28 Sep 2006 18:44:00 -0700 Subject: [Nagiosplug-devel] feature request - selecting your network interface Message-ID: <1159494240.11967.127.camel@gspot.internal.3gupload.com> The ability to select which interface plugins use, specifically check_tcp, would be ideal. Machines that have multiple interfaces or multiple IP's bound to the same interface, ie: eth0:1, eth0:2, etc could take advantage of this. I have an application that sends data out on different interfaces and since I cannot replicate that behavior with the plugins, they fail. Any ideas, suggestions, or code would be beneficial. Thanks, -g -- // Garrett Honeycutt // Systems Engineer // Mixxer.com // // 206.973.3556 From ae at op5.se Fri Sep 29 10:44:16 2006 From: ae at op5.se (Andreas Ericsson) Date: Fri, 29 Sep 2006 10:44:16 +0200 Subject: [Nagiosplug-devel] feature request - selecting your network interface In-Reply-To: <1159494240.11967.127.camel@gspot.internal.3gupload.com> References: <1159494240.11967.127.camel@gspot.internal.3gupload.com> Message-ID: <451CDCE0.9030806@op5.se> garrett honeycutt wrote: > The ability to select which interface plugins use, specifically > check_tcp, would be ideal. Machines that have multiple interfaces or > multiple IP's bound to the same interface, ie: eth0:1, eth0:2, etc could > take advantage of this. > > I have an application that sends data out on different interfaces and > since I cannot replicate that behavior with the plugins, they fail. Any > ideas, suggestions, or code would be beneficial. > This would only make sense if you have more than one IP-address connecting to the same subnet, or if some of your interfaces share the same routing rules (so that it's completely arbitrary which interface is used to reach a particular network). All the above cases are situations where multiple interfaces doesn't really make sense. If you post your routing rules and interface setup I might be able to help you sort this out. Either way, it should be fixable without surgery. -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 From Thomas at zango.com Fri Sep 29 17:04:55 2006 From: Thomas at zango.com (Thomas Guyot-Sionnest) Date: Fri, 29 Sep 2006 08:04:55 -0700 Subject: [Nagiosplug-devel] feature request - selecting yournetwork interface Message-ID: I don't agree. I suggested this feature for check_ping some time ago but it was dismissed because it was ping-version-dependant. It's even better to implement it with check_tcp but I don't have the knowledge to modify check_tcp for that. The idea is in that in complex & secure setups, your hosts are connected to different vlans depending on what they do. When you changes the firewall rules to allow or remove accesses it's allways possible that you make a mistake and have some service blocked for some hosts. Using Linux VLAN support I'd like to be able to have one IP per VLAN and check all interconectivity between vlans and other sites. So for example I may want to know if hosts in the .7 vlan can connect to the mail server in the .4 vlan, but since I have an IP in the .4 vlan already it won't go trough the firewall. So I must specify to sent it from the .7 vlan. Thomas > -----Original Message----- > From: nagiosplug-devel-bounces at lists.sourceforge.net > [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On > Behalf Of Andreas Ericsson > Sent: September 29, 2006 4:44 > To: Nagios Plugin Development Mailing List > Subject: Re: [Nagiosplug-devel] feature request - selecting > yournetwork interface > > garrett honeycutt wrote: > > The ability to select which interface plugins use, specifically > > check_tcp, would be ideal. Machines that have multiple interfaces or > > multiple IP's bound to the same interface, ie: eth0:1, > eth0:2, etc could > > take advantage of this. > > > > I have an application that sends data out on different > interfaces and > > since I cannot replicate that behavior with the plugins, > they fail. Any > > ideas, suggestions, or code would be beneficial. > > > > This would only make sense if you have more than one IP-address > connecting to the same subnet, or if some of your interfaces > share the > same routing rules (so that it's completely arbitrary which > interface is > used to reach a particular network). All the above cases are > situations > where multiple interfaces doesn't really make sense. > > If you post your routing rules and interface setup I might be able to > help you sort this out. Either way, it should be fixable > without surgery. > > -- > Andreas Ericsson andreas.ericsson at op5.se > OP5 AB www.op5.se > Tel: +46 8-230225 Fax: +46 8-230231 > > -------------------------------------------------------------- > ----------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the > chance to share your > opinions on IT & business topics through brief surveys -- and > earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge > &CID=DEVDEV > _______________________________________________________ > Nagios Plugin Development Mailing List > Nagiosplug-devel at lists.sourceforge.net > Unsubscribe at > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > ::: Please include plugins version (-v) and OS when reporting > any issue. > ::: Messages without supporting info will risk being sent to /dev/null > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3022 bytes Desc: not available URL: From ae at op5.se Fri Sep 29 17:30:26 2006 From: ae at op5.se (Andreas Ericsson) Date: Fri, 29 Sep 2006 17:30:26 +0200 Subject: [Nagiosplug-devel] feature request - selecting yournetwork interface In-Reply-To: References: Message-ID: <451D3C12.4050700@op5.se> Thomas Guyot-Sionnest wrote: > > Using Linux VLAN support I'd like to be able to have one IP per VLAN and > check all interconectivity between vlans and other sites. So for example I > may want to know if hosts in the .7 vlan can connect to the mail server in > the .4 vlan, but since I have an IP in the .4 vlan already it won't go > trough the firewall. So I must specify to sent it from the .7 vlan. > Ah. This makes your request make sense. If you wish for the outbound traffic to go through a specific interface, that's very easy to fix. You just need to bind(2) the socket to an IP specified by the user prior to calling connect(2) on it. The IP ofcourse have to exist and be associated with the interface you want to use for the outbound traffic. Provided you don't have two interfaces with the same IP (which would indeed be completely insane), this will work magnificently while avoiding the portability problems associated with finding a specific interface (have a look at check_dhcp for some true portability horror). Happy hacking, and make sure you send in the patch when you're done. -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 From Thomas at zango.com Fri Sep 29 20:47:05 2006 From: Thomas at zango.com (Thomas Guyot-Sionnest) Date: Fri, 29 Sep 2006 11:47:05 -0700 Subject: [Nagiosplug-devel] feature request -selecting yournetwork interface Message-ID: Only thing here is that I'm not what you can call a C programmer at all. I do some Perl, I learned the basis of C some time ago... The hack for check_ping was trivial as I only redirected an argument to another program. And even for that simple hack I managed to segfault before getting it right (I was checking for valid IP address though). If you really insist and encourage me I'll try it :) But for now I don't even have an idea how to set the source IP on a socket... Thomas > -----Original Message----- > From: nagiosplug-devel-bounces at lists.sourceforge.net > [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On > Behalf Of Andreas Ericsson > Sent: September 29, 2006 11:30 > To: Nagios Plugin Development Mailing List > Subject: Re: [Nagiosplug-devel] feature request -selecting > yournetwork interface > > Thomas Guyot-Sionnest wrote: > > > > Using Linux VLAN support I'd like to be able to have one IP > per VLAN and > > check all interconectivity between vlans and other sites. > So for example I > > may want to know if hosts in the .7 vlan can connect to the > mail server in > > the .4 vlan, but since I have an IP in the .4 vlan already > it won't go > > trough the firewall. So I must specify to sent it from the .7 vlan. > > > > Ah. This makes your request make sense. If you wish for the outbound > traffic to go through a specific interface, that's very easy > to fix. You > just need to bind(2) the socket to an IP specified by the > user prior to > calling connect(2) on it. The IP ofcourse have to exist and be > associated with the interface you want to use for the > outbound traffic. > > Provided you don't have two interfaces with the same IP (which would > indeed be completely insane), this will work magnificently while > avoiding the portability problems associated with finding a specific > interface (have a look at check_dhcp for some true > portability horror). > > Happy hacking, and make sure you send in the patch when you're done. > > -- > Andreas Ericsson andreas.ericsson at op5.se > OP5 AB www.op5.se > Tel: +46 8-230225 Fax: +46 8-230231 > > -------------------------------------------------------------- > ----------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the > chance to share your > opinions on IT & business topics through brief surveys -- and > earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge > &CID=DEVDEV > _______________________________________________________ > Nagios Plugin Development Mailing List > Nagiosplug-devel at lists.sourceforge.net > Unsubscribe at > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > ::: Please include plugins version (-v) and OS when reporting > any issue. > ::: Messages without supporting info will risk being sent to /dev/null > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3022 bytes Desc: not available URL: From bobi at netshel.net Fri Sep 29 23:48:59 2006 From: bobi at netshel.net (bobi at netshel.net) Date: Fri, 29 Sep 2006 14:48:59 -0700 (PDT) Subject: [Nagiosplug-devel] feature request -selecting your network interface In-Reply-To: References: Message-ID: <46329.216.49.181.128.1159566539.squirrel@webmail.netshel.net> Hi, I don't know why I felt like doing this - guess I was curious if you could bind to a local address for a TCP stream prior to calling connect(2). I didn't think it would work, because the routing table usually controls which interface to send a packet out on (and hence, which source IP address to emebed in the IP header.) But if an address is reachable from more than one interface, I supposed it could work. Anyway, please find attached a tar-ball containing three patch files for: 1. netutils.h 2. netutils.c 3. check_tcp.c If you patch the above three files, and re-make check_tcp, it will allow you to specify the source IP address. The new option is: -I src-ip-address I've tested it on my Linux box which has two interfaces (plus loopback,) and it seems to work well. I watched the packets go out with tcpdump and, sure enough, the IP headers had the source IP address that I'd specified in the command line. One note, though: If you specify an interface IP address which can't reach your destination host, the connect(2) call inside netutils.c will return an EINVAL error. I know this because I tried accessing an external host through the loopback interface (127.0.0.1) and it returned EINVAL, which is what you'd expect. Try it out and please let me know if it works for you. BTW, I modified the netutils' np_net_connect() routine so that it won't break the other plugins that depend upon it. If you want other plugins to use the new source-interface functionality of np_net_connect(), those plugins will have to modified individually. Regards, Bob > Only thing here is that I'm not what you can call a C programmer at all. I > do some Perl, I learned the basis of C some time ago... The hack for > check_ping was trivial as I only redirected an argument to another > program. > And even for that simple hack I managed to segfault before getting it > right > (I was checking for valid IP address though). > > If you really insist and encourage me I'll try it :) But for now I don't > even have an idea how to set the source IP on a socket... > > Thomas > >> -----Original Message----- >> From: nagiosplug-devel-bounces at lists.sourceforge.net >> [mailto:nagiosplug-devel-bounces at lists.sourceforge.net] On >> Behalf Of Andreas Ericsson >> Sent: September 29, 2006 11:30 >> To: Nagios Plugin Development Mailing List >> Subject: Re: [Nagiosplug-devel] feature request -selecting >> yournetwork interface >> >> Thomas Guyot-Sionnest wrote: >> > >> > Using Linux VLAN support I'd like to be able to have one IP >> per VLAN and >> > check all interconectivity between vlans and other sites. >> So for example I >> > may want to know if hosts in the .7 vlan can connect to the >> mail server in >> > the .4 vlan, but since I have an IP in the .4 vlan already >> it won't go >> > trough the firewall. So I must specify to sent it from the .7 vlan. >> > >> >> Ah. This makes your request make sense. If you wish for the outbound >> traffic to go through a specific interface, that's very easy >> to fix. You >> just need to bind(2) the socket to an IP specified by the >> user prior to >> calling connect(2) on it. The IP ofcourse have to exist and be >> associated with the interface you want to use for the >> outbound traffic. >> >> Provided you don't have two interfaces with the same IP (which would >> indeed be completely insane), this will work magnificently while >> avoiding the portability problems associated with finding a specific >> interface (have a look at check_dhcp for some true >> portability horror). >> >> Happy hacking, and make sure you send in the patch when you're done. >> >> -- >> Andreas Ericsson andreas.ericsson at op5.se >> OP5 AB www.op5.se >> Tel: +46 8-230225 Fax: +46 8-230231 >> >> -------------------------------------------------------------- >> ----------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the >> chance to share your >> opinions on IT & business topics through brief surveys -- and >> earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge >> &CID=DEVDEV >> _______________________________________________________ >> Nagios Plugin Development Mailing List >> Nagiosplug-devel at lists.sourceforge.net >> Unsubscribe at >> https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel >> ::: Please include plugins version (-v) and OS when reporting >> any issue. >> ::: Messages without supporting info will risk being sent to /dev/null >> > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________________ > Nagios Plugin Development Mailing List > Nagiosplug-devel at lists.sourceforge.net > Unsubscribe at > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > ::: Please include plugins version (-v) and OS when reporting any issue. > ::: Messages without supporting info will risk being sent to /dev/null -------------- next part -------------- A non-text attachment was scrubbed... Name: check_tcp-patches.tgz Type: application/x-gzip-compressed Size: 1904 bytes Desc: not available URL: From shaug-nagios at wumpus.org Sat Sep 30 01:41:15 2006 From: shaug-nagios at wumpus.org (O'Shaughnessy Evans) Date: Fri, 29 Sep 2006 16:41:15 -0700 Subject: [Nagiosplug-devel] submitting my plugin, check_sip Message-ID: <20060929234115.GA13716@aloha.net> Hi, folks. Some time back, I wrote a plugin to test SIP service (Jan 2005, if my RCS history is accuate). I've been using it for some time and I figured it was about time that I offered it to the rest of the Nagios community. I saw on voip-info.org that somebody else also has a check_sip plugin, but I didn't find it in the nagios-plugins tarball so I hope I'm not stepping on anybody's toes by offering my own for inclusion with the nagios-plugins distribution. Before I post it to the list, I'd like to know the preferred method of doing so. Should I include a README file with it and put them both in a .tar.gz, then MIME-attach it? Simply attach the script and any other docs as their own attachments? Post a URL for download and peer review? How would you prefer to see the code? Lacking the entire script, here's the usage output: $ ./check_sip -h check_sip: Nagios plugin to check a SIP server Usage: check_sip [] -H host [-c contact_uri] [-P proxy] [-p port] [-u user] [-a pass] [-e exp] [-v] check_sip [] -U sip_uri [-c contact_uri] [-P proxy] [-a pass] [-e exp] [-v] check_sip --help check_sip --man check_sip --version Options: --contact|c Contact URI to use in register (def @kokua.aloha.net). --expires|e Set an expiration time for registrations (def 300). --hostname|H Name of the host running the SIP server. --password|a Auth password to specify when sending a username. --port|p Port on which the SIP service should be running (def 5060). --proxy|P Outbound proxy hostname; use if different than SIP URI host. --user|u Username to include in the SIP uri. --uri|U Full sip:user at host[:port] URI. --verbose|-v Show details of progress (give more than once for more info). --help Show this usage text. --man Show the comprehensive documentation. --version Show the version (0.1.5). Normal behavior is to send an OPTIONS request to the SIP server. If a username is given, though, either through --user or --uri, the script will attempt to register with the server given in the SIP URI. Thanks, and best regards. -- o'shaughnessy evans http://isle.wumpus.org/ "The statistics on sanity are that one out of every four Americans is suffering from some form of mental illness. Think of your three best friends. If they're okay, then it's you."