From Nicky.Ayoub at Microchip.com Wed Oct 2 01:10:16 2002 From: Nicky.Ayoub at Microchip.com (Nicky.Ayoub at Microchip.com) Date: Wed Oct 2 01:10:16 2002 Subject: [Nagiosplug-devel] Nicky Ayoub/Marcom/US/Microchip is out of the office. Message-ID: I will be out of the office starting 10/01/2002 and will not return until 10/11/2002. I will respond to your message when I return. From mmontiel at bolchile.cl Wed Oct 2 13:35:10 2002 From: mmontiel at bolchile.cl (Mauricio Montiel G.) Date: Wed Oct 2 13:35:10 2002 Subject: [Nagiosplug-devel] I need an updated check_oracle plugin Message-ID: <00c101c26a52$3580ef20$2d900cc8@MMONTIEL> Hi everybody, I'm new with nagios. I'm searching plugins that check oracle deeply than the check_oracle that comes with the distribution. I read that there are some contributions in the list but I can?t get those files. Regards, Mauricio Montiel G. From guevara1 at attbi.com Thu Oct 3 14:14:03 2002 From: guevara1 at attbi.com (Carlos Guevara) Date: Thu Oct 3 14:14:03 2002 Subject: [Nagiosplug-devel] I need an updated check_oracle plugin In-Reply-To: <00c101c26a52$3580ef20$2d900cc8@MMONTIEL> References: <00c101c26a52$3580ef20$2d900cc8@MMONTIEL> Message-ID: <8ncppu8cd1o0i1e46hkor5eat28hab7skm@4ax.com> Check out http://sourceforge.net/mailarchive/message.php?msg_id=560799 . - Carlos On Wed, 2 Oct 2002 16:28:03 -0400, "Mauricio Montiel G." wrote: >Hi everybody, >I'm new with nagios. I'm searching plugins that check oracle deeply than >the check_oracle that comes with the distribution. I read that there are >some contributions in the list but I can?t get those files. > >Regards, > >Mauricio Montiel G. > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >Nagiosplug-devel mailing list >Nagiosplug-devel at lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel From sghosh at sghosh.org Sat Oct 5 08:01:03 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Sat Oct 5 08:01:03 2002 Subject: [Nagiosplug-devel] inconsistance between nagios and documentation In-Reply-To: Message-ID: The easiest way to achive this is to send in a patch for the corrections - open source and community development :) -sg On Thu, 19 Sep 2002 Martin.Schmitz at naw.de wrote: > hi, > > as i stated earlier in this list, there is an inconsistance between nagios > and the documentation and even between > different parts of the documentation. unfortunately this has not been fixed > in the latest beta. > just compare the description of freshness_threshold in "xodtemplate.html", > "distributed.html" and "freshness.html". > the description in "xodtemplate.html" matches the behavior of nagios. > i think this should be fixed. > > martin > > >Hi, > > > >first, there is an inconsistant description of freshness checks in the > >documentation. > >the freshness_threshold must be given in seconds, but the freshness.html > >says: if set to 5 and interval_length is set to 60 then it will be 5 > >minutes. this isn't true. see paragraph "How The Freshness Threshold > Works" > >the same wrong description is given on the page distributed.html paragraph > >"Freshness Checking". > > > >second: > >I'm providing some passive service checks to nagios without using nsca. > the > >check time is provided by the remote host. the check is executed every 5 > >minutes and freshness_threshold is set to 10 minutes. the problem is, that > >the remote hosts time isn't synchronized with the nagios hosts time. if > the > >remote hosts time is more then 10 minutes after the nagios time, then the > >service states will flap all the time, because each incoming passive > >service check result is detected to be stale. this could be solved by > >synchronizing the times with NTP, but which way should be used if NTP > isn't > >possible. How does NSCA handle this? > >As a workaround i do not use the check time from the remote host, but > >replace it with the local time when passing the result into the external > >command file. any suggestions about a better solution? > > > >martin > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: OSDN - Tired of that same old > cell phone? Get a new here for FREE! > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-develMartin Schmitz > net&works > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > -- From guru at stinky.com Mon Oct 7 10:38:04 2002 From: guru at stinky.com (Alex Chaffee / Purple Technology) Date: Mon Oct 7 10:38:04 2002 Subject: [Nagiosplug-devel] [PATCH] check_dns: added 'expected address' param Message-ID: <20021007103742.B1497@stinky.com> I patched check_dns.c to take another optional parameter. If you specify "-a 12.34.56.78" then (assuming everything else worked ok too) it compares the returned address to the parameter. If they do not match, it fails with CRITICAL. Should it be a WARNING instead? I'm not familiar with Nagios conventions as to what counts as serious enough to be CRITICAL. I'm thinking, if it matters that the service is running, use the normal check_dns; if you go out of your way to test the returned address, then it's important enough to you to count as a CRITICAL. But I could be wrong. I used -a and --expected-address as the parameter name. Here's a template-style command for the new calling style. I'm not sure what file in the project this should go into. (It seems that command.cfg needs to be converted into the new template style...) # check_dns_address!hostname-to-check!expected-ip-address # example: check_dns_address!myhost.foo.com!123.45.67.89 define command{ command_name check_dns_address command_line $USER1$/check_dns -s $HOSTADDRESS$ -H $ARG1$ -a $ARG2$ } A patch file is attached to the patch report at http://sourceforge.net/tracker/index.php?func=detail&aid=619800&group_id=29880&atid=397599 Forgive my sloppy C -- it's been a while :-) - A -- Alex Chaffee mailto:alex at jguru.com jGuru - Java News and FAQs http://www.jguru.com/alex/ Creator of Gamelan http://www.gamelan.com/ Founder of Purple Technology http://www.purpletech.com/ Curator of Stinky Art Collective http://www.stinky.com/ From sghosh at sghosh.org Mon Oct 7 12:08:08 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Mon Oct 7 12:08:08 2002 Subject: [Nagiosplug-devel] [PATCH] check_dns: added 'expected address' param In-Reply-To: <20021007103742.B1497@stinky.com> Message-ID: Took a quick look at the patch - everything looks ok - except that I would change the is_host() in the arg validation to is_dotted_quad(). is_host will also accept a hostname and I think your intentions were to only accept a IP address (IPv4 for now.) -sg On Mon, 7 Oct 2002, Alex Chaffee / Purple Technology wrote: > I patched check_dns.c to take another optional parameter. If you > specify "-a 12.34.56.78" then (assuming everything else worked ok too) > it compares the returned address to the parameter. If they do not > match, it fails with CRITICAL. > > Should it be a WARNING instead? I'm not familiar with Nagios > conventions as to what counts as serious enough to be CRITICAL. I'm > thinking, if it matters that the service is running, use the normal > check_dns; if you go out of your way to test the returned address, > then it's important enough to you to count as a CRITICAL. But I could > be wrong. > > I used -a and --expected-address as the parameter name. > > Here's a template-style command for the new calling style. I'm not > sure what file in the project this should go into. (It seems that > command.cfg needs to be converted into the new template style...) > > # check_dns_address!hostname-to-check!expected-ip-address > # example: check_dns_address!myhost.foo.com!123.45.67.89 > define command{ > command_name check_dns_address > command_line $USER1$/check_dns -s $HOSTADDRESS$ -H $ARG1$ -a $ARG2$ > } > > A patch file is attached to the patch report at > http://sourceforge.net/tracker/index.php?func=detail&aid=619800&group_id=29880&atid=397599 > > Forgive my sloppy C -- it's been a while :-) > > - A > > -- From dan at julieanddan.com Mon Oct 7 17:31:13 2002 From: dan at julieanddan.com (dan at julieanddan.com) Date: Mon Oct 7 17:31:13 2002 Subject: [Nagiosplug-devel] Looking for cmd.cgi documentation In-Reply-To: Message-ID: I am building a web configuration application for Nagios based on Lotus Domino (so I can integrate it with our in-house asset management & trouble ticketing system). I would love to use the functionality of the cmd.cgi instead of writing directly to the command file. If anyone has a list of the arguments the cmd.cgi and/or status.cgi I would really appreciate it. Daniel Koffler dan at remics.net Tel: 514.497.1411 Fax: 206.600.4642 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sghosh at sghosh.org Mon Oct 7 20:11:11 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Mon Oct 7 20:11:11 2002 Subject: [Nagiosplug-devel] Looking for cmd.cgi documentation In-Reply-To: Message-ID: As Ethan says in the docs... most of the args are likely to change http://nagios.sourceforge.net/docs/1_0/cgis.html#cmd_cgi parsing the statuslog and sending info by the command file may be the way to go. -sg On Mon, 7 Oct 2002 dan at julieanddan.com wrote: > I am building a web configuration application for Nagios based on Lotus > Domino (so I can integrate it with our in-house asset management & trouble > ticketing system). I would love to use the functionality of the cmd.cgi > instead of writing directly to the command file. > > If anyone has a list of the arguments the cmd.cgi and/or status.cgi I > would really appreciate it. > > Daniel Koffler > dan at remics.net > Tel: 514.497.1411 > Fax: 206.600.4642 -- From rick at subnet.at Wed Oct 9 03:17:05 2002 From: rick at subnet.at (peter riegersperger) Date: Wed Oct 9 03:17:05 2002 Subject: [Nagiosplug-devel] FW: nagios fixes Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hi! we had some problems with two plugins (check_dhcp and check_http) that our c programming guy fixed for me. check_dhcp was unable to bind port 68 (not running as root!) and checl_http had some problems communicating with icecast. find below a comment on how to fix both. i hope this is of any use and went to the right people. greetings, rick |- | peter riegersperger |- | subnet | platform for media art and experimental technologies |- | http://www.subnet.at/ |- | muehlbacherhofweg 5 // 5020 salzburg // austria |- | fon/fax +43/662/842 897 |- > -----Original Message----- > check_dhcp needs to bind port 68 which requires root privileges. > rather than running all tests as root, i added "setuid( 0 );" in > main before openening the socket and changed the perms "chmod > u+s". > > check_http didn't work correctly with our icecast server. for some > reason, the last recv after a correct response didn't return 0, but > -1 and errno set to ECONNRESET. i still don't know, why this > happens, but the quickest way to work around it, is to replace > > if (i < 0) > { > terminate (STATE_CRITICAL, "Error in recv()"); > } > > with > if (i < 0 && errno != ECONNRESET ) > { > terminate (STATE_CRITICAL, "Error in recv()"); > } > > in check_http -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.8 for non-commercial use Comment: public key available at http://home.subnet.at/rick/pgp/ iQA/AwUBPaPziCDD9/SWDsvSEQKQXACfS17WYNDTEJIm6wjea9IP4iO61RUAoMyx JSFnjBw+ZXQjWlcXUYNhK7pr =XAlp -----END PGP SIGNATURE----- From sghosh at sghosh.org Wed Oct 9 18:08:03 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Wed Oct 9 18:08:03 2002 Subject: [Nagiosplug-devel] FW: nagios fixes In-Reply-To: Message-ID: Thanks could you post them as individual patches on sourceforge. -sg On Wed, 9 Oct 2002, peter riegersperger wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > hi! > > we had some problems with two plugins (check_dhcp and check_http) > that our c programming guy fixed for me. > > check_dhcp was unable to bind port 68 (not running as root!) and > checl_http had some problems communicating with icecast. > > find below a comment on how to fix both. i hope this is of any use > and went to the right people. > > greetings, > > rick > > > |- > | peter riegersperger > |- > | subnet > | platform for media art and experimental technologies > |- > | http://www.subnet.at/ > |- > | muehlbacherhofweg 5 // 5020 salzburg // austria > |- > | fon/fax +43/662/842 897 > |- > > > > -----Original Message----- > > check_dhcp needs to bind port 68 which requires root privileges. > > rather than running all tests as root, i added "setuid( 0 );" in > > main before openening the socket and changed the perms "chmod > > u+s". > > > > check_http didn't work correctly with our icecast server. for some > > reason, the last recv after a correct response didn't return 0, but > > -1 and errno set to ECONNRESET. i still don't know, why this > > happens, but the quickest way to work around it, is to replace > > > > if (i < 0) > > { > > terminate (STATE_CRITICAL, "Error in recv()"); > > } > > > > with > > if (i < 0 && errno != ECONNRESET ) > > { > > terminate (STATE_CRITICAL, "Error in recv()"); > > } > > > > in check_http > > -----BEGIN PGP SIGNATURE----- > Version: PGPfreeware 6.5.8 for non-commercial use > Comment: public key available at http://home.subnet.at/rick/pgp/ > > iQA/AwUBPaPziCDD9/SWDsvSEQKQXACfS17WYNDTEJIm6wjea9IP4iO61RUAoMyx > JSFnjBw+ZXQjWlcXUYNhK7pr > =XAlp > -----END PGP SIGNATURE----- > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > -- From nagios at nagios.org Wed Oct 9 19:33:04 2002 From: nagios at nagios.org (Ethan Galstad) Date: Wed Oct 9 19:33:04 2002 Subject: [Nagiosplug-devel] FW: nagios fixes In-Reply-To: Message-ID: <3DA4A084.592.104FAC4@localhost> The setuid(0) call in check_dhcp won't have any effect and isn't really necessary. check_dhcp has to be installed setuid root or it won't work. If its not setuid root, this call won't help - if it is, the call isn't needed. On 9 Oct 2002 at 12:14, peter riegersperger wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > hi! > > we had some problems with two plugins (check_dhcp and check_http) > that our c programming guy fixed for me. > > check_dhcp was unable to bind port 68 (not running as root!) and > checl_http had some problems communicating with icecast. > > find below a comment on how to fix both. i hope this is of any use > and went to the right people. > > greetings, > > rick > > > |- > | peter riegersperger > |- > | subnet > | platform for media art and experimental technologies > |- > | http://www.subnet.at/ > |- > | muehlbacherhofweg 5 // 5020 salzburg // austria > |- > | fon/fax +43/662/842 897 > |- > > > > -----Original Message----- > > check_dhcp needs to bind port 68 which requires root privileges. > > rather than running all tests as root, i added "setuid( 0 );" in > > main before openening the socket and changed the perms "chmod > > u+s". > > > > check_http didn't work correctly with our icecast server. for some > > reason, the last recv after a correct response didn't return 0, but > > -1 and errno set to ECONNRESET. i still don't know, why this > > happens, but the quickest way to work around it, is to replace > > > > if (i < 0) > > { > > terminate (STATE_CRITICAL, "Error in recv()"); > > } > > > > with > > if (i < 0 && errno != ECONNRESET ) > > { > > terminate (STATE_CRITICAL, "Error in recv()"); > > } > > > > in check_http > > -----BEGIN PGP SIGNATURE----- > Version: PGPfreeware 6.5.8 for non-commercial use > Comment: public key available at http://home.subnet.at/rick/pgp/ > > iQA/AwUBPaPziCDD9/SWDsvSEQKQXACfS17WYNDTEJIm6wjea9IP4iO61RUAoMyx > JSFnjBw+ZXQjWlcXUYNhK7pr > =XAlp > -----END PGP SIGNATURE----- > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > Ethan Galstad, Nagios Developer --- Email: nagios at nagios.org Website: http://www.nagios.org From japh at ip.pt Sun Oct 13 12:43:05 2002 From: japh at ip.pt (Paulo Pinto) Date: Sun Oct 13 12:43:05 2002 Subject: [Nagiosplug-devel] Checking web page integrity Message-ID: <001d01c272f0$ae718d30$1500a8c0@powerstation> Hi all. Here goes a simple script to check the integrity of web pages. It's the first version, so don't expect a big thing :-) It'll do the trick, though (I hope :-P ). Hugz all. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: check_integrity.tar.gz Type: application/octet-stream Size: 3172 bytes Desc: not available URL: From japh at ip.pt Mon Oct 14 04:29:02 2002 From: japh at ip.pt (Paulo Pinto) Date: Mon Oct 14 04:29:02 2002 Subject: [Nagiosplug-devel] Checking a webpage integrity Message-ID: <1034529915.2491.4.camel@localhost.localdomain> Hello You can find a script attached to check the integrity of webpages. It's not 100% perfect but does the trick -) Hugz and good work. Paulo Pinto japh at ip.pt -------------- next part -------------- A non-text attachment was scrubbed... Name: check_integrity.tar.gz Type: application/x-gzip Size: 3172 bytes Desc: not available URL: From anders at jblinux.net Mon Oct 14 15:32:01 2002 From: anders at jblinux.net (Anders Nerheim) Date: Mon Oct 14 15:32:01 2002 Subject: [Nagiosplug-devel] slow & dirty lm_sensors reading plugin thingy. Message-ID: <1034633790.1591.22.camel@aten> Good evening.. or Night? I wrote a small (and shitty) shellscript that read the output of what the 'sensors' binary gives you. I'm only announcing it here since I haven't really made the 'help' part yet, and I figured you wouldn't need it :) should be work if you do something like ./check_lm_sensors placetomeasure(either 'cpu' or 'case') w-temp c-temp if we specify 'cpu' as a place to measure, and 45 as warning temp, and 50 as critical temp, it would look like this. $ ./check_lmsensors cpu 45 50 LMSENSORS OK - temp is 41 celsius it will exit with state 0 if ok 1 if warning, 2 if critical.. 3 if... yeah.. uhm.. no :) email me if you want to know more I'm also working on a plugin for MGE-UPS' that reads date from SNMP & XML -------------- next part -------------- A non-text attachment was scrubbed... Name: check_lm_sensors Type: text/x-sh Size: 802 bytes Desc: not available URL: From mario.witte at chengfu.net Mon Oct 14 23:12:03 2002 From: mario.witte at chengfu.net (Mario Witte) Date: Mon Oct 14 23:12:03 2002 Subject: [Nagiosplug-devel] New plugin: check_mysqlslave.pl Message-ID: <1034662258.22748.3.camel@moehre> Hello, I've written a new plugin which checks if a MySQL-Replication is still running. At least the servers I administer tend to stop replication sometimes either due to errors or with any message. The script is listed in the patches section on the sourceforge project page. I tried to follow the developer guidelines and patches for the Makefiles are also attached. Bye, -- Mario Witte | | http://www.chengfu.net/ GnuPG fingerprint = 1C46 FF8F 661F 69B6 410E 9B1B 1EA5 6B20 BD30 AEA3 A computer lets you make more mistakes faster than any other invention, with the possible exceptions of handguns and Tequilla. -- Mitch Ratcliffe -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From sghosh at sghosh.org Mon Oct 14 23:29:05 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Mon Oct 14 23:29:05 2002 Subject: [Nagiosplug-devel] check_ifoperstatus update Message-ID: I just merged the changes from Guy's check_xinterface into check_ifoperstatus along with some new options on dormant interface alerts and new exit codes for lowerLayer not present or possible hot-swap in progress. Feedback appreciated. Also this plugin will probably get renamed to check_snmp_ifoperstatus before the next release. -- -sg From volker.tanger at discon.de Tue Oct 15 01:09:02 2002 From: volker.tanger at discon.de (Volker Tanger) Date: Tue Oct 15 01:09:02 2002 Subject: [Nagiosplug-devel] generic server ressource check via SSH Message-ID: <3DABCCD3.8060804@discon.de> Greetings! You won't need to use special agents to check a remote machine's status (CPU, partitions, load, processes) - I just completed (netsaint) plugins that do this reliably via plain SSH and primitive shell scripting. http://www.wyae.de/software/aslrules/ Volker Tanger IT-Security Consulting -- discon gmbh Wrangelstra?e 100 D-10997 Berlin fon +49 30 6104-3307 fax +49 30 6104-3461 volker.tanger at discon.de http://www.discon.de/ From mores at yahoo.com Wed Oct 16 07:24:05 2002 From: mores at yahoo.com (Stephen More) Date: Wed Oct 16 07:24:05 2002 Subject: [Nagiosplug-devel] utils.pm -- nagiosplug-1.3-beta1 Message-ID: <20021016142325.62594.qmail@web20304.mail.yahoo.com> I noticed that use strict was commented out. What was the reason for this ? Can I suggest putting it back with the following patch ? 21,22c21,22 < #use strict; < #use vars($TIMEOUT %ERRORS); --- > use strict; > use vars qw($TIMEOUT %ERRORS $PATH_TO_RPCINFO $PATH_TO_NTPDATE $PATH_TO_NTPDC $PATH_TO_LMSTAT $PATH_TO_SMBCLIENT); -Stephen More __________________________________________________ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos & More http://faith.yahoo.com From sghosh at sghosh.org Wed Oct 16 21:20:03 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Wed Oct 16 21:20:03 2002 Subject: [Nagiosplug-devel] more check_ntp questions Message-ID: If ntpdc exists on the system, should we just skip the ntpdate check and use the offset number from the peer with the "*" in column one? ie. expand the runtime check for "-x $utils::$PATH_TO_NTPDC" and run a check_ntpdc() subroutine or a check_ntpdate() should make it a bit faster and less spawing of shell commands. -- -sg From kdebisschop at alert.infoplease.com Wed Oct 16 21:58:03 2002 From: kdebisschop at alert.infoplease.com (Karl DeBisschop) Date: Wed Oct 16 21:58:03 2002 Subject: [Nagiosplug-devel] Success! building plugins with newer automake/autoconf (e.g., Red Hat 8.0) Message-ID: <1034830662.1192.26.camel@miles.debisschop.net> After much hacking and flailing, I have got the plugins CVS to build cleanly on Red Hat 7.2, 7.3, and 8.0. It would be great if people could test a little. One key change. I realized that aclocal is a local file (duh). It is no longer part of the CVS tree. You must run aclocal before automake so that the aclocal matches your specific install of automake.autoconf. Please post any feedback to the list. -- Karl From jan.david.jd at belgium.agfa.com Fri Oct 18 08:18:04 2002 From: jan.david.jd at belgium.agfa.com (Jan David) Date: Fri Oct 18 08:18:04 2002 Subject: [Nagiosplug-devel] Default time-out of plugins. Message-ID: Hi All, I've been working on a set of Oracle plugins which verify if a tablespace still has enough freespace left, space left for a nextexent and maxexent. In case of a problem, a service_event_handler writes a comment to the comment file stating the tablespace(s) that are in trouble. This usually works fine but a couple of times a day I get a timeout related to these services. If a database is really busy, some of the checks can last several minutes. This is fine because I only run the check every hour or so. Unfortunately I can't get rid of the timeouts. To be fair, I'm still using netsaint 0.0.7+nrpe, but I assume the timeout code hasn't changed in Nagios. First I changed the following settings in netsaint.cfg: # TIMEOUT VALUES # These options control how much time NetSaint will allow various # types of commands to execute before killing them off. Options # are available for controlling maximum time allotted for # service checks, host checks, event handlers, notifications, the # ocsp command, and performance data commands. All values are in # seconds. service_check_timeout=1800 host_check_timeout=120 event_handler_timeout=120 notification_timeout=120 ocsp_timeout=5 perfdata_timeout=5 This didn't change anything. Next I changed the default timeout of nrpe and recompiled it. This too didn't help. Finally, I resulted in changing the following constant in the netsaint.h header file: #define DEFAULT_SERVICE_CHECK_TIMEOUT 300 After re-compiling, this finally seems to help. This was previously set to 60 seconds (which was exactly the timeout of my scripts). My question is: what are those TIMEOUT values for in netsaint.cfg, since they clearly do not change the default behaviour of the service and host timeouts. Regards, J. David From sghosh at sghosh.org Fri Oct 18 09:15:04 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Fri Oct 18 09:15:04 2002 Subject: [Nagiosplug-devel] SF tracker management Message-ID: FYI: I am reconfiguring the sourceforge tracker (bugs, patches, support, feature requests) to send email to the nagiosplug-devel lists. Hopefully this way we can better track new requests - because I have only ended up looking at it on a weekly basis :( Only the inital submission will trigger the email not any subsequent followups. We can add that at a later point if necessary. -- -subhendu From krennmair at webdynamite.com Mon Oct 21 01:27:02 2002 From: krennmair at webdynamite.com (Andreas Krennmair) Date: Mon Oct 21 01:27:02 2002 Subject: [Nagiosplug-devel] RAID plugin Message-ID: <1035188757.409.4.camel@wd3w> Hello! I wrote a nagios plugin to check all RAIDs on a system. It is written in Ruby, but could be easily rewritten in any other language that supports regular expressions (e.g. Perl). Comments, patches, etc. are welcome. Regards, Andreas Krennmair -- ________________________________________ Andreas Krennmair (Development) WebDynamite IT Solutions GmbH Landstra?e 49, A-4020 Linz, Austria http://www.webdynamite.com/ +43 / 732 / 777 810 - 0 (fixed) +43 / 732 / 777 810 - 50 (fax) ________________________________________ -------------- next part -------------- #!/usr/bin/ruby # $Id: check_raid.rb,v 1.2 2002/10/21 08:20:52 andreas Exp $ # # Copyright + Disclaimer: # (c) 2002 Andreas Krennmair + WebDynamite # Distributed under the terms of the GNU General Public License version 2, # as published by the Free Software Foundation. This software comes with # ABSOUTELY NO WARRANTY, to the extent permitted by applicable law. # # ad-hoc documentation of the /proc/mdstat file format: ####################################################### # first line: information about the personalities (i.e. supported RAID types) # second line: information about read-ahead stuff # all subsequent lines matching /^md\d :/ plus their successor are # entries of a RAID. The second line must match /\[U+\]$/ to display that # the RAID is up. ####################################################### MDSTAT_FILE="/proc/mdstat" retval = 0 output = "" if FileTest.exists?(MDSTAT_FILE) mdstatFile = File.open(MDSTAT_FILE) while line = mdstatFile.gets do if line =~ /^(md\d+) :/ then md = $1 if line2 = mdstatFile.gets then if line2 =~ /(\[U+\])$/ then output += "#{md}: OK " else output += "#{md}: FAILURE " retval = 2 end else output += "#{md}: invalid entry " retval = 1 if retval < 1; end end end else output = "No RAID support in kernel." retval = 1 end puts output Kernel.exit(retval) From jan.david.jd at belgium.agfa.com Mon Oct 21 02:38:01 2002 From: jan.david.jd at belgium.agfa.com (Jan David) Date: Mon Oct 21 02:38:01 2002 Subject: [Nagiosplug-devel] Update: Default time-out of plugins. Message-ID: I made a mistake in my previous post. To fix the problem with the time-outs, you have to change the line: #define COMMAND_TIMEOUT 60 /* timeout for execution of plugins */ In the nrpe.c source file and re-compile. For some reason this is hard-coded into the source. It seems to me that this would be better placed in "common.h" and made available to the user as a command-line option. One final remark: this issue remains the same whether you are using nrpe-1.2.5 (netsaint) or nrpe-1.5 (nagios). Regards, J. David "Jan David" @lists.sourceforge.net on 10/18/2002 05:17:05 PM Sent by: nagiosplug-devel-admin at lists.sourceforge.net To: "nagiosplug-devel" < cc: Subject: [Nagiosplug-devel] Default time-out of plugins. Hi All, I've been working on a set of Oracle plugins which verify if a tablespace still has enough freespace left, space left for a nextexent and maxexent. In case of a problem, a service_event_handler writes a comment to the comment file stating the tablespace(s) that are in trouble. This usually works fine but a couple of times a day I get a timeout related to these services. If a database is really busy, some of the checks can last several minutes. This is fine because I only run the check every hour or so. Unfortunately I can't get rid of the timeouts. To be fair, I'm still using netsaint 0.0.7+nrpe, but I assume the timeout code hasn't changed in Nagios. First I changed the following settings in netsaint.cfg: # TIMEOUT VALUES # These options control how much time NetSaint will allow various # types of commands to execute before killing them off. Options # are available for controlling maximum time allotted for # service checks, host checks, event handlers, notifications, the # ocsp command, and performance data commands. All values are in # seconds. service_check_timeout=1800 host_check_timeout=120 event_handler_timeout=120 notification_timeout=120 ocsp_timeout=5 perfdata_timeout=5 This didn't change anything. Next I changed the default timeout of nrpe and recompiled it. This too didn't help. Finally, I resulted in changing the following constant in the netsaint.h header file: #define DEFAULT_SERVICE_CHECK_TIMEOUT 300 After re-compiling, this finally seems to help. This was previously set to 60 seconds (which was exactly the timeout of my scripts). My question is: what are those TIMEOUT values for in netsaint.cfg, since they clearly do not change the default behaviour of the service and host timeouts. Regards, J. David ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Nagiosplug-devel mailing list Nagiosplug-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel From sghosh at sghosh.org Mon Oct 21 06:43:14 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Mon Oct 21 06:43:14 2002 Subject: [Nagiosplug-devel] SMTP queue monitor (was Re: [Nagiosplug-help] Sendmail Plugin) In-Reply-To: Message-ID: Currently there is no queue monitoring plugin. Recently a question was posed for Postfix and Exim queue monitors. If folks can post the command/output/MTA ver/platform that they use to monitor their MTAs, I plugin can be put together. I only have access to a sendmail on RHLinux with a single queue at the moment. -sg On Sat, 19 Oct 2002, James Higley wrote: > Just wondering before I re-invent the wheel. Has anyone developed or > know of a sendmail plugin for Nagios that would do more than just check > SMTP. I'm looking for something to tell me whats in queue, etc. As > SMTP is good, it doesn't mean that sendmail is always working the way it > should! ;-) > > Thanks in advance! > > -James > -- From noreply at sourceforge.net Mon Oct 21 06:50:04 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Mon Oct 21 06:50:04 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Feature Requests-625669 ] SSL POP & IMAP Message-ID: Feature Requests item #625669, was opened at 2002-10-19 13:41 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397600&aid=625669&group_id=29880 Category: None Group: None Status: Open Priority: 5 Submitted By: Daniel Whelan (ophelan) Assigned to: Nobody/Anonymous (nobody) Summary: SSL POP & IMAP Initial Comment: I see you have SSL support for the http check, but not for the POP and IMAP checks. Would this be difficult to implement? This would definitely be a great feature (trying to migrate to no non-encrypted services here, but want to monitor them too!) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397600&aid=625669&group_id=29880 From sghosh at sghosh.org Mon Oct 21 07:04:03 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Mon Oct 21 07:04:03 2002 Subject: [Nagiosplug-devel] RAID plugin In-Reply-To: <1035188757.409.4.camel@wd3w> Message-ID: Rewriting in perl or C would make it easier for the users I think. Also if you wan tto include some of the standard options support and perhaps provide stub support for other raid systems.. -sg On 21 Oct 2002, Andreas Krennmair wrote: > Hello! > > I wrote a nagios plugin to check all RAIDs on a system. It is written in > Ruby, but could be easily rewritten in any other language that supports > regular expressions (e.g. Perl). Comments, patches, etc. are welcome. > > Regards, > Andreas Krennmair > -- -------------- next part -------------- #!/usr/bin/ruby # $Id: check_raid.rb,v 1.2 2002/10/21 08:20:52 andreas Exp $ # # Copyright + Disclaimer: # (c) 2002 Andreas Krennmair + WebDynamite # Distributed under the terms of the GNU General Public License version 2, # as published by the Free Software Foundation. This software comes with # ABSOUTELY NO WARRANTY, to the extent permitted by applicable law. # # ad-hoc documentation of the /proc/mdstat file format: ####################################################### # first line: information about the personalities (i.e. supported RAID types) # second line: information about read-ahead stuff # all subsequent lines matching /^md\d :/ plus their successor are # entries of a RAID. The second line must match /\[U+\]$/ to display that # the RAID is up. ####################################################### MDSTAT_FILE="/proc/mdstat" retval = 0 output = "" if FileTest.exists?(MDSTAT_FILE) mdstatFile = File.open(MDSTAT_FILE) while line = mdstatFile.gets do if line =~ /^(md\d+) :/ then md = $1 if line2 = mdstatFile.gets then if line2 =~ /(\[U+\])$/ then output += "#{md}: OK " else output += "#{md}: FAILURE " retval = 2 end else output += "#{md}: invalid entry " retval = 1 if retval < 1; end end end else output = "No RAID support in kernel." retval = 1 end puts output Kernel.exit(retval) From amayhew at verisign.com Mon Oct 21 15:46:02 2002 From: amayhew at verisign.com (Mayhew, Andrew) Date: Mon Oct 21 15:46:02 2002 Subject: [Nagiosplug-devel] problem with check_snmp on Linux with snmpget 5.0.3 Message-ID: Anyone else seeing this sort of error? check_snmp always reports that there is "no data recieved [sic] from host". If you run the snmpget command it claims to be executing it works. Seems to be a problem with the "ptr = strtr(ptr, delimiter);" moving the pointer past the output from snmpget. $ ./check_snmp --version check_snmp (nagios-plugins 1.3.0-alpha1) 1.1.1.1 The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute copies of the plugins under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. $ ./check_snmp -H 172.16.74.24 -o sysUpTime.0 -w 600:1 -C community -u Hours -l SystemUpTime SystemUpTime problem - No data recieved from host CMD: /usr/local/bin/snmpget -m ALL -v 2c -c community 172.16.74.24 sysUpTime.0 $ /usr/local/bin/snmpget -m ALL -v 2c -c community 172.16.74.24 sysUpTime.0 SNMPv2-MIB::sysUpTime.0 3:4:19:03.21 Any help would be appreciated. --Andy Mayhew From karl at debisschop.net Tue Oct 22 01:31:03 2002 From: karl at debisschop.net (Karl DeBisschop) Date: Tue Oct 22 01:31:03 2002 Subject: [Nagiosplug-devel] problem with check_snmp on Linux with snmpget 5.0.3 In-Reply-To: References: Message-ID: <1035275381.8360.4.camel@toaster> On Mon, 2002-10-21 at 18:45, Mayhew, Andrew wrote: > Anyone else seeing this sort of error? check_snmp always reports that there > is "no data recieved [sic] from host". If you run the snmpget command it > claims to be executing it works. Seems to be a problem with the "ptr = > strtr(ptr, delimiter);" moving the pointer past the output from snmpget. > > $ ./check_snmp --version > check_snmp (nagios-plugins 1.3.0-alpha1) 1.1.1.1 > The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute > copies of the plugins under the terms of the GNU General Public License. > For more information about these matters, see the file named COPYING. > > $ ./check_snmp -H 172.16.74.24 -o sysUpTime.0 -w 600:1 -C community -u Hours > -l SystemUpTime > SystemUpTime problem - No data recieved from host > CMD: /usr/local/bin/snmpget -m ALL -v 2c -c community 172.16.74.24 > sysUpTime.0 > $ /usr/local/bin/snmpget -m ALL -v 2c -c community 172.16.74.24 sysUpTime.0 > SNMPv2-MIB::sysUpTime.0 3:4:19:03.21 > > Any help would be appreciated. > --Andy Mayhew Can I suggect the current CVS? We're at 1.8, and IIRC one of the chnages I made was for that general sort of behaviour. -- Karl From amayhew at verisign.com Tue Oct 22 14:16:03 2002 From: amayhew at verisign.com (Mayhew, Andrew) Date: Tue Oct 22 14:16:03 2002 Subject: [Nagiosplug-devel] problem with check_snmp on Linux with snmp get 5.0.3 Message-ID: Same results after building from the CVS check out this afternoon. See below: $ ./check_snmp --versioncheck_snmp (nagios-plugins 1.3.0-alpha1) 1.8 The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute copies of the plugins under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. $ ./check_snmp -H 172.16.74.24 -o sysUpTime.0 -w 600:1 -C community -u Hours -l SystemUpTime SystemUpTime problem - No data recieved from host CMD: /usr/local/bin/snmpget -m ALL -v 2c 172.16.74.24:161 -c community sysUpTime.0 $ /usr/local/bin/snmpget -m ALL -v 2c 172.16.74.24 -c community sysUpTime.0 SNMPv2-MIB::sysUpTime.0 4:2:57:05.91 I did make one line change to the actual command line so that it would be syntatically correct for net-snmp 5.0.3. Otherwise, my source is exactly as it appears in the CVS tree. Anyone else see this or have a fix? --Andy Mayhew > -----Original Message----- > From: Karl DeBisschop [mailto:karl at debisschop.net] > Sent: Tuesday, October 22, 2002 1:30 AM > To: Mayhew, Andrew > Cc: nagiosplug-devel at lists.sourceforge.net > Subject: Re: [Nagiosplug-devel] problem with check_snmp on Linux with > snmpget 5.0.3 > > > On Mon, 2002-10-21 at 18:45, Mayhew, Andrew wrote: > > Anyone else seeing this sort of error? check_snmp always > reports that there > > is "no data recieved [sic] from host". If you run the > snmpget command it > > claims to be executing it works. Seems to be a problem > with the "ptr = > > strtr(ptr, delimiter);" moving the pointer past the output > from snmpget. > > > > $ ./check_snmp --version > > check_snmp (nagios-plugins 1.3.0-alpha1) 1.1.1.1 > > The nagios plugins come with ABSOLUTELY NO WARRANTY. You > may redistribute > > copies of the plugins under the terms of the GNU General > Public License. > > For more information about these matters, see the file > named COPYING. > > > > $ ./check_snmp -H 172.16.74.24 -o sysUpTime.0 -w 600:1 -C > community -u Hours > > -l SystemUpTime > > SystemUpTime problem - No data recieved from host > > CMD: /usr/local/bin/snmpget -m ALL -v 2c -c community 172.16.74.24 > > sysUpTime.0 > > $ /usr/local/bin/snmpget -m ALL -v 2c -c community > 172.16.74.24 sysUpTime.0 > > SNMPv2-MIB::sysUpTime.0 3:4:19:03.21 > > > > Any help would be appreciated. > > --Andy Mayhew > > Can I suggect the current CVS? We're at 1.8, and IIRC one of > the chnages > I made was for that general sort of behaviour. > > -- > Karl > From ABostick at mydoconline.com Wed Oct 23 12:01:06 2002 From: ABostick at mydoconline.com (ABostick at mydoconline.com) Date: Wed Oct 23 12:01:06 2002 Subject: [Nagiosplug-devel] NOCPulse Message-ID: I do not know if anyone caught this, but RedHat this week purchased a company called NOCPulse that writes software to "manage many servers as one". So I had to see this was about and after looking at the screen shots, I'm thinking "This is nagios or at least the nagios plugins..." The service check names and result codes are identical to Netsaint / Nagios but from what I can tell I do not think they are open source... Any one else know what this is about as I'm curious about RedHat "buying" software which is already free... Aaron From Daniel.Rusch at GlobalCrossing.com Wed Oct 23 12:29:06 2002 From: Daniel.Rusch at GlobalCrossing.com (Rusch, Daniel) Date: Wed Oct 23 12:29:06 2002 Subject: [Nagiosplug-devel] NOCPulse Message-ID: <0DA06E553C3BD511823500508BB8965A02D20A8D@exnadetmbx3.ams.gblxint.com> The software NocPulse sells isn't freeware. I know the people who started NocPulse many of them are xGlobal Crossing employees. If you can be a little specific I'd be happy to ask them your questions. Dan -----Original Message----- From: ABostick at mydoconline.com [mailto:ABostick at mydoconline.com] Sent: Wednesday, October 23, 2002 2:00 PM To: nagiosplug-devel at lists.sourceforge.net Subject: [Nagiosplug-devel] NOCPulse I do not know if anyone caught this, but RedHat this week purchased a company called NOCPulse that writes software to "manage many servers as one". So I had to see this was about and after looking at the screen shots, I'm thinking "This is nagios or at least the nagios plugins..." The service check names and result codes are identical to Netsaint / Nagios but from what I can tell I do not think they are open source... Any one else know what this is about as I'm curious about RedHat "buying" software which is already free... Aaron ------------------------------------------------------- This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en _______________________________________________ Nagiosplug-devel mailing list Nagiosplug-devel at lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel From amayhew at verisign.com Wed Oct 23 13:37:08 2002 From: amayhew at verisign.com (Mayhew, Andrew) Date: Wed Oct 23 13:37:08 2002 Subject: [Nagiosplug-devel] NOCPulse Message-ID: The NOCPulse software was originally built on a Netsaint core, which they claimed to have re-written large chunks. There were still large portions of it that were just perl scripts last time I saw it (March 2002), including most of the modules. The software still maintains the same NetSaint architecture with some added stuff. In fact most of the plugins were just the NetSaint plugins. I forget right now which version of NetSaint they had based everything on, but I do recall that this was all started when the main developers will still at GlobalCrossing about 2 years ago now (at least). The whole deal with NOCPulse was that they would have a box on your network to handle the monitoring. It was a "secured RedHat Linux machine" (their words) that would do active polling to nrpe agents and then pass nsca packets back to their NOC. All reporting and pages would come from their NOC and network, and this included the web interface. After having an evaluation machine for a couple of weeks and gaining access to it, I decided that my company could not afford to spend that much money for a bunch of Perl scripts on top of NetSaint. That and I had issues with opening access to the core of my network to the outside world in order for them to monitor my machines. Their whole business model kind of revolved around the hope that there were a large number of companies willing to outsource their NOC. Except that all they would do is call/page someone if something broke and in the environments that I work in, the NOC is tasked to actually attempt to fix things before giving up and calling someone. The RedHat purchase is probably just a way for RH to increase their services offerings while continuing to ignore the major problems in their distribution. Enough ranting. --Andy Mayhew > -----Original Message----- > From: Rusch, Daniel [mailto:Daniel.Rusch at GlobalCrossing.com] > Sent: Wednesday, October 23, 2002 12:29 PM > To: 'ABostick at mydoconline.com'; nagiosplug-devel at lists.sourceforge.net > Subject: RE: [Nagiosplug-devel] NOCPulse > > > The software NocPulse sells isn't freeware. I know the > people who started > NocPulse many of them are xGlobal Crossing employees. If you can be a > little specific I'd be happy to ask them your questions. > > Dan > > -----Original Message----- > From: ABostick at mydoconline.com [mailto:ABostick at mydoconline.com] > Sent: Wednesday, October 23, 2002 2:00 PM > To: nagiosplug-devel at lists.sourceforge.net > Subject: [Nagiosplug-devel] NOCPulse > > > I do not know if anyone caught this, but RedHat this week purchased a > company called NOCPulse that writes software to "manage many > servers as > one". So I had to see this was about and after looking at > the screen shots, > I'm thinking "This is nagios or at least the nagios plugins..." > > The service check names and result codes are identical to > Netsaint / Nagios > but from what I can tell I do not think they are open source... > > Any one else know what this is about as I'm curious about > RedHat "buying" > software which is already free... > > Aaron > > > ------------------------------------------------------- > This sf.net email is sponsored by: Influence the future > of Java(TM) technology. Join the Java Community > Process(SM) (JCP(SM)) program now. > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en > > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > > > ------------------------------------------------------- > This sf.net email is sponsored by: Influence the future > of Java(TM) technology. Join the Java Community > Process(SM) (JCP(SM)) program now. > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en > > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > From noreply at sourceforge.net Wed Oct 23 15:54:05 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Wed Oct 23 15:54:05 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Support Requests-627775 ] make all fails on Solaris 8 Message-ID: Support Requests item #627775, was opened at 2002-10-23 14:50 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=627775&group_id=29880 Category: Install Problem (example) Group: v1.0 (example) Status: Open Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: make all fails on Solaris 8 Initial Comment: Attempting to build the plugins on Solaris 8, using: [monitor-01/usr/local/install/nagiosplug-1.3-beta1] make - v GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. Built for sparc-sun-solaris2.8 Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Report bugs to . [monitor-01/usr/local/install/nagiosplug-1.3-beta1] gcc -v Reading specs from /usr/local/lib/gcc-lib/sparc-sun- solaris2.8/2.95.3/specs gcc version 2.95.3 20010315 (release) [monitor-01/usr/local/install/nagiosplug-1.3-beta1] aclocal -v aclocal: unrecognized option -- `-v' Try `aclocal --help' for more information. [monitor-01/usr/local/install/nagiosplug-1.3-beta1] aclocal --version aclocal (GNU automake) 1.7 Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Tom Tromey [monitor-01/usr/local/install/nagiosplug-1.3-beta1] automake --version automake (GNU automake) 1.7 Written by Tom Tromey . Copyright 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [monitor-01/usr/local/install/nagiosplug-1.3-beta1] make - -version GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. Built for sparc-sun-solaris2.8 Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Report bugs to . I get: [monitor-01/usr/local/install/nagiosplug-1.3-beta1] make all cd . && /usr/local/bin/aclocal cd . && /usr/local/bin/automake --gnu Makefile configure.in: `AM_INIT_AUTOMAKE' must be used automake: your implementation of AM_INIT_AUTOMAKE comes from an automake: old Automake version. You should recreate aclocal.m4 automake: with aclocal and run automake again. make: *** [Makefile.in] Error 1 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397598&aid=627775&group_id=29880 From nagios at nagios.org Wed Oct 23 16:01:02 2002 From: nagios at nagios.org (Ethan Galstad) Date: Wed Oct 23 16:01:02 2002 Subject: [Nagiosplug-devel] NOCPulse In-Reply-To: Message-ID: <3DB6E3B4.30484.F11A3@localhost> I'm not exactly sure what the deal is with NOCPulse. I was contacted by two different NetSaint users in March and April of last year who had been in contact with NOCPulse sales staff. They mentioned that the salespeople let it slip out that NP was built around the NetSaint daemon, with a custom frontend and reporting interface. One of them mentioned their service ran about $5000 a month, but I have no way of verifying that number. If so, I should have started my own company a long time ago. :-) Anyway, if they are not selling the software - i.e. they are just selling a service - this may fall into the "ASP loophole" with regards to the GPL. If however, they are selling/distributing the software or decide do so in the future, this could be interesting... On 23 Oct 2002 at 13:36, Mayhew, Andrew wrote: > The NOCPulse software was originally built on a Netsaint core, which they > claimed to have re-written large chunks. There were still large portions of > it that were just perl scripts last time I saw it (March 2002), including > most of the modules. The software still maintains the same NetSaint > architecture with some added stuff. In fact most of the plugins were just > the NetSaint plugins. I forget right now which version of NetSaint they had > based everything on, but I do recall that this was all started when the main > developers will still at GlobalCrossing about 2 years ago now (at least). > > The whole deal with NOCPulse was that they would have a box on your network > to handle the monitoring. It was a "secured RedHat Linux machine" (their > words) that would do active polling to nrpe agents and then pass nsca > packets back to their NOC. All reporting and pages would come from their > NOC and network, and this included the web interface. > > After having an evaluation machine for a couple of weeks and gaining access > to it, I decided that my company could not afford to spend that much money > for a bunch of Perl scripts on top of NetSaint. That and I had issues with > opening access to the core of my network to the outside world in order for > them to monitor my machines. > > Their whole business model kind of revolved around the hope that there were > a large number of companies willing to outsource their NOC. Except that all > they would do is call/page someone if something broke and in the > environments that I work in, the NOC is tasked to actually attempt to fix > things before giving up and calling someone. The RedHat purchase is > probably just a way for RH to increase their services offerings while > continuing to ignore the major problems in their distribution. > > Enough ranting. > --Andy Mayhew > > > -----Original Message----- > > From: Rusch, Daniel [mailto:Daniel.Rusch at GlobalCrossing.com] > > Sent: Wednesday, October 23, 2002 12:29 PM > > To: 'ABostick at mydoconline.com'; nagiosplug-devel at lists.sourceforge.net > > Subject: RE: [Nagiosplug-devel] NOCPulse > > > > > > The software NocPulse sells isn't freeware. I know the > > people who started > > NocPulse many of them are xGlobal Crossing employees. If you can be a > > little specific I'd be happy to ask them your questions. > > > > Dan > > > > -----Original Message----- > > From: ABostick at mydoconline.com [mailto:ABostick at mydoconline.com] > > Sent: Wednesday, October 23, 2002 2:00 PM > > To: nagiosplug-devel at lists.sourceforge.net > > Subject: [Nagiosplug-devel] NOCPulse > > > > > > I do not know if anyone caught this, but RedHat this week purchased a > > company called NOCPulse that writes software to "manage many > > servers as > > one". So I had to see this was about and after looking at > > the screen shots, > > I'm thinking "This is nagios or at least the nagios plugins..." > > > > The service check names and result codes are identical to > > Netsaint / Nagios > > but from what I can tell I do not think they are open source... > > > > Any one else know what this is about as I'm curious about > > RedHat "buying" > > software which is already free... > > > > Aaron > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by: Influence the future > > of Java(TM) technology. Join the Java Community > > Process(SM) (JCP(SM)) program now. > > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en > > > > _______________________________________________ > > Nagiosplug-devel mailing list > > Nagiosplug-devel at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by: Influence the future > > of Java(TM) technology. Join the Java Community > > Process(SM) (JCP(SM)) program now. > > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en > > > > _______________________________________________ > > Nagiosplug-devel mailing list > > Nagiosplug-devel at lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: Influence the future > of Java(TM) technology. Join the Java Community > Process(SM) (JCP(SM)) program now. > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0002en > > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > Ethan Galstad, Nagios Developer --- Email: nagios at nagios.org Website: http://www.nagios.org From benmadsenx at attbi.com Thu Oct 24 11:37:12 2002 From: benmadsenx at attbi.com (Benjamin Madsen) Date: Thu Oct 24 11:37:12 2002 Subject: [Nagiosplug-devel] NOCPulse In-Reply-To: <3DB6E3B4.30484.F11A3@localhost> References: Message-ID: <5.1.0.14.0.20021024112155.02a50468@mail.attbi.com> 2 years ago, we were in contact with NOCPulse to evaluate their services. They are, indeed, one of those "ASP loophole" companies that just sell the services of open-source program. I think they had done some customization, definitely of the web frontend, but it significantly reminded me of Netsaint at the time. When asked, they said the platform was, indeed, based around the Netsaint daemon and plugins. A few months after the evaluation (my company never ended up purchasing as they closed their doors about a month later), NocPulse ended up scaling back to a more conservative growth scale after their originally intense startup phase. I got the sense that they over-estimated the market they were in, and that their service didn't add much to the already diverse range of products and services in existence. My $0.02 -Ben Owner / Sr. Technical Engineer Codifiant Technologies (925) 997-7176 At 06:00 PM 10/23/2002 -0500, you wrote: >I'm not exactly sure what the deal is with NOCPulse. I was contacted >by two different NetSaint users in March and April of last year who >had been in contact with NOCPulse sales staff. They mentioned that >the salespeople let it slip out that NP was built around the NetSaint >daemon, with a custom frontend and reporting interface. > >One of them mentioned their service ran about $5000 a month, but I >have no way of verifying that number. If so, I should have started >my own company a long time ago. :-) Anyway, if they are not selling >the software - i.e. they are just selling a service - this may fall >into the "ASP loophole" with regards to the GPL. If however, they >are selling/distributing the software or decide do so in the future, >this could be interesting... From ABostick at mydoconline.com Thu Oct 24 13:09:05 2002 From: ABostick at mydoconline.com (ABostick at mydoconline.com) Date: Thu Oct 24 13:09:05 2002 Subject: [Nagiosplug-devel] RE: Nagiosplug-devel digest, Vol 1 #91 - 5 msgs Message-ID: Ethan, Can NOCPulse create a custom frontend to Netsaint without releasing their changes GPL'ed? Surely they would have used your upgrades to Netsaint or made their own improvements, in which case would they not be required to give those back to the project? I also do not doubt the $5000 a month price as I replaced a > $20000/month outsourced monitoring solution (which sucked) with Nagios which monitors things they could not even imagine for the price of a sigle $3500 Dell server... I guess what RedHat bought is NOCPulse's physical NOC (their servers running netsaint, their internet connection, thier employees expertise, etc...) Surely RedHat knows Nagios exists... Why not pump some money into contributing to Nagios and then sell a Nagios run NOC as a service to their clients? I agree with the other replies though. Outsourcing monitoring is very hard to do IMO because normally they cannot fix anything, just tell you when it breaks... Aaron > >I'm not exactly sure what the deal is with NOCPulse. I was contacted > >by two different NetSaint users in March and April of last year who > >had been in contact with NOCPulse sales staff. They mentioned that > >the salespeople let it slip out that NP was built around the NetSaint > >daemon, with a custom frontend and reporting interface. > > > >One of them mentioned their service ran about $5000 a month, but I > >have no way of verifying that number. If so, I should have started > >my own company a long time ago. :-) Anyway, if they are not selling > >the software - i.e. they are just selling a service - this may fall > >into the "ASP loophole" with regards to the GPL. If however, they > >are selling/distributing the software or decide do so in the future, > >this could be interesting... From kdebisschop at alert.infoplease.com Fri Oct 25 06:11:02 2002 From: kdebisschop at alert.infoplease.com (Karl DeBisschop) Date: Fri Oct 25 06:11:02 2002 Subject: [Nagiosplug-devel] Trying to support current automake/autoconf Message-ID: <1035551427.1260.132.camel@miles.debisschop.net> It's now been a feww weeks that I've been tyring to get automake from BOTH RedHat7.3 and RedHat8.0 to work with our CVS files. My conclusion is that it won't work. If someone can prove me wrong, great. But I haven't found it. What DOES work is that the tarball created from 'make dist' will build, as it should, without using automake at all. If all these premises are correct, we need more snapshot tarballs. As part of that, I will start rebuilding snapshots twice daily. They can be downloaded from: http://www.debisschop.net/src/nagios/ Where the file name is something like: nagios-plugins-1.3.0-snapshot.tar.gz In theory, I should be able to do this directly on sourceforge, and post the snapshots there. I've done it in the past, but they changed their build policies somewhat, and at the time I did not keep up. If anyone knows how I'd set up twice daily snapshot tarballs on sourceforge, drop a note here to the list. -- Karl -- Karl From noreply at sourceforge.net Fri Oct 25 09:36:02 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Fri Oct 25 09:36:02 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-628195 ] check_snmp will not return status OK Message-ID: Bugs item #628195, was opened at 2002-10-24 12:11 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=628195&group_id=29880 Category: None Group: Release (specify) Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: check_snmp will not return status OK Initial Comment: The check_snmp module can not be made to return a value of higher than 'WARNING' regardless of the options specified. Even a simplistic request, ie 'check_snmp -H -C -o system.sysUpTime.0 results in the following: SNMP WARNING - Timeticks: (1516539759) 187 days, 2:23:17.59 build is 1.3 beta1, OS is debian/woody. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=628195&group_id=29880 From takamiya at matsulab.is.titech.ac.jp Sun Oct 27 17:54:03 2002 From: takamiya at matsulab.is.titech.ac.jp (Yasuhito TAKAMIYA) Date: Sun Oct 27 17:54:03 2002 Subject: [Nagiosplug-devel] nagios plugin developers guide (japanese) Message-ID: <000301c27e24$91402de0$0301a8c0@dilbert3> Hi nagios plugin developers, i've written a translation of nagios plugin developers guide in japanese. the uri is: http://matsu-www.is.titech.ac.jp/~takamiya/lucie/?NagiosPlugin if webmaster colud make a link to this uri, i was very happy. cheers, -- yasuhito From sghosh at sghosh.org Mon Oct 28 09:02:02 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Mon Oct 28 09:02:02 2002 Subject: [Nagiosplug-devel] Trying to support current automake/autoconf In-Reply-To: <1035551427.1260.132.camel@miles.debisschop.net> Message-ID: I haven't done this before - should it be scripted and run on the compile farm and have the tarball scp'd back to the webspace? -sg On 25 Oct 2002, Karl DeBisschop wrote: > It's now been a feww weeks that I've been tyring to get automake from > BOTH RedHat7.3 and RedHat8.0 to work with our CVS files. > > My conclusion is that it won't work. If someone can prove me wrong, > great. But I haven't found it. > > What DOES work is that the tarball created from 'make dist' will build, > as it should, without using automake at all. > > If all these premises are correct, we need more snapshot tarballs. As > part of that, I will start rebuilding snapshots twice daily. > > They can be downloaded from: > > http://www.debisschop.net/src/nagios/ > > Where the file name is something like: > > nagios-plugins-1.3.0-snapshot.tar.gz > > In theory, I should be able to do this directly on sourceforge, and post > the snapshots there. I've done it in the past, but they changed their > build policies somewhat, and at the time I did not keep up. > > If anyone knows how I'd set up twice daily snapshot tarballs on > sourceforge, drop a note here to the list. > > -- > Karl > > > -- > Karl > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: Influence the future > of Java(TM) technology. Join the Java Community > Process(SM) (JCP(SM)) program now. > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > -- From ebollengier at sigma.fr Mon Oct 28 10:56:03 2002 From: ebollengier at sigma.fr (BOLLENGIER Eric) Date: Mon Oct 28 10:56:03 2002 Subject: [Nagiosplug-devel] Add a reverse option to check_http.c Message-ID: <1035831298.12119.143.camel@plume> Hi, It seems to be usefull to reverse -r|-R|-s switch result. For example, i have a monitor.php script which test a webserver (connection to a database, php engine on etc..) and it return OK if it's good or ERR if doesn't. I try to find ERR I want to use ./check_http -I somehost --reverse -r '[A-Z]+ : ERR' -u /monitor.php -v Page is 424 characters STATUS: HTTP/1.1 200 OK **** HEADER **** Date: Sun, 27 Oct 2002 10:58:59 GMT Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.2.2 X-Powered-By: PHP/4.2.2 Connection: close Content-Type: text/plain; charset=iso-8859-1 **** CONTENT **** BASEC : ERR ==>2002: Can't connect to local MySQL server through socket... BASES : ERR ==>2002: Can't connect to local MySQL server through socket ... PHP : OK HTTP CRITICAL: pattern found Patch : 630031 on sf.net cd nagiosplug-1.3-beta1/ patch -p0 < /tmp/check_http.c.patch From michaelm at kw.com Mon Oct 28 11:12:03 2002 From: michaelm at kw.com (Michael Marziani) Date: Mon Oct 28 11:12:03 2002 Subject: [Nagiosplug-devel] Add a reverse option to check_http.c Message-ID: <93CD6C0831FA554FAB96691A4EBDF4AD2433D4@MI8NYCMAIL08.Mi8.com> I'm not exactly answering your question, but wouldn't it make more sense to use check_mysql for checking a mysql database? -Michael > -----Original Message----- > From: BOLLENGIER Eric [mailto:ebollengier at sigma.fr] > Sent: Monday, October 28, 2002 12:55 PM > To: nagiosplug-devel at lists.sourceforge.net > Subject: [Nagiosplug-devel] Add a reverse option to check_http.c > > > Hi, > > It seems to be usefull to reverse -r|-R|-s switch result. > > For example, i have a monitor.php script which test a > webserver (connection to a database, php engine on etc..) and > it return OK if it's good or ERR if doesn't. I try to find ERR > > I want to use > ./check_http -I somehost --reverse -r '[A-Z]+ : ERR' -u > /monitor.php -v > > Page is 424 characters > STATUS: HTTP/1.1 200 OK > **** HEADER **** > Date: Sun, 27 Oct 2002 10:58:59 GMT > Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.2.2 > X-Powered-By: PHP/4.2.2 > Connection: close > Content-Type: text/plain; charset=iso-8859-1 > **** CONTENT **** > BASEC : ERR > ==>2002: Can't connect to local MySQL server through > socket... BASES : ERR > ==>2002: Can't connect to local MySQL server through socket > ... PHP : OK > > HTTP CRITICAL: pattern found > > Patch : 630031 on sf.net > > cd nagiosplug-1.3-beta1/ > patch -p0 < /tmp/check_http.c.patch > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Nagiosplug-devel mailing list Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > From sghosh at sghosh.org Mon Oct 28 11:21:03 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Mon Oct 28 11:21:03 2002 Subject: [Nagiosplug-devel] Add a reverse option to check_http.c In-Reply-To: <1035831298.12119.143.camel@plume> Message-ID: try using "negate" to reverse the CRITICAL to OK you can find it in CVS. -sg On 28 Oct 2002, BOLLENGIER Eric wrote: > Hi, > > It seems to be usefull to reverse -r|-R|-s switch result. > > For example, i have a monitor.php script which test a webserver > (connection to a database, php engine on etc..) and it return OK if it's > good or ERR if doesn't. I try to find ERR > > I want to use > ./check_http -I somehost --reverse -r '[A-Z]+ : ERR' -u /monitor.php -v > > Page is 424 characters > STATUS: HTTP/1.1 200 OK > **** HEADER **** > Date: Sun, 27 Oct 2002 10:58:59 GMT > Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.2.2 > X-Powered-By: PHP/4.2.2 > Connection: close > Content-Type: text/plain; charset=iso-8859-1 > **** CONTENT **** > BASEC : ERR > ==>2002: Can't connect to local MySQL server through socket... > BASES : ERR > ==>2002: Can't connect to local MySQL server through socket ... > PHP : OK > > HTTP CRITICAL: pattern found > > Patch : 630031 on sf.net > > cd nagiosplug-1.3-beta1/ > patch -p0 < /tmp/check_http.c.patch > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > -- From noreply at sourceforge.net Mon Oct 28 11:32:05 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Mon Oct 28 11:32:05 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-630031 ] add --reverse option to check_http Message-ID: Patches item #630031, was opened at 2002-10-28 19:53 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=630031&group_id=29880 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Eric Bollengier (ricozz) Assigned to: Nobody/Anonymous (nobody) Summary: add --reverse option to check_http Initial Comment: It seems to be usefull to reverse -r|-R|-s switch result. For example, i have a monitor.php script which test a webserver (connection to a database, php engine on etc..) and return tests OK if it's good or ERR if doesn't I want to use ./check_http -I somehost --reverse -r '[A-Z]+ : ERR' -u /monitor.php -v Page is 424 characters STATUS: HTTP/1.1 200 OK **** HEADER **** Date: Sun, 27 Oct 2002 10:58:59 GMT Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.2.2 X-Powered-By: PHP/4.2.2 Connection: close Content-Type: text/plain; charset=iso-8859-1 **** CONTENT **** BASEC : ERR ==>2002: Can't connect to local MySQL server through socket... BASES : ERR ==>2002: Can't connect to local MySQL server through socket ... PHP : OK HTTP CRITICAL: pattern found ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=630031&group_id=29880 From paul at nerdlabs.com Mon Oct 28 18:14:03 2002 From: paul at nerdlabs.com (Paul Dlug) Date: Mon Oct 28 18:14:03 2002 Subject: [Nagiosplug-devel] Incorrection version Message-ID: <200210282149.37823.paul@nerdlabs.com> The version information in the beta1 plugins release is listed as: nagios-plugins 1.3.0-alpha1 Which confused me greatly. Also, does the check_mrtgtraf plugin work? I tried: ./check_mrtgtraf -F mrtg.log -a AVG -w "5,5" -c "20,20" It spits back: Ave. In = 20.0 KB/s, Ave. Out = 7.2 KB/s Shouldn't this be a warning? I've tried a number of combinations of values for the warning/critical levels and none of them seem to work. Thanks, Paul From ebollengier at sigma.fr Tue Oct 29 00:25:02 2002 From: ebollengier at sigma.fr (BOLLENGIER Eric) Date: Tue Oct 29 00:25:02 2002 Subject: [Nagiosplug-devel] Add a reverse option to check_http.c In-Reply-To: References: Message-ID: <1035879846.12212.168.camel@plume> Hi, I'am ok to use negate, but on nagios site, it look quite strange.. ./negate check_http -I somehost -s '[A-Z]+ : ERR' -u /monitor.php GREEN : HTTP CRITICAL: string not found|time= 0.007 But results are ok... It can confuse users. Thank for your help ! Eric Le lun 28/10/2002 ? 20:20, Subhendu Ghosh a ?crit : > > try using "negate" to reverse the CRITICAL to OK > > you can find it in CVS. > > -sg > > > On 28 Oct 2002, BOLLENGIER Eric wrote: > > > Hi, > > > > It seems to be usefull to reverse -r|-R|-s switch result. > > > > For example, i have a monitor.php script which test a webserver > > (connection to a database, php engine on etc..) and it return OK if it's > > good or ERR if doesn't. I try to find ERR > > > > I want to use > > ./check_http -I somehost --reverse -r '[A-Z]+ : ERR' -u /monitor.php -v > > > > Page is 424 characters > > STATUS: HTTP/1.1 200 OK > > **** HEADER **** > > Date: Sun, 27 Oct 2002 10:58:59 GMT > > Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.2.2 > > X-Powered-By: PHP/4.2.2 > > Connection: close > > Content-Type: text/plain; charset=iso-8859-1 > > **** CONTENT **** > > BASEC : ERR > > ==>2002: Can't connect to local MySQL server through socket... > > BASES : ERR > > ==>2002: Can't connect to local MySQL server through socket ... > > PHP : OK > > > > HTTP CRITICAL: pattern found > > > > Patch : 630031 on sf.net > > > > cd nagiosplug-1.3-beta1/ > > patch -p0 < /tmp/check_http.c.patch > > From valen at tuatha.org Tue Oct 29 10:08:04 2002 From: valen at tuatha.org (John P. Looney) Date: Tue Oct 29 10:08:04 2002 Subject: [Nagiosplug-devel] snmpv3 plugin ? Message-ID: <20021029180712.GO21696@jinny.ie> Hi, I tryed my hand at rolling my own check_snmp_v3 program, from the source of check_snmp - but it's not going to well. I don't seem to understand the massaging of the nagios-specific arguments. I added four v3 options (username,password,seclevel and auth method), and it works sometimes. However: # check_snmp_v3 -H 192.168.2.22 -o .1.3.6.1.4.1.2021.9.1.7.1,.1.3.6.1.4.1.2021.9.1.9.1 \ -U jinny -L authNoPriv -a MD5 -A jinnyjinny -w ,80 -c ,90 -u 'kB free (','% used)' -l 'Disk Space' Disk Space CRITICAL - kB free ( *26948892* % used) 5 # So, somehow the arguments are skewed. I can give source of what I *have* done to someone, if they have an SNMPv3 server to test it on. (as a diff, because I was just changing the SRPM). Or, if someone knows a version of check_snmp that has v3 support, I'd love to hear from them. John From sghosh at sghosh.org Tue Oct 29 11:58:04 2002 From: sghosh at sghosh.org (Subhendu Ghosh) Date: Tue Oct 29 11:58:04 2002 Subject: [Nagiosplug-devel] snmpv3 plugin ? In-Reply-To: <20021029180712.GO21696@jinny.ie> Message-ID: On Tue, 29 Oct 2002, John P. Looney wrote: > Hi, I tryed my hand at rolling my own check_snmp_v3 program, from the > source of check_snmp - but it's not going to well. I don't seem to > understand the massaging of the nagios-specific arguments. > > I added four v3 options (username,password,seclevel and auth method), and > it works sometimes. However: > > # check_snmp_v3 -H 192.168.2.22 -o .1.3.6.1.4.1.2021.9.1.7.1,.1.3.6.1.4.1.2021.9.1.9.1 \ > -U jinny -L authNoPriv -a MD5 -A jinnyjinny > -w ,80 -c ,90 -u 'kB free (','% used)' -l 'Disk Space' > Disk Space CRITICAL - kB free ( *26948892* % used) 5 > # > > So, somehow the arguments are skewed. I can give source of what I *have* > done to someone, if they have an SNMPv3 server to test it on. (as a diff, > because I was just changing the SRPM). > > Or, if someone knows a version of check_snmp that has v3 support, I'd > love to hear from them. > > John > > > Can you post a diff let me know if this is against cvs or tarball ? I have a new HP JetDirect that support v3 I have been meaning to play with. -- -sg From valen at tuatha.org Wed Oct 30 01:05:02 2002 From: valen at tuatha.org (John P. Looney) Date: Wed Oct 30 01:05:02 2002 Subject: [Nagiosplug-devel] snmpv3 plugin ? In-Reply-To: References: <20021029180712.GO21696@jinny.ie> Message-ID: <20021030090415.GQ21696@jinny.ie> On Tue, Oct 29, 2002 at 02:57:30PM -0500, Subhendu Ghosh mentioned: > Can you post a diff let me know if this is against cvs or tarball ? This is against the 1.3.0-beta2 SRPM from sourceforge. It creates an all new file called plugins/check_snmp_v3.c (just in case I broke the old one). If you can tell why it's not treating arguments properly, I'd appreciate it. John -------------- next part -------------- diff --new-file -r -u nagios-plugins-1.3.0-beta1-vanilla/plugins/Makefile.am nagios-plugins-1.3.0-beta1/plugins/Makefile.am --- nagios-plugins-1.3.0-beta1-vanilla/plugins/Makefile.am Thu Feb 28 06:42:57 2002 +++ nagios-plugins-1.3.0-beta1/plugins/Makefile.am Tue Oct 29 15:23:17 2002 @@ -12,7 +12,7 @@ check_ups check_users check_vsz urlize \ @EXTRAS@ -EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_snmp check_hpjd \ +EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_snmp check_snmp_v3 check_hpjd \ check_swap check_fping check_ldap check_game check_dig \ check_nagios check_by_ssh check_dns check_nt @@ -63,6 +63,7 @@ check_radius_LDADD = $(BASEOBJS) $(RADIUSLIBS) check_real_LDADD = $(NETLIBS) check_snmp_LDADD = $(BASEOBJS) popen.o +check_snmp_v3_LDADD = $(BASEOBJS) popen.o check_smtp_LDADD = $(NETLIBS) check_ssh_LDADD = $(NETLIBS) check_swap_LDADD = $(BASEOBJS) popen.o @@ -102,6 +103,7 @@ check_radius_DEPENDENCIES = check_radius.c $(DEPLIBS) check_real_DEPENDENCIES = check_real.c $(NETOBJS) $(DEPLIBS) check_snmp_DEPENDENCIES = check_snmp.c $(BASEOBJS) popen.o $(DEPLIBS) +check_snmp_v3_DEPENDENCIES = check_snmp_v3.c $(BASEOBJS) popen.o $(DEPLIBS) check_smtp_DEPENDENCIES = check_smtp.c $(NETOBJS) $(DEPLIBS) check_ssh_DEPENDENCIES = check_ssh.c $(NETOBJS) $(DEPLIBS) check_swap_DEPENDENCIES = check_swap.c $(BASEOBJS) popen.o $(DEPLIBS) diff --new-file -r -u nagios-plugins-1.3.0-beta1-vanilla/plugins/Makefile.in nagios-plugins-1.3.0-beta1/plugins/Makefile.in --- nagios-plugins-1.3.0-beta1-vanilla/plugins/Makefile.in Thu Jun 13 15:02:17 2002 +++ nagios-plugins-1.3.0-beta1/plugins/Makefile.in Tue Oct 29 15:23:17 2002 @@ -124,10 +124,10 @@ check_ping check_pop check_procs check_real \ check_smtp check_ssh check_tcp check_time check_udp \ check_ups check_users check_vsz urlize \ - @EXTRAS@ + @EXTRAS@ check_snmp_v3 -EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_snmp check_hpjd \ +EXTRA_PROGRAMS = check_mysql check_radius check_pgsql check_snmp check_snmp_v3 check_hpjd \ check_swap check_fping check_ldap check_game check_dig \ check_nagios check_by_ssh check_dns check_nt @@ -176,6 +176,7 @@ check_radius_LDADD = $(BASEOBJS) $(RADIUSLIBS) check_real_LDADD = $(NETLIBS) check_snmp_LDADD = $(BASEOBJS) popen.o +check_snmp_v3_LDADD = $(BASEOBJS) popen.o check_smtp_LDADD = $(NETLIBS) check_ssh_LDADD = $(NETLIBS) check_swap_LDADD = $(BASEOBJS) popen.o @@ -215,6 +216,7 @@ check_radius_DEPENDENCIES = check_radius.c $(DEPLIBS) check_real_DEPENDENCIES = check_real.c $(NETOBJS) $(DEPLIBS) check_snmp_DEPENDENCIES = check_snmp.c $(BASEOBJS) popen.o $(DEPLIBS) +check_snmp_v3_DEPENDENCIES = check_snmp_v3.c $(BASEOBJS) popen.o $(DEPLIBS) check_smtp_DEPENDENCIES = check_smtp.c $(NETOBJS) $(DEPLIBS) check_ssh_DEPENDENCIES = check_ssh.c $(NETOBJS) $(DEPLIBS) check_swap_DEPENDENCIES = check_swap.c $(BASEOBJS) popen.o $(DEPLIBS) @@ -247,6 +249,9 @@ check_snmp_SOURCES = check_snmp.c check_snmp_OBJECTS = check_snmp.o check_snmp_LDFLAGS = +check_snmp_v3_SOURCES = check_snmp_v3.c +check_snmp_v3_OBJECTS = check_snmp_v3.o +check_snmp_v3_LDFLAGS = check_hpjd_SOURCES = check_hpjd.c check_hpjd_OBJECTS = check_hpjd.o check_hpjd_LDFLAGS = @@ -371,12 +376,12 @@ .deps/check_nt.P .deps/check_nwstat.P .deps/check_overcr.P \ .deps/check_pgsql.P .deps/check_ping.P .deps/check_pop.P \ .deps/check_procs.P .deps/check_radius.P .deps/check_real.P \ -.deps/check_smtp.P .deps/check_snmp.P .deps/check_ssh.P \ +.deps/check_smtp.P .deps/check_snmp.P .deps/check_snmp_v3.P .deps/check_ssh.P \ .deps/check_swap.P .deps/check_tcp.P .deps/check_time.P \ .deps/check_udp.P .deps/check_ups.P .deps/check_users.P \ .deps/check_vsz.P .deps/urlize.P -SOURCES = check_mysql.c check_radius.c check_pgsql.c check_snmp.c check_hpjd.c check_swap.c check_fping.c check_ldap.c check_game.c check_dig.c check_nagios.c check_by_ssh.c check_dns.c check_nt.c check_disk.c check_dummy.c check_ftp.c check_http.c check_imap.c check_load.c check_mrtg.c check_mrtgtraf.c check_nntp.c check_nwstat.c check_overcr.c check_ping.c check_pop.c check_procs.c check_real.c check_smtp.c check_ssh.c check_tcp.c check_time.c check_udp.c check_ups.c check_users.c check_vsz.c urlize.c -OBJECTS = check_mysql.o check_radius.o check_pgsql.o check_snmp.o check_hpjd.o check_swap.o check_fping.o check_ldap.o check_game.o check_dig.o check_nagios.o check_by_ssh.o check_dns.o check_nt.o check_disk.o check_dummy.o check_ftp.o check_http.o check_imap.o check_load.o check_mrtg.o check_mrtgtraf.o check_nntp.o check_nwstat.o check_overcr.o check_ping.o check_pop.o check_procs.o check_real.o check_smtp.o check_ssh.o check_tcp.o check_time.o check_udp.o check_ups.o check_users.o check_vsz.o urlize.o +SOURCES = check_mysql.c check_radius.c check_pgsql.c check_snmp.c check_snmp_v3.c check_hpjd.c check_swap.c check_fping.c check_ldap.c check_game.c check_dig.c check_nagios.c check_by_ssh.c check_dns.c check_nt.c check_disk.c check_dummy.c check_ftp.c check_http.c check_imap.c check_load.c check_mrtg.c check_mrtgtraf.c check_nntp.c check_nwstat.c check_overcr.c check_ping.c check_pop.c check_procs.c check_real.c check_smtp.c check_ssh.c check_tcp.c check_time.c check_udp.c check_ups.c check_users.c check_vsz.c urlize.c +OBJECTS = check_mysql.o check_radius.o check_pgsql.o check_snmp.o check_snmp_v3.c check_hpjd.o check_swap.o check_fping.o check_ldap.o check_game.o check_dig.o check_nagios.o check_by_ssh.o check_dns.o check_nt.o check_disk.o check_dummy.o check_ftp.o check_http.o check_imap.o check_load.o check_mrtg.o check_mrtgtraf.o check_nntp.o check_nwstat.o check_overcr.o check_ping.o check_pop.o check_procs.o check_real.o check_smtp.o check_ssh.o check_tcp.o check_time.o check_udp.o check_ups.o check_users.o check_vsz.o urlize.o all: all-redirect .SUFFIXES: @@ -569,6 +574,10 @@ @rm -f check_snmp $(LINK) $(check_snmp_LDFLAGS) $(check_snmp_OBJECTS) $(check_snmp_LDADD) $(LIBS) +check_snmp_v3: $(check_snmp_v3_OBJECTS) $(check_snmp_v3_DEPENDENCIES) + @rm -f check_snmp_v3 + $(LINK) $(check_snmp_v3_LDFLAGS) $(check_snmp_v3_OBJECTS) $(check_snmp_LDADD) $(LIBS) + check_hpjd: $(check_hpjd_OBJECTS) $(check_hpjd_DEPENDENCIES) @rm -f check_hpjd $(LINK) $(check_hpjd_LDFLAGS) $(check_hpjd_OBJECTS) $(check_hpjd_LDADD) $(LIBS) diff --new-file -r -u nagios-plugins-1.3.0-beta1-vanilla/plugins/check_snmp_v3.c nagios-plugins-1.3.0-beta1/plugins/check_snmp_v3.c --- nagios-plugins-1.3.0-beta1-vanilla/plugins/check_snmp_v3.c Thu Jan 1 01:00:00 1970 +++ nagios-plugins-1.3.0-beta1/plugins/check_snmp_v3.c Tue Oct 29 15:23:34 2002 @@ -0,0 +1,842 @@ +/****************************************************************************** + * + * CHECK_SNMP_V3.C + * + * Program: SNMP plugin for Nagios + * License: GPL + * Copyright (c) 1999 Ethan Galstad (nagios at nagios.org) + * Copyright (c) 2002 John Looney (valen at tuatha.org) for v3 bits + * + * Last Modified: $Date: 2002/02/28 06:42:59 $ + * + * Description: + * + * This plugin uses the 'snmpget' command included with the UCD-SNMP + * package. If you don't have the package installed you will need to + * download it from http://ucd-snmp.ucdavis.edu before you can use + * this plugin. + * + * License Information: + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + *./plugins/check_snmp 127.0.0.1 -c public -o .1.3.6.1.4.1.2021.9.1.2.1 + *****************************************************************************/ + +#include "common.h" +#include "utils.h" +#include "popen.h" + +#define PROGNAME check_snmp + +#define mark(a) ((a)!=0?"*":"") + +#define CHECK_UNDEF 0 +#define CRIT_PRESENT 1 +#define CRIT_STRING 2 +#define CRIT_REGEX 4 +#define CRIT_GT 8 +#define CRIT_LT 16 +#define CRIT_GE 32 +#define CRIT_LE 64 +#define CRIT_EQ 128 +#define CRIT_NE 256 +#define CRIT_RANGE 512 +#define WARN_PRESENT 1024 +#define WARN_STRING 2048 +#define WARN_REGEX 4096 +#define WARN_GT 8192 +#define WARN_LT 16384 +#define WARN_GE 32768 +#define WARN_LE 65536 +#define WARN_EQ 131072 +#define WARN_NE 262144 +#define WARN_RANGE 524288 + +#define MAX_OIDS 8 +#define MAX_DELIM_LENGTH 8 +#define DEFAULT_DELIMITER "=" +#define DEFAULT_OUTPUT_DELIMITER " " + +void print_usage (void); +void print_help (char *); +int process_arguments (int, char **); +int call_getopt (int, char **); +int check_num (int); +char *clarify_message (char *); +int lu_getll (unsigned long *, char *); +int lu_getul (unsigned long *, char *); +char *thisarg (char *str); +char *nextarg (char *str); + +#ifdef HAVE_REGEX_H +#include +char regex_expect[MAX_INPUT_BUFFER] = ""; +regex_t preg; +regmatch_t pmatch[10]; +char timestamp[10] = ""; +char regex[MAX_INPUT_BUFFER]; +char errbuf[MAX_INPUT_BUFFER]; +int cflags = REG_EXTENDED | REG_NOSUB | REG_NEWLINE; +int eflags = 0; +int errcode, excode; +#endif + +char *server_address = NULL; +char *community = NULL; +char oid[MAX_INPUT_BUFFER] = ""; +char *label = NULL; +char v3_args[MAX_INPUT_BUFFER]=""; +char *units = NULL; +char string_value[MAX_INPUT_BUFFER] = ""; +char **labels = NULL; +char **unitv = NULL; +int nlabels = 0; +int labels_size = 8; +int nunits = 0; +int unitv_size = 8; +unsigned long lower_warn_lim[MAX_OIDS]; +unsigned long upper_warn_lim[MAX_OIDS]; +unsigned long lower_crit_lim[MAX_OIDS]; +unsigned long upper_crit_lim[MAX_OIDS]; +unsigned long response_value[MAX_OIDS]; +int check_warning_value = FALSE; +int check_critical_value = FALSE; +int eval_method[MAX_OIDS]; +char *delimiter = NULL; +char *output_delim = NULL; + + +int +main (int argc, char **argv) +{ + int i = 0; + int iresult = STATE_UNKNOWN; + int found = 0; + int result = STATE_DEPENDENT; + char input_buffer[MAX_INPUT_BUFFER]; + char *command_line = NULL; + char *response = NULL; + char *outbuff = NULL; + char *output = NULL; + char *ptr = NULL; + char *p2 = NULL; + char *show = NULL; + + labels = malloc (labels_size); + unitv = malloc (unitv_size); + outbuff = strscpy (outbuff, ""); + for (i = 0; i < MAX_OIDS; i++) + eval_method[i] = CHECK_UNDEF; + i = 0; + + if (process_arguments (argc, argv) == ERROR) + usage ("Incorrect arguments supplied\n"); + + /* For v3, the command line looks something like: + * snmpget -v 3 -u user -l authNoPriv -a MD5 -A secret IP oid + * + /* create the command line to execute */ + command_line = ssprintf + (command_line, + "%s -v 3 %s %s %s %s", + PATH_TO_SNMPGET, v3_args, server_address, community, oid); + + /* run the command */ + child_process = spopen (command_line); + if (child_process == NULL) { + printf ("Could not open pipe: %s\n", command_line); + exit (STATE_UNKNOWN); + } + + child_stderr = fdopen (child_stderr_array[fileno (child_process)], "r"); + if (child_stderr == NULL) { + printf ("Could not open stderr for %s\n", command_line); + } + + while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_process)) + output = strscat (output, input_buffer); + + ptr = output; + + while (ptr) { + + ptr = strstr (ptr, delimiter); + if (ptr == NULL) + break; + + ptr += strlen (delimiter); + ptr += strspn (ptr, " "); + + found++; + + if (ptr[0] == '"') { + ptr++; + response = strpcpy (response, ptr, "\""); + ptr = strpbrk (ptr, "\""); + ptr += strspn (ptr, "\"\n"); + } + else { + response = strpcpy (response, ptr, "\n"); + ptr = strpbrk (ptr, "\n"); + ptr += strspn (ptr, "\n"); + while + (strstr (ptr, delimiter) && + strstr (ptr, "\n") && strstr (ptr, "\n") < strstr (ptr, delimiter)) { + response = strpcat (response, ptr, "\n"); + ptr = strpbrk (ptr, "\n"); + } + if (ptr && strstr (ptr, delimiter) == NULL) { + response = strscat (response, ptr); + ptr = NULL; + } + } + + if (strstr (response, "Gauge: ")) + show = strstr (response, "Gauge: ") + 7; + else if (strstr (response, "Gauge32: ")) + show = strstr (response, "Gauge32: ") + 9; + else + show = response; + p2 = show; + + if (eval_method[i] & CRIT_GT || + eval_method[i] & CRIT_LT || + eval_method[i] & CRIT_GE || + eval_method[i] & CRIT_LE || + eval_method[i] & CRIT_EQ || + eval_method[i] & CRIT_NE || + eval_method[i] & WARN_GT || + eval_method[i] & WARN_LT || + eval_method[i] & WARN_GE || + eval_method[i] & WARN_LE || + eval_method[i] & WARN_EQ || eval_method[i] & WARN_NE) { + p2 = strpbrk (p2, "0123456789"); + response_value[i] = strtoul (p2, NULL, 10); + iresult = check_num (i); + show = ssprintf (show, "%d", response_value[i]); + } + + else if (eval_method[i] & CRIT_STRING) { + if (strcmp (response, string_value)) + iresult = STATE_CRITICAL; + else + iresult = STATE_OK; + } + + else if (eval_method[i] & CRIT_REGEX) { +#ifdef HAVE_REGEX_H + excode = regexec (&preg, response, 10, pmatch, eflags); + if (excode == 0) { + iresult = STATE_OK; + } + else if (excode != REG_NOMATCH) { + regerror (excode, &preg, errbuf, MAX_INPUT_BUFFER); + printf ("Execute Error: %s\n", errbuf); + exit (STATE_CRITICAL); + } + else { + iresult = STATE_CRITICAL; + } +#else + printf ("SNMP UNKNOWN: call for regex which was not a compiled option"); + exit (STATE_UNKNOWN); +#endif + } + + else { + if (response) + iresult = STATE_OK; + else if (eval_method[i] & CRIT_PRESENT) + iresult = STATE_CRITICAL; + else + iresult = STATE_WARNING; + } + + result = max (result, iresult); + + if (nlabels > 1 && i < nlabels && labels[i] != NULL) + outbuff = ssprintf + (outbuff, + "%s%s%s %s%s%s", + outbuff, + (i == 0) ? " " : output_delim, + labels[i], mark (iresult), show, mark (iresult)); + else + outbuff = ssprintf + (outbuff, + "%s%s%s%s%s", + outbuff, + (i == 0) ? " " : output_delim, mark (iresult), show, mark (iresult)); + + if (nunits > 0 && i < nunits) + outbuff = ssprintf (outbuff, "%s %s", outbuff, unitv[i]); + + i++; + + } /* end while */ + + if (found == 0) + terminate + (STATE_UNKNOWN, + "%s problem - No data recieved from host\nCMD: %s\n", + label, command_line); + + /* WARNING if output found on stderr */ + if (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr)) + result = max (result, STATE_WARNING); + + /* close stderr */ + (void) fclose (child_stderr); + + /* close the pipe */ + if (spclose (child_process)) + result = max (result, STATE_WARNING); + + if (nunits > 0) + printf ("%s %s -%s\n", label, state_text (result), outbuff); + else + printf ("%s %s -%s %s\n", label, state_text (result), outbuff, units); + + return result; +} + +/* process command-line arguments */ +int +process_arguments (int argc, char **argv) +{ + int c; + + if (argc < 2) + return ERROR; + + for (c = 1; c < argc; c++) { + if (strcmp ("-to", argv[c]) == 0) + strcpy (argv[c], "-t"); + if (strcmp ("-wv", argv[c]) == 0) + strcpy (argv[c], "-w"); + if (strcmp ("-cv", argv[c]) == 0) + strcpy (argv[c], "-c"); + } + + c = 0; + while (c += (call_getopt (argc - c, &argv[c]))) { + if (argc <= c) + break; + if (server_address == NULL) + server_address = strscpy (NULL, argv[c]); + } + + if (community == NULL) + community = strscpy (NULL, "public"); + + if (delimiter == NULL) + delimiter = strscpy (NULL, DEFAULT_DELIMITER); + + if (output_delim == NULL) + output_delim = strscpy (NULL, DEFAULT_OUTPUT_DELIMITER); + + if (label == NULL) + label = strscpy (NULL, "SNMP"); + + if (units == NULL) + units = strscpy (NULL, ""); + + return c; +} + +int +call_getopt (int argc, char **argv) +{ + char *ptr; + int c, i = 1; + int j = 0, jj = 0; + +#ifdef HAVE_GETOPT_H + int option_index = 0; + static struct option long_options[] = { + {"help", no_argument, 0, 'h'}, + {"version", no_argument, 0, 'V'}, + {"timeout", required_argument, 0, 't'}, + {"critical", required_argument, 0, 'c'}, + {"warning", required_argument, 0, 'w'}, + {"hostname", required_argument, 0, 'H'}, + {"community", required_argument, 0, 'C'}, + {"oid", required_argument, 0, 'o'}, + {"object", required_argument, 0, 'o'}, + {"delimiter", required_argument, 0, 'd'}, + {"output-delimiter", required_argument, 0, 'D'}, + {"string", required_argument, 0, 's'}, + {"regex", required_argument, 0, 'r'}, + {"ereg", required_argument, 0, 'r'}, + {"eregi", required_argument, 0, 'R'}, + {"label", required_argument, 0, 'l'}, + {"units", required_argument, 0, 'u'}, + {"user", required_argument, 0, 'U'}, + {"seclevel", required_argument, 0, 'L'}, + {"authproto", required_argument, 0, 'a'}, + {"password", required_argument, 0, 'A'}, + {0, 0, 0, 0} + }; +#endif + + while (1) { +#ifdef HAVE_GETOPT_H + c = + getopt_long (argc, argv, "+?hVt:c:w:H:C:o:d:D:s:R:r:l:u:U:L:a:A:", + long_options, &option_index); +#else + c = getopt (argc, argv, "+?hVt:c:w:H:C:o:d:D:s:R:r:l:u:U:L:a:A:"); +#endif + + if (c == -1 || c == EOF) + break; + + i++; + switch (c) { + case 't': + case 'c': + case 'w': + case 'H': + case 'C': + case 'o': + case 'd': + case 'D': + case 's': + case 'R': + case 'r': + case 'l': + case 'u': + i++; + } + switch (c) { + case '?': /* help */ + printf ("%s: Unknown argument: %s\n\n", my_basename (argv[0]), optarg); + print_usage (); + exit (STATE_UNKNOWN); + case 'h': /* help */ + print_help (my_basename (argv[0])); + exit (STATE_OK); + case 'V': /* version */ + print_revision (my_basename (argv[0]), "$Revision: 1.1.1.1 $"); + exit (STATE_OK); + case 't': /* timeout period */ + if (!is_integer (optarg)) { + printf ("%s: Timeout Interval must be an integer!\n\n", + my_basename (argv[0])); + print_usage (); + exit (STATE_UNKNOWN); + } + timeout_interval = atoi (optarg); + break; + case 'c': /* critical time threshold */ + if (strspn (optarg, "0123456789:,") < strlen (optarg)) { + printf ("Invalid critical threshold: %s\n", optarg); + print_usage (); + exit (STATE_UNKNOWN); + } + for (ptr = optarg, jj = 0; ptr && jj < MAX_OIDS; jj++) { + if (lu_getll (&lower_crit_lim[jj], ptr) == 1) + eval_method[jj] |= CRIT_LT; + if (lu_getul (&upper_crit_lim[jj], ptr) == 1) + eval_method[jj] |= CRIT_GT; + (ptr = index (ptr, ',')) ? ptr++ : ptr; + } + break; + case 'w': /* warning time threshold */ + if (strspn (optarg, "0123456789:,") < strlen (optarg)) { + printf ("Invalid warning threshold: %s\n", optarg); + print_usage (); + exit (STATE_UNKNOWN); + } + for (ptr = optarg, jj = 0; ptr && jj < MAX_OIDS; jj++) { + if (lu_getll (&lower_warn_lim[jj], ptr) == 1) + eval_method[jj] |= WARN_LT; + if (lu_getul (&upper_warn_lim[jj], ptr) == 1) + eval_method[jj] |= WARN_GT; + (ptr = index (ptr, ',')) ? ptr++ : ptr; + } + break; + case 'H': /* Host or server */ + server_address = strscpy (server_address, optarg); + break; + case 'C': /* group or community */ + community = strscpy (community, optarg); + break; + case 'o': /* object identifier */ + for (ptr = optarg; (ptr = index (ptr, ',')); ptr++) + ptr[0] = ' '; + strncpy (oid, optarg, sizeof (oid) - 1); + oid[sizeof (oid) - 1] = 0; + for (ptr = optarg, j = 1; (ptr = index (ptr, ' ')); ptr++) + j++; + break; + case 'd': /* delimiter */ + delimiter = strscpy (delimiter, optarg); + break; + case 'D': /* output-delimiter */ + output_delim = strscpy (output_delim, optarg); + break; + case 's': /* string or substring */ + strncpy (string_value, optarg, sizeof (string_value) - 1); + string_value[sizeof (string_value) - 1] = 0; + eval_method[jj++] = CRIT_STRING; + break; + case 'R': /* regex */ +#ifdef HAVE_REGEX_H + cflags = REG_ICASE; +#endif + case 'r': /* regex */ +#ifdef HAVE_REGEX_H + cflags |= REG_EXTENDED | REG_NOSUB | REG_NEWLINE; + strncpy (regex_expect, optarg, sizeof (regex_expect) - 1); + regex_expect[sizeof (regex_expect) - 1] = 0; + errcode = regcomp (&preg, regex_expect, cflags); + if (errcode != 0) { + regerror (errcode, &preg, errbuf, MAX_INPUT_BUFFER); + printf ("Could Not Compile Regular Expression"); + return ERROR; + } + eval_method[jj++] = CRIT_REGEX; +#else + printf ("SNMP UNKNOWN: call for regex which was not a compiled option"); + exit (STATE_UNKNOWN); +#endif + break; + case 'l': /* label */ + label = optarg; + nlabels++; + if (nlabels >= labels_size) { + labels_size += 8; + labels = realloc (labels, labels_size); + if (labels == NULL) + terminate (STATE_UNKNOWN, + "Could not realloc() labels[%d]", nlabels); + } + labels[nlabels - 1] = optarg; + ptr = thisarg (optarg); + if (strstr (ptr, "'") == ptr) + labels[nlabels - 1] = ptr + 1; + else + labels[nlabels - 1] = ptr; + while (ptr && (ptr = nextarg (ptr))) { + if (nlabels >= labels_size) { + labels_size += 8; + labels = realloc (labels, labels_size); + if (labels == NULL) + terminate (STATE_UNKNOWN, "Could not realloc() labels\n"); + } + labels++; + ptr = thisarg (ptr); + if (strstr (ptr, "'") == ptr) + labels[nlabels - 1] = ptr + 1; + else + labels[nlabels - 1] = ptr; + } + break; + case 'u': /* units */ + units = optarg; + nunits++; + if (nunits >= unitv_size) { + unitv_size += 8; + unitv = realloc (unitv, unitv_size); + if (unitv == NULL) + terminate (STATE_UNKNOWN, + "Could not realloc() units [%d]\n", nunits); + } + unitv[nunits - 1] = optarg; + ptr = thisarg (optarg); + if (strstr (ptr, "'") == ptr) + unitv[nunits - 1] = ptr + 1; + else + unitv[nunits - 1] = ptr; + while (ptr && (ptr = nextarg (ptr))) { + if (nunits >= unitv_size) { + unitv_size += 8; + unitv = realloc (unitv, unitv_size); + if (units == NULL) + terminate (STATE_UNKNOWN, "Could not realloc() units\n"); + } + nunits++; + ptr = thisarg (ptr); + if (strstr (ptr, "'") == ptr) + unitv[nunits - 1] = ptr + 1; + else + unitv[nunits - 1] = ptr; + } + break; + case 'U': /* username */ + strncat(v3_args, " -u ", MAX_INPUT_BUFFER); + strncat(v3_args, thisarg(optarg), MAX_INPUT_BUFFER); + strncat(v3_args, " ", MAX_INPUT_BUFFER); + break; + case 'L': /* seclevel */ + strncat(v3_args, " -l ", MAX_INPUT_BUFFER); + strncat(v3_args, thisarg(optarg), MAX_INPUT_BUFFER); + strncat(v3_args, " ", MAX_INPUT_BUFFER); + break; + case 'A': /* password */ + strncat(v3_args, " -A ", MAX_INPUT_BUFFER); + strncat(v3_args, thisarg(optarg), MAX_INPUT_BUFFER); + strncat(v3_args, " ", MAX_INPUT_BUFFER); + break; + case 'a': /* authproto */ + strncat(v3_args, " -a ", MAX_INPUT_BUFFER); + strncat(v3_args, thisarg(optarg), MAX_INPUT_BUFFER); + strncat(v3_args, " ", MAX_INPUT_BUFFER); + break; + } + } + return i; +} + +void +print_usage (void) +{ + printf + ("Usage: check_snmp -H -U username -L seclevel -A passwd -a auth_protocol\n" + " -o [-w warn_range] [-c crit_range] \n" + " [-C community] [-s string] [-r regex] [-R regexi] [-t timeout]\n" + " [-l label] [-u units] [-d delimiter] [-D output-delimiter]\n" + " check_snmp --help\n" " check_snmp --version\n"); +} + +void +print_help (char *cmd) +{ + printf ("Copyright (c) 1999 Ethan Galstad (nagios at nagios.org)\n" + "License: GPL\n\n"); + print_usage (); + printf + ("\nOptions:\n" + " -h, --help\n" + " Print detailed help screen\n" + " -V, --version\n" + " Print version information\n" + " -H, --hostname=HOST\n" + " Name or IP address of the device you wish to query\n" + " -o, --oid=OID(s)\n" + " Object identifier(s) whose value you wish to query\n" + " -U, --username\n" + " SNMPv3 username\n" + " -L, seclevel\n" + " SNMPv3 Security level, i.e. AuthNoPriv\n" + " -A, password\n" + " SNMPv3 Password\n" + " -a, authproto\n" + " SNMPv3 Authorization protocol, i.e. MD5\n" + " -w, --warning=INTEGER_RANGE(s)\n" + " Range(s) which will not result in a WARNING status\n" + " -c, --critical=INTEGER_RANGE(s)\n" + " Range(s) which will not result in a CRITICAL status\n" + " -C, --community=STRING\n" + " Optional community string for SNMP communication\n" + " (default is \"public\")\n" + " -u, --units=STRING\n" + " Units label(s) for output data (e.g., 'sec.').\n" + " -d, --delimiter=STRING\n" + " Delimiter to use when parsing returned data. Default is \"%s\"\n" + " Any data on the right hand side of the delimiter is considered\n" + " to be the data that should be used in the evaluation.\n" + " -t, --timeout=INTEGER\n" + " Seconds to wait before plugin times out (see also nagios server timeout)\n" + " -D, --output-delimiter=STRING\n" + " Separates output on multiple OID requests\n" + " -s, --string=STRING\n" + " Return OK state (for that OID) if STRING is an exact match\n" + " -r, --ereg=REGEX\n" + " Return OK state (for that OID) if extended regular expression REGEX matches\n" + " -R, --eregi=REGEX\n" + " Return OK state (for that OID) if case-insensitive extended REGEX matches\n" + " -l, --label=STRING\n" + " Prefix label for output from plugin (default -s 'SNMP')\n\n" + "- This plugin uses the 'snmpget' command included with the UCD-SNMP package.\n" + " If you don't have the package installed, you will need to download it from\n" + " http://ucd-snmp.ucdavis.edu before you can use this plugin.\n" + "- Multiple OIDs may be indicated by a comma- or space-delimited list (lists with\n" + " internal spaces must be quoted)\n" + "- Ranges are inclusive and are indicated with colons. When specified as\n" + " 'min:max' a STATE_OK will be returned if the result is within the indicated\n" + " range or is equal to the upper or lower bound. A non-OK state will be\n" + " returned if the result is outside the specified range.\n" + "- If spcified in the order 'max:min' a non-OK state will be returned if the\n" + " result is within the (inclusive) range.\n" + "- Upper or lower bounds may be omitted to skip checking the respective limit.\n" + "- Bare integers are interpreted as upper limits.\n" + "- When checking multiple OIDs, separate ranges by commas like '-w 1:10,1:,:20'\n" + "- Note that only one string and one regex may be checked at present\n" + "- All evaluation methods other than PR, STR, and SUBSTR expect that the value\n" + " returned from the SNMP query is an unsigned integer.\n\n", + DEFAULT_DELIMITER); +} + +char * +clarify_message (char *msg) +{ + int i = 0; + int foo; + char tmpmsg_c[MAX_INPUT_BUFFER]; + char *tmpmsg = (char *) &tmpmsg_c; + tmpmsg = strcpy (tmpmsg, msg); + if (!strncmp (tmpmsg, " Hex:", 5)) { + tmpmsg = strtok (tmpmsg, ":"); + while ((tmpmsg = strtok (NULL, " "))) { + foo = strtol (tmpmsg, NULL, 16); + /* Translate chars that are not the same value in the printers + * character set. + */ + switch (foo) { + case 208: + { + foo = 197; + break; + } + case 216: + { + foo = 196; + break; + } + } + msg[i] = foo; + i++; + } + msg[i] = 0; + } + return (msg); +} + + +int +check_num (int i) +{ + int result; + result = STATE_OK; + if (eval_method[i] & WARN_GT && eval_method[i] & WARN_LT && + lower_warn_lim[i] > upper_warn_lim[i]) { + if (response_value[i] <= lower_warn_lim[i] && + response_value[i] >= upper_warn_lim[i]) { + result = STATE_WARNING; + } + } + else if + ((eval_method[i] & WARN_GT && response_value[i] > upper_warn_lim[i]) || + (eval_method[i] & WARN_GE && response_value[i] >= upper_warn_lim[i]) || + (eval_method[i] & WARN_LT && response_value[i] < lower_warn_lim[i]) || + (eval_method[i] & WARN_LE && response_value[i] <= lower_warn_lim[i]) || + (eval_method[i] & WARN_EQ && response_value[i] == upper_warn_lim[i]) || + (eval_method[i] & WARN_NE && response_value[i] != upper_warn_lim[i])) { + result = STATE_WARNING; + } + + if (eval_method[i] & CRIT_GT && eval_method[i] & CRIT_LT && + lower_warn_lim[i] > upper_warn_lim[i]) { + if (response_value[i] <= lower_crit_lim[i] && + response_value[i] >= upper_crit_lim[i]) { + result = STATE_CRITICAL; + } + } + else if + ((eval_method[i] & CRIT_GT && response_value[i] > upper_crit_lim[i]) || + (eval_method[i] & CRIT_GE && response_value[i] >= upper_crit_lim[i]) || + (eval_method[i] & CRIT_LT && response_value[i] < lower_crit_lim[i]) || + (eval_method[i] & CRIT_LE && response_value[i] <= lower_crit_lim[i]) || + (eval_method[i] & CRIT_EQ && response_value[i] == upper_crit_lim[i]) || + (eval_method[i] & CRIT_NE && response_value[i] != upper_crit_lim[i])) { + result = STATE_CRITICAL; + } + + return result; +} + + +int +lu_getll (unsigned long *ll, char *str) +{ + char tmp[100]; + if (strchr (str, ':') == NULL) + return 0; + if (strchr (str, ',') != NULL && (strchr (str, ',') < strchr (str, ':'))) + return 0; + if (sscanf (str, "%lu%[:]", ll, tmp) == 2) + return 1; + return 0; +} + +int +lu_getul (unsigned long *ul, char *str) +{ + char tmp[100]; + if (sscanf (str, "%lu%[^,]", ul, tmp) == 1) + return 1; + if (sscanf (str, ":%lu%[^,]", ul, tmp) == 1) + return 1; + if (sscanf (str, "%*u:%lu%[^,]", ul, tmp) == 1) + return 1; + return 0; +} + + + + + + +/* trim leading whitespace + if there is a leading quote, make sure it balances */ + +char * +thisarg (char *str) +{ + str += strspn (str, " \t\r\n"); /* trim any leading whitespace */ + if (strstr (str, "'") == str) { /* handle SIMPLE quoted strings */ + if (strlen (str) == 1 || !strstr (str + 1, "'")) + terminate (STATE_UNKNOWN, "Unbalanced quotes\n"); + } + return str; +} + + +/* if there's a leading quote, advance to the trailing quote + set the trailing quote to '\x0' + if the string continues, advance beyond the comma */ + +char * +nextarg (char *str) +{ + if (strstr (str, "'") == str) { + if (strlen (str) > 1) { + str = strstr (str + 1, "'"); + str[0] = 0; + return (++str); + } + else { + str[0] = 0; + return NULL; + } + } + if (strstr (str, ",") == str) { + if (strlen (str) > 1) { + str[0] = 0; + return (++str); + } + else { + str[0] = 0; + return NULL; + } + } + if ((str = strstr (str, ",")) && strlen (str) > 1) { + str[0] = 0; + return (++str); + } + return NULL; +} From noreply at sourceforge.net Wed Oct 30 09:05:06 2002 From: noreply at sourceforge.net (noreply at sourceforge.net) Date: Wed Oct 30 09:05:06 2002 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-631040 ] check_http fails using ssl Message-ID: Bugs item #631040, was opened at 2002-10-30 14:57 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=631040&group_id=29880 Category: None Group: CVS Status: Open Resolution: None Priority: 5 Submitted By: Wim Fournier (hsmade) Assigned to: Nobody/Anonymous (nobody) Summary: check_http fails using ssl Initial Comment: If I use check_http on a https server, it fails: # ./check_http2 -H dev01.procira.com -I x.x.x.x -p 433 - auth aa:bb -S 8093:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure:s23_clnt.c:455: Unable to open TCP socket # If I try the same url with lynx (compiled with same ssl libs), it works. This problem seems to exist in both the cvs and the released version. It also does not matter if I use a normal user or root (for both lynx and the plugin). As far as I can see with strace, it really is a handshake problem, there is something read from the stream, something written and something read again, then it conlcudes with a handshake error. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=631040&group_id=29880 From kdebisschop at alert.infoplease.com Wed Oct 30 10:44:10 2002 From: kdebisschop at alert.infoplease.com (Karl DeBisschop) Date: Wed Oct 30 10:44:10 2002 Subject: [Nagiosplug-devel] buffer overruns Message-ID: <1036003399.3441.10.camel@toaster> Please be careful when writing code that uses fixed-size buffers. I recently caught several recently introduced potential overruns in check_smtp. I recommend looking at the man page for asprintf (allocating sprintf). if you run GNU or FreeBSD. With this, there's really no excuse for allowing potential overruns, or having compiled-in limits on string size. Plus it's alot faster than the ssprintf hack I had put together before I found this function. We're all pretty aware how much attention is paid to security these days. There's not much risk in the plugins, since you code parameters in the config files. But there probably is some risk. And I just don't want to be on the recieving end of a report that the plugins are full of overruns. For non-GNU/FreeBSD OS's, ther asprintf function is part of the snprintf code provided with the tarball. At the moment, there are problems building on some OS's as a result. But that snprintf code comes directly from samba, so it should be workable on almost any imaginable platform. And we will not really be able to release 1.3 without making it build successfully. In other words, you can count on asprintf being always available for the plugins, at least by the tiime of release. -- Karl From michael.haro at ceres.ca.gov Wed Oct 30 13:37:04 2002 From: michael.haro at ceres.ca.gov (Michael Haro) Date: Wed Oct 30 13:37:04 2002 Subject: [Nagiosplug-devel] Build issues on Solaris 8 from CVS as 1 PM US/Pacific time today Message-ID: <001201c2805c$745f1490$240110ac@DARKSTAR> I should start by saying I'm new to the auto* tools, but I think I did things correctly... version info... automake (GNU automake) 1.7.1 aclocal (GNU automake) 1.7.1 autoconf (GNU Autoconf) 2.54 autoheader (GNU Autoconf) 2.54 gcc version 3.2 GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. what I did: mkdir nagioscvs cd nagioscvs cvs -d:pserver:anonymous at cvs.nagiosplug.sourceforge.net:/cvsroot/nagiosplug login cvs -z3 -d:pserver:anonymous at cvs.nagiosplug.sourceforge.net:/cvsroot/nagiosp lug co nagiosplug cd nagiosplug # remove acconfig.h because autoheader complains about it existing rm acconfig.h aclocal autoheader automake autoconf # patch configure because ac_config_libobj_dir is being set wrong perl -i.orig -pe 's,ac_config_libobj_dir=\.,ac_config_libobj_dir=plugins,' configure ./configure --with-mysql I'm not sure how to fix it, but configure says... checking for gettimeofday... no which is incorrect and thus kills the build because utils.h redefines the timeval struct. Am I doing something wrong or is there an error somewhere in the build process? Thanks, Michael From paul at aps.org Wed Oct 30 19:45:03 2002 From: paul at aps.org (Paul Dlug) Date: Wed Oct 30 19:45:03 2002 Subject: [Nagiosplug-devel] PATCH: check_mrtgtraf.c Message-ID: <0E5A4B1C-EC83-11D6-A269-000393BB3E22@aps.org> Looks like check_mrtgtraf doesn't actually return a warning or critical message. Patch follows. diff -urN check_mrtgtraf.c ~/check_mrtgtraf.c --- check_mrtgtraf.c Thu Feb 28 01:42:58 2002 +++ /home/paul/check_mrtgtraf.c Wed Oct 30 22:42:24 2002 @@ -198,7 +198,7 @@ if (incoming_rate > incoming_critical_threshold || outgoing_rate > outgoing_critical_threshold) { result = STATE_CRITICAL; - sprintf (error_message, "%s. In = %0.1f %s, %s. Out = %0.1f %s", + sprintf (error_message, "Traffic CRITICAL %s. In = %0.1f %s, %s. Out = %0.1f %s", (use_average == TRUE) ? "Ave" : "Max", adjusted_incoming_rate, incoming_speed_rating, (use_average == TRUE) ? "Ave" : "Max", adjusted_outgoing_rate, outgoing_speed_rating); @@ -206,7 +206,7 @@ else if (incoming_rate > incoming_warning_threshold || outgoing_rate > outgoing_warning_threshold) { result = STATE_WARNING; - sprintf (error_message, "%s. In = %0.1f %s, %s. Out = %0.1f %s", + sprintf (error_message, "Traffic WARNING %s. In = %0.1f %s, %s. Out = %0.1f %s", (use_average == TRUE) ? "Ave" : "Max", adjusted_incoming_rate, From Volker.Aust at premiere.de Thu Oct 31 00:29:04 2002 From: Volker.Aust at premiere.de (Volker.Aust at premiere.de) Date: Thu Oct 31 00:29:04 2002 Subject: [Nagiosplug-devel] Build issues on Solaris 8 from CVS as 1 PM US/Pacific time today Message-ID: This is a crude hack: - edit in config.cache the line containing ac_cv_func_gettimeofday from 'no' to 'yes' - ./configure - make Hope this helps. -vol > -----Original Message----- > From: Michael Haro [mailto:michael.haro at ceres.ca.gov] > Sent: Wednesday, October 30, 2002 10:37 PM > To: nagiosplug-devel at lists.sourceforge.net > Subject: [Nagiosplug-devel] Build issues on Solaris 8 from CVS as 1 PM > US/Pacific time today > > > I should start by saying I'm new to the auto* tools, but I think I did > things correctly... > > version info... > automake (GNU automake) 1.7.1 > aclocal (GNU automake) 1.7.1 > autoconf (GNU Autoconf) 2.54 > autoheader (GNU Autoconf) 2.54 > gcc version 3.2 > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > > what I did: > > mkdir nagioscvs > cd nagioscvs > > cvs > -d:pserver:anonymous at cvs.nagiosplug.sourceforge.net:/cvsroot/n > agiosplug > login > cvs -z3 > -d:pserver:anonymous at cvs.nagiosplug.sourceforge.net:/cvsroot/nagiosp > lug co nagiosplug > > cd nagiosplug > > # remove acconfig.h because autoheader complains about it existing > rm acconfig.h > > aclocal > autoheader > automake > autoconf > > # patch configure because ac_config_libobj_dir is being set wrong > perl -i.orig -pe > 's,ac_config_libobj_dir=\.,ac_config_libobj_dir=plugins,' > configure > > ./configure --with-mysql > > I'm not sure how to fix it, but configure says... > checking for gettimeofday... no > > which is incorrect and thus kills the build because utils.h > redefines the > timeval struct. > > Am I doing something wrong or is there an error somewhere in the build > process? > > Thanks, > > Michael > > > > ------------------------------------------------------- > This sf.net email is sponsored by: Influence the future > of Java(TM) technology. Join the Java Community > Process(SM) (JCP(SM)) program now. > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en > _______________________________________________ > Nagiosplug-devel mailing list > Nagiosplug-devel at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel >