From noreply at sourceforge.net Mon Dec 5 16:28:16 2011 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 05 Dec 2011 07:28:16 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-3451435 ] check_procs perfdata added ... again ; -) Message-ID: Patches item #3451435, was opened at 2011-12-05 07:28 Message generated for change (Tracker Item Submitted) made by goesta You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3451435&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Perf data Group: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Goesta Smekal (goesta) Assigned to: Nobody/Anonymous (nobody) Summary: check_procs perfdata added ... again ;-) Initial Comment: Hi, once again, I endeavour to get my patch for the check_procs plugin upstream. The patch adds a new parameter '-d' activating perfdata output. Patch against Plugin Version (-V output): v1.4.15 Plugin Name: check_procs Example Plugin Commandline: check_procs -d Tested on operating system: Debian GNU/Linux (v6.0.3 Squeeze) Tested on architecture: i686, AMD64 Tested with compiler: gcc version 4.4.5 kind regards Goesta ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3451435&group_id=29880 From schnederle at futureweb.at Mon Dec 5 19:21:15 2011 From: schnederle at futureweb.at (Andreas Schnederle-Wagner - Futureweb.at) Date: Mon, 5 Dec 2011 18:21:15 +0000 Subject: [Nagiosplug-devel] check_disk - perfdata Message-ID: <5AE57E90D7CC1E42A0CB2FE33EC0B6959CCFBAB9@HP-WIN2008.intranet.local> Hello, got a little problem with the perfdata which check_disk returns me. (found old Thread where this problem was already mentioned --> http://sourceforge.net/mailarchive/message.php?msg_id=24781155) For graphical representation of the perfdata in Centreon I need the perfdata in BYTES not in MB. Is there a possibility for this now? Thank you, bye from Austria Andreas -------------- next part -------------- An HTML attachment was scrubbed... URL: From Pierre.Bru at spotimage.fr Wed Dec 7 10:48:14 2011 From: Pierre.Bru at spotimage.fr (Bru, Pierre) Date: Wed, 7 Dec 2011 09:48:14 +0000 Subject: [Nagiosplug-devel] check_disk - perfdata In-Reply-To: <5AE57E90D7CC1E42A0CB2FE33EC0B6959CCFBAB9@HP-WIN2008.intranet.local> References: <5AE57E90D7CC1E42A0CB2FE33EC0B6959CCFBAB9@HP-WIN2008.intranet.local> Message-ID: <4B87FADF2DB12C41901F498BA4DD2A1F021DCA@tlsexchg1.toulouse.spotimage.int> AFAIK, Centreon have no problem with perfdata in MB. But if you DO need bytes, the easiest way is to write a Perl wrapper/proxy which call check_disk and reformat the perfdata FWIW, Pierre. From: Andreas Schnederle-Wagner - Futureweb.at [mailto:schnederle at futureweb.at] Sent: Monday, December 05, 2011 7:21 PM To: 'nagiosplug-devel at lists.sourceforge.net' Subject: [Nagiosplug-devel] check_disk - perfdata Hello, got a little problem with the perfdata which check_disk returns me. (found old Thread where this problem was already mentioned --> http://sourceforge.net/mailarchive/message.php?msg_id=24781155) For graphical representation of the perfdata in Centreon I need the perfdata in BYTES not in MB. Is there a possibility for this now? Thank you, bye from Austria Andreas Please consider the environment before printing this email message. -------------------------------------------------------------------------- Ce courriel (incluant ses ?ventuelles pi?ces jointes) peut contenir des informations confidentielles et/ou prot?g?es ou dont la diffusion est restreinte. Si vous avez re?u ce courriel par erreur, vous ne devez ni le copier, ni l'utiliser, ni en divulguer le contenu ? quiconque. Merci d'en avertir imm?diatement l'exp?diteur et d'effacer ce courriel de votre syst?me. Spot Image d?cline toute responsabilit? en cas de corruption par virus, d'alt?ration ou de falsification de ce courriel lors de sa transmission par voie ?lectronique. This email (including any attachments) may contain confidential and/or privileged information or information otherwise protected from disclosure. If you are not the intended recipient, please notify the sender immediately, do not copy this message or any attachments and do not use it for any purpose or disclose its content to any person, but delete this message and any attachments from your system. Spot Image disclaims any and all liability if this email transmission was virus corrupted, altered or falsified. -------------------------------------------------------------------------- Spot Image SA (325 089 589 RCS Toulouse) - Siege social: 5, rue des Satellites, 31400 Toulouse, France. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: image/jpeg Size: 625 bytes Desc: not available URL: From trtrmitya at gmail.com Thu Dec 8 05:18:48 2011 From: trtrmitya at gmail.com (Dmitry Sivachenko) Date: Thu, 08 Dec 2011 08:18:48 +0400 Subject: [Nagiosplug-devel] -w and -c values are locale-dependend Message-ID: <4EE03AA8.6080005@gmail.com> Hello! Many plugins understand -w and -c options for warning and critical threshold. Help output says that fraction values should use dot as seaerator: -w 0.5 -c 0.9 But this is not the case with, say, ru_RU.KOI8-R locale. I should use comma to get the desired results: -w 0,5 -c 0,9 This is not convenient when starting nagios from command line. Is there any chance to fix that so it works the same way regardless of locale? Thanks! From noreply at sourceforge.net Mon Dec 12 12:05:27 2011 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 12 Dec 2011 03:05:27 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-3458175 ] check_fping: added quick host-alive mode Message-ID: Patches item #3458175, was opened at 2011-12-12 03:05 Message generated for change (Tracker Item Submitted) made by shrank You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3458175&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Enhancement Group: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Michael Salathe (shrank) Assigned to: Nobody/Anonymous (nobody) Summary: check_fping: added quick host-alive mode Initial Comment: Hi there I'm using check_fping to test around 1000 WAN Routers around the globe. Due to high delay and a normal packet loss I'm forced to use high timeouts and more Pings per test to prevent flapping. To reduce the check-duration, i added a host-alive flag which stops testing after the first successful reply. Kind regards, Michael ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3458175&group_id=29880 From noreply at sourceforge.net Mon Dec 19 18:01:48 2011 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 19 Dec 2011 09:01:48 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-3462469 ] check_http: print subject name in certificate check Message-ID: Patches item #3462469, was opened at 2011-12-19 09:01 Message generated for change (Tracker Item Submitted) made by osk You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3462469&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Enhancement Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Oskar Liljeblad (osk) Assigned to: Nobody/Anonymous (nobody) Summary: check_http: print subject name in certificate check Initial Comment: This patch prints the subject name in certificate checks. It also changes the date format to the more common YYYY-MM-DD HH:MM (unless AMERICAN_DATE_FORMAT is defined). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3462469&group_id=29880 From noreply at sourceforge.net Thu Dec 22 14:34:18 2011 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 22 Dec 2011 05:34:18 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-3463985 ] Fixes for check_snmp Message-ID: Patches item #3463985, was opened at 2011-12-22 05:34 Message generated for change (Tracker Item Submitted) made by You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3463985&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: S?bastien Prud'homme () Assigned to: Nobody/Anonymous (nobody) Summary: Fixes for check_snmp Initial Comment: A small patch: - response should not start with the delimiter - OID response value taken into account --- nagios-plugins-1.4.15/plugins/check_snmp.c.rmap 2011-12-22 14:23:26.000000000 +0100 +++ nagios-plugins-1.4.15/plugins/check_snmp.c 2011-12-22 14:27:30.000000000 +0100 @@ -322,6 +322,7 @@ response = strstr (ptr, delimiter); if (response == NULL) break; + response = response + 3; if (verbose > 2) { printf("Processing oid %i (line %i)\n oidname: %s\n response: %s\n", i+1, line+1, oidname, response); @@ -353,6 +354,9 @@ else if (strstr (response, "INTEGER: ")) { show = strstr (response, "INTEGER: ") + 9; } + else if (strstr (response, "OID: ")) { + show = strstr (response, "OID: ") + 5; + } else if (strstr (response, "STRING: ")) { show = strstr (response, "STRING: ") + 8; conv = "%.10g"; ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3463985&group_id=29880 From noreply at sourceforge.net Mon Dec 26 11:08:39 2011 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 26 Dec 2011 02:08:39 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3465557 ] 'check_ups' - Buffer Overflow Message-ID: Bugs item #3465557, was opened at 2011-12-26 02:08 Message generated for change (Tracker Item Submitted) made by sschurtz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3465557&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Argument proccessing Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: sschurtz (sschurtz) Assigned to: Nobody/Anonymous (nobody) Summary: 'check_ups' - Buffer Overflow Initial Comment: Hi, there is a buffer overflow in the check_ups plugin ./check_ups -u `perl -e 'print "A"x16407'` *** buffer overflow detected ***: ./check_ups terminated ======= Backtrace: ========= /lib/libc.so.6(__fortify_fail+0x50)[0x25d970] /lib/libc.so.6(+0xe486a)[0x25c86a] /lib/libc.so.6(+0xe3fa8)[0x25bfa8] /lib/libc.so.6(_IO_default_xsputn+0x9e)[0x1e2a2e] /lib/libc.so.6(_IO_vfprintf+0x36b2)[0x1b88c2] /lib/libc.so.6(__vsprintf_chk+0xad)[0x25c05d] /lib/libc.so.6(__sprintf_chk+0x2d)[0x25bf9d] ./check_ups[0x8049e66] ./check_ups[0x804a105] ./check_ups[0x804a4ce] /lib/libc.so.6(__libc_start_main+0xe7)[0x18ece7] ./check_ups[0x80491a1] ======= Memory map: ======== 00110000-0012c000 r-xp 00000000 08:01 660177 /lib/ld-2.12.1.so 0012c000-0012d000 r--p 0001b000 08:01 660177 /lib/ld-2.12.1.so 0012d000-0012e000 rw-p 0001c000 08:01 660177 /lib/ld-2.12.1.so 0012e000-0012f000 r-xp 00000000 00:00 0 [vdso] 0012f000-00142000 r-xp 00000000 08:01 660186 /lib/libnsl-2.12.1.so 00142000-00143000 r--p 00012000 08:01 660186 /lib/libnsl-2.12.1.so 00143000-00144000 rw-p 00013000 08:01 660186 /lib/libnsl-2.12.1.so // without stack protection sysctl -w kernel.randomize_va_space=0 gcc -fno-stack-protector -z execstack -DNP_VERSION=\"1.4.15\" -g -o check_ups check_ups.c netutils.o utils.o -L/usr/src/nagios-plugins-1.4.15/plugins ../lib/libnagiosplug.a ../gl/libgnu.a -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -I../lib -I../gl -I../intl -I.. ./check_ups -u `perl -e 'print "A"x16408'` Connection refused Invalid response received from host Segmentation fault (gdb) run -u `perl -e 'print "A"x16408'` The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /usr/src/nagios-plugins-1.4.15/plugins/check_ups -u `perl -e 'print "A"x16408'` Connection refused Invalid response received from host Program received signal SIGSEGV, Segmentation fault. 0x41414141 in ?? () (gdb) i r eax 0xffffffff -1 ecx 0x2914e0 2692320 edx 0x292360 2696032 ebx 0x41414141 1094795585 esp 0xbfff56f0 0xbfff56f0 ebp 0x41414141 0x41414141 <--- AAAA esi 0x0 0 edi 0x0 0 eip 0x41414141 0x41414141 <--- AAAA eflags 0x10286 [ PF SF IF RF ] cs 0x73 115 ss 0x7b 123 ds 0x7b 123 es 0x7b 123 fs 0x0 0 gs 0x33 51 By default the plugin has no suid or guid bit set, so there should be no security risk. Best regards, sschurtz ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3465557&group_id=29880 From niedbalski at gmail.com Mon Dec 26 16:37:59 2011 From: niedbalski at gmail.com (Jorge Niedbalski) Date: Mon, 26 Dec 2011 12:37:59 -0300 Subject: [Nagiosplug-devel] check_http bug for min_page_len Message-ID: Given this input : /usr/local/nagios/libexec/check_http -u /job/status -H host -p 8080 --pagesize=0:0 --post="value=123123" --warning=10.0 -N -f ok --critical=20.0 -v POST /job/status HTTP/1.0 User-Agent: check_http/v1861 (nagios-plugins 1.4.11) Connection: close Host: host Content-Type: application/x-www-form-urlencoded Content-Length: 78 id=10 HTTP CRITICAL - No data received from host Fix : Check for the min_page_len before compare current pagesize. Patch attached. Thanks you. -- Jorge Niedbalski R. -------------------------- Software Developer & nix sysadmin -------------- next part -------------- A non-text attachment was scrubbed... Name: check_http_p.diff Type: text/x-patch Size: 451 bytes Desc: not available URL: From fournet.matthieu at gmail.com Tue Dec 27 22:44:45 2011 From: fournet.matthieu at gmail.com (Matthieu Fournet) Date: Tue, 27 Dec 2011 22:44:45 +0100 Subject: [Nagiosplug-devel] tip for plugin development and temp files Message-ID: Hi all, I'd like to add my 10 cents to the plugins developer guidelines (at section "3.3. Don't make temp files unless absolutely required", http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN254), regarding the use of temporary files. Of course I agree with this piece of advice, but considering there's no other solution than creating a temp file (carefully, and cleaning everything before leaving !), there's one more rule developers have to keep in mind : make temp files name unique. Indeed, we all tend to name temp files like "tmp" or "temp", or whatever. But in case of concurrent executions (the same plugin is run on the same poller for 2 differents hosts, OR 2 distinct plugins running simultaneously create temp files), you'll end up with both plugin trying to read / write / open / delete the same file, and you may encounter some "file not found" errors, whereas while running plugins manually, everything works just fine. So my advice would be to name temp files like : tmp_[plugin_name]_[timestamp] or any combination so that temp files never collide. Hope this helps ;-) Cheers Matthieu -------------- next part -------------- An HTML attachment was scrubbed... URL: From wferi at niif.hu Wed Dec 28 14:22:01 2011 From: wferi at niif.hu (Ferenc Wagner) Date: Wed, 28 Dec 2011 14:22:01 +0100 Subject: [Nagiosplug-devel] tip for plugin development and temp files In-Reply-To: (Matthieu Fournet's message of "Tue, 27 Dec 2011 22:44:45 +0100") References: Message-ID: <87aa6cvnk6.fsf@tac.ki.iif.hu> Matthieu Fournet writes: > I'd like to add my 10 cents to the plugins developer guidelines (at section > "3.3. Don't make temp files unless absolutely required", > http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN254), > regarding the use of temporary files. > [...] > So my advice would be to name temp files like : > > tmp_[plugin_name]_[timestamp] Libc provides the mkstemp() family and tmpfile() for this purpose. I think you'd be better off using those instead of inventing own methods. -- Regards, Feri. From ericvillaorts at yahoo.es Wed Dec 28 21:06:25 2011 From: ericvillaorts at yahoo.es (irineo villanovaorts) Date: Wed, 28 Dec 2011 20:06:25 +0000 (GMT) Subject: [Nagiosplug-devel] check_snmp HowTo Message-ID: <1325102785.78298.YahooMailMobile@web23906.mail.ird.yahoo.com> Hi, I am trying to monitor various parts of a remote system (cpu, swap, disk ...) using the check_snmp module on icinga but my problem appears when I want to set up the range for warning and critical notifications. Most of the results I am getting from snmp are in KB and what I would need is to have this in % then I could define the min/max range for each component I want to monitor. So, to resume, for monitoring a disk space I would need to have a total disk space for calculating the percentage of the disk usage and then define a range in % for warning and critical but I have no clue on how to do this. I hope I explained myself and that someone could give me a hand on this. Thanks in advance, Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From fournet.matthieu at gmail.com Wed Dec 28 22:10:07 2011 From: fournet.matthieu at gmail.com (Matthieu Fournet) Date: Wed, 28 Dec 2011 22:10:07 +0100 Subject: [Nagiosplug-devel] tip for plugin development and temp files In-Reply-To: <87aa6cvnk6.fsf@tac.ki.iif.hu> References: <87aa6cvnk6.fsf@tac.ki.iif.hu> Message-ID: Sure (thanks for the tip, anyway), but you may know that Nagios allows plugins to be written in any language, not only C. My point was just to warn plugin developers about concurrent plugin executions and colliding temp files, and suggesting a basic way to circumvent this. Yours looks better than mine (and I googled for methods to do this in PERL, which is the language I use for plugin development, I'll consider updating my plugins), but this questions plugins portability and the need to install PERL libraries... Anyway, thanks for your rude welcome to this mailing list. I just wanted to warn about a stupid bug I made lately where 2 concurrent executions of my plugin were using the same temp file. Leave the documentation as is, and expect no more comments from me. Regards Matthieu On Wed, Dec 28, 2011 at 2:22 PM, Ferenc Wagner wrote: > Matthieu Fournet writes: > > > I'd like to add my 10 cents to the plugins developer guidelines (at > section > > "3.3. Don't make temp files unless absolutely required", > > http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN254), > > regarding the use of temporary files. > > [...] > > So my advice would be to name temp files like : > > > > tmp_[plugin_name]_[timestamp] > > Libc provides the mkstemp() family and tmpfile() for this purpose. I > think you'd be better off using those instead of inventing own methods. > -- > Regards, > Feri. > > > ------------------------------------------------------------------------------ > Write once. Port to many. > Get the SDK and tools to simplify cross-platform app development. Create > new or port existing apps to sell to consumers worldwide. Explore the > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > http://p.sf.net/sfu/intel-appdev > _______________________________________________________ > Nagios Plugin Development Mailing List > Nagiosplug-devel at lists.sourceforge.net > Unsubscribe at > https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > ::: Please include plugins version (-v) and OS when reporting any issue. > ::: Messages without supporting info will risk being sent to /dev/null > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paulg at greenwand.net Wed Dec 28 11:35:05 2011 From: paulg at greenwand.net (Paul Green) Date: Wed, 28 Dec 2011 10:35:05 +0000 Subject: [Nagiosplug-devel] tip for plugin development and temp files In-Reply-To: References: Message-ID: <12e974f48d7ffbbf9f94021c8e6c6da2@imap1.greenwand.net> Could I suggest process ID rather than timestamp, as it's shorter and removes the remote chance of a clash altogether. Cheers Paul On Tue, 27 Dec 2011 22:44:45 +0100, Matthieu Fournet wrote: > Hi all, > > I'd like to add my 10 cents to the plugins developer guidelines (at section > "3.3. Don't make temp files unless absolutely required", > http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN254), > regarding the use of temporary files. > > Of course I agree with this piece of advice, but considering there's no > other solution than creating a temp file (carefully, and cleaning > everything before leaving !), there's one more rule developers have to keep > in mind : make temp files name unique. > Indeed, we all tend to name temp files like "tmp" or "temp", or whatever. > But in case of concurrent executions (the same plugin is run on the same > poller for 2 differents hosts, OR 2 distinct plugins running simultaneously > create temp files), you'll end up with both plugin trying to read / write / > open / delete the same file, and you may encounter some "file not found" > errors, whereas while running plugins manually, everything works just fine. > > So my advice would be to name temp files like : > > tmp_[plugin_name]_[timestamp] > > or any combination so that temp files never collide. > > Hope this helps ;-) > > Cheers > > Matthieu From ae at op5.se Thu Dec 29 04:38:34 2011 From: ae at op5.se (Andreas Ericsson) Date: Thu, 29 Dec 2011 14:38:34 +1100 Subject: [Nagiosplug-devel] tip for plugin development and temp files In-Reply-To: References: Message-ID: <4EFBE0BA.9010407@op5.se> On 12/28/2011 08:44 AM, Matthieu Fournet wrote: > Hi all, > > I'd like to add my 10 cents to the plugins developer guidelines (at section > "3.3. Don't make temp files unless absolutely required", > http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN254), > regarding the use of temporary files. > > Of course I agree with this piece of advice, but considering there's no > other solution than creating a temp file (carefully, and cleaning > everything before leaving !), There are always other options than creating tempfiles. If you create the tempfile from the plugin, you will already know its contents at creation time or you would not be able to fill the tempfile with data. Since the only thing you'd ever want to do with a tempfile is to read its contents back in for further processing, the whole step of hitting the disk(cache) and then grabbing it back is completely useless. there's one more rule developers have to keep > in mind : make temp files name unique. > Indeed, we all tend to name temp files like "tmp" or "temp", or whatever. > But in case of concurrent executions (the same plugin is run on the same > poller for 2 differents hosts, OR 2 distinct plugins running simultaneously > create temp files), you'll end up with both plugin trying to read / write / > open / delete the same file, and you may encounter some "file not found" > errors, whereas while running plugins manually, everything works just fine. > > So my advice would be to name temp files like : > > tmp_[plugin_name]_[timestamp] > > or any combination so that temp files never collide. > While I agree with the general thrust of your advice, I most strongly disagree with this way of creating tempfiles. There are pre-created functions for creating temporary files in very nearly all languages I've ever come across, with raw assembly being the sole exception. Those schemes are meant for fault-tolerant inter-process communication though, such as mailservers spooling mails. For very shortlived files created, used and deleted by the same program, using the process id of the running process is always a better choice. All languages any sane man would ever want to use for plugin writing has the ability to get the process id as well, and it's always built into the core of the language and thus always available. But like I said before; There is never a need for tempfiles and those who opt to use them generally do so because they lack knowledge of the language they're using. -- Andreas Ericsson andreas.ericsson at op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 Considering the successes of the wars on alcohol, poverty, drugs and terror, I think we should give some serious thought to declaring war on peace. From wferi at niif.hu Thu Dec 29 18:43:06 2011 From: wferi at niif.hu (Ferenc Wagner) Date: Thu, 29 Dec 2011 18:43:06 +0100 Subject: [Nagiosplug-devel] tip for plugin development and temp files In-Reply-To: (Matthieu Fournet's message of "Wed, 28 Dec 2011 22:10:07 +0100") References: <87aa6cvnk6.fsf@tac.ki.iif.hu> Message-ID: <87oburtgt1.fsf@tac.ki.iif.hu> Matthieu Fournet writes: > On Wed, Dec 28, 2011 at 2:22 PM, Ferenc Wagner wrote: > >> Matthieu Fournet writes: >> >>> I'd like to add my 10 cents to the plugins developer guidelines (at >>> section "3.3. Don't make temp files unless absolutely required", >>> http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN254), >>> regarding the use of temporary files. >>> [...] >>> So my advice would be to name temp files like : >>> >>> tmp_[plugin_name]_[timestamp] >> >> Libc provides the mkstemp() family and tmpfile() for this purpose. I >> think you'd be better off using those instead of inventing own methods. > > [...] > Anyway, thanks for your rude welcome to this mailing list. I just wanted to > warn about a stupid bug I made lately where 2 concurrent executions of my > plugin were using the same temp file. Leave the documentation as is, and > expect no more comments from me. Sorry, I didn't mean being rude or hurting you in any way. I had to be terse, but if my language was strong, that must be because English isn't my first language. I sincerely apologise. Back to the technical part: as I understand it, we are in full agreement and I've got nothing against inserting a warning into the guide. -- Regards, Feri. From eric.schoeller at Colorado.EDU Thu Dec 29 23:56:06 2011 From: eric.schoeller at Colorado.EDU (Eric Schoeller) Date: Thu, 29 Dec 2011 15:56:06 -0700 Subject: [Nagiosplug-devel] check_snmp HowTo In-Reply-To: <1325102785.78298.YahooMailMobile@web23906.mail.ird.yahoo.com> References: <1325102785.78298.YahooMailMobile@web23906.mail.ird.yahoo.com> Message-ID: <4EFCF006.5060008@colorado.edu> I certainly understand your situation. What you need to do is monitor two separate SNMP objects (OIDs) in order to comprehend a % disk utilization. This is not possible with the check_snmp plugin as it is currently written. You may check multiple OIDs within the same check, but you cannot perform any math or comparison between these values. You'd need to develop your own check to do this. Now, when you use a directive in SNMP such as includeAllDisks, you can also specify a % which is what determines whether the disk is in a warning state or not with respect to space utilization. It may be possible to set your thresholds within SNMP and then monitor the OID which shows the state of the device and whether this threshold has been exceeded. I am not certain, but this could be reflected in hrDeviceStatus. We use NRPE and the check_disk plugin for checking disk space. Hope this helps -- Eric Schoeller University of Colorado Boulder Office of Information Technology irineo villanovaorts wrote: > Hi, > > I am trying to monitor various parts of a remote system (cpu, swap, > disk ...) using the check_snmp module on icinga but my problem appears > when I want to set up the range for warning and critical > notifications. Most of the results I am getting from snmp are in KB > and what I would need is to have this in % then I could define the > min/max range for each component I want to monitor. > > So, to resume, for monitoring a disk space I would need to have a > total disk space for calculating the percentage of the disk usage and > then define a range in % for warning and critical but I have no clue > on how to do this. > > I hope I explained myself and that someone could give me a hand on this. > > Thanks in advance, > > Eric > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex > infrastructure or vast IT resources to deliver seamless, secure access to > virtual desktops. With this all-in-one solution, easily deploy virtual > desktops for less than the cost of PCs and save 60% on VDI infrastructure > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox > ------------------------------------------------------------------------ > > _______________________________________________________ > Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net > Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel > ::: Please include plugins version (-v) and OS when reporting any issue. > ::: Messages without supporting info will risk being sent to /dev/null From mike-nagios at 5dninja.net Fri Dec 30 01:14:35 2011 From: mike-nagios at 5dninja.net (Mike Lindsey) Date: Thu, 29 Dec 2011 16:14:35 -0800 Subject: [Nagiosplug-devel] Update to SSL cert age checks (-X for critical) In-Reply-To: <87oburtgt1.fsf@tac.ki.iif.hu> References: <87aa6cvnk6.fsf@tac.ki.iif.hu> <87oburtgt1.fsf@tac.ki.iif.hu> Message-ID: <4EFD026B.1000704@5dninja.net> At my work it's a critical issue if an SSL cert is going to expire in less time than it takes to order and install the cert. If the cert's actually expired, it's too late. So, I went and added an option to have check_http throw a critical, instead of a warning on a soon-to-expire cert. Since check_tcp and check_smtp both import sslutils.c, I added the feature there as well. I would have loved to use -W and -C, but I didn't want to break backwards compatibility on any of these plugins. Should I just be checking this into the Git repository? -- Mike Lindsey -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: certificatecrit.patch URL: