From Peter.Ringe at web.de Sun Jan 1 14:28:42 2012 From: Peter.Ringe at web.de (Peter Ringe) Date: Sun, 01 Jan 2012 14:28:42 +0100 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: <4F005F8A.9020209@web.de> Hi Eric have a look at http://exchange.nagios.org/directory/Plugins/Uncategorized/Software/SNMP/SNMP-Check-Disk/details I didn't use it, but sounds as it could help You, Regards, Peter Am 28.12.2011 21:06, schrieb irineo villanovaorts: > 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 noreply at sourceforge.net Mon Jan 2 10:05:15 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 02 Jan 2012 01:05:15 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3468344 ] Wrong Performance Data from check_disk Message-ID: Bugs item #3468344, was opened at 2012-01-02 01:05 Message generated for change (Tracker Item Submitted) made by jorg1985 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3468344&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: Interface (example) Group: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: jorg (jorg1985) Assigned to: Nobody/Anonymous (nobody) Summary: Wrong Performance Data from check_disk Initial Comment: Hi, There are wrong values in the performance data output of the check_disk plugin. please check the following example: definition: label'=value[UOM];[warn];[crit];[min];[max] if i take the diff of the value and the max value i cant reach the explored freespace value. 8068 - 1922 != 5736 This also affects the thresholds (w and c) check_disk v1.4.15 (nagios-plugins 1.4.15) ./check_disk -w 10% -c 5% -p / DISK OK - free space: / 5736 MB (74% inode=96%);| /=1922MB;7261;7664;0;8068 Best regards and a happy new year, Jorg ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3468344&group_id=29880 From noreply at sourceforge.net Mon Jan 2 10:09:02 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 02 Jan 2012 01:09:02 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3468344 ] Wrong Performance Data from check_disk Message-ID: Bugs item #3468344, was opened at 2012-01-02 01:05 Message generated for change (Comment added) made by jorg1985 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3468344&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: Interface (example) Group: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: jorg (jorg1985) Assigned to: Nobody/Anonymous (nobody) Summary: Wrong Performance Data from check_disk Initial Comment: Hi, There are wrong values in the performance data output of the check_disk plugin. please check the following example: definition: label'=value[UOM];[warn];[crit];[min];[max] if i take the diff of the value and the max value i cant reach the explored freespace value. 8068 - 1922 != 5736 This also affects the thresholds (w and c) check_disk v1.4.15 (nagios-plugins 1.4.15) ./check_disk -w 10% -c 5% -p / DISK OK - free space: / 5736 MB (74% inode=96%);| /=1922MB;7261;7664;0;8068 Best regards and a happy new year, Jorg ---------------------------------------------------------------------- >Comment By: jorg (jorg1985) Date: 2012-01-02 01:09 Message: sorry wrong sentence. It should mean: if it take the diff of the max value and the value... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3468344&group_id=29880 From nixon at nsc.liu.se Mon Jan 2 22:12:38 2012 From: nixon at nsc.liu.se (Leif Nixon) Date: Mon, 02 Jan 2012 22:12:38 +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: Matthieu Fournet writes: > So my advice would be to name temp files like : > > tmp_[plugin_name]_[timestamp] If we are talking about files under /tmp, or any other location which is world-writable, this is a very bad idea, as it opens you up to symlink attacks. See e.g. https://www.securecoding.cert.org/confluence/display/seccode/FIO43-C.+Do+not+create+temporary+files+in+shared+directories for more details. -- Leif Nixon - Security officer National Supercomputer Centre - Swedish National Infrastructure for Computing Nordic Data Grid Facility - European Grid Infrastructure From noreply at sourceforge.net Wed Jan 4 02:12:44 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 03 Jan 2012 17:12:44 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-3469275 ] Add regex for header checks in check_http Message-ID: Patches item #3469275, was opened at 2012-01-03 17:12 Message generated for change (Tracker Item Submitted) made by bmirvine You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3469275&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: Bryan Irvine (bmirvine) Assigned to: Nobody/Anonymous (nobody) Summary: Add regex for header checks in check_http Initial Comment: I needed to be able to look for a specific string within the header itself. check_http v1.4.15 (nagios-plugins 1.4.15) ./check_http -d 'X-Organization: N' HTTP OK: HTTP/1.0 200 OK - 371 bytes in 0.047 second response time |time=0.047279s;;;0.000000 size=371B;;;0 ./check_http -d 'X-Organization: N1' HTTP CRITICAL: HTTP/1.0 200 OK - header 'X-Organization: N1' not found on 'http://:80/' - 371 bytes in 0.049 second response time |time=0.049446s;;;0.000000 size=371B;;;0 Tested on 64-bit Oracle Enterprise Linux Linux version 2.6.18-194.17.1.0.1.el5 (mockbuild at ca-build9.us.oracle.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Wed Sep 29 15:57:39 EDT 2010 Command line: ro root=LABEL=/ gcc --version gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3469275&group_id=29880 From noreply at sourceforge.net Wed Jan 4 02:13:06 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 03 Jan 2012 17:13:06 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-3469275 ] Add regex for header checks in check_http Message-ID: Patches item #3469275, was opened at 2012-01-03 17:12 Message generated for change (Settings changed) made by bmirvine You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3469275&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: Bryan Irvine (bmirvine) Assigned to: Nobody/Anonymous (nobody) Summary: Add regex for header checks in check_http Initial Comment: I needed to be able to look for a specific string within the header itself. check_http v1.4.15 (nagios-plugins 1.4.15) ./check_http -d 'X-Organization: N' HTTP OK: HTTP/1.0 200 OK - 371 bytes in 0.047 second response time |time=0.047279s;;;0.000000 size=371B;;;0 ./check_http -d 'X-Organization: N1' HTTP CRITICAL: HTTP/1.0 200 OK - header 'X-Organization: N1' not found on 'http://:80/' - 371 bytes in 0.049 second response time |time=0.049446s;;;0.000000 size=371B;;;0 Tested on 64-bit Oracle Enterprise Linux Linux version 2.6.18-194.17.1.0.1.el5 (mockbuild at ca-build9.us.oracle.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Wed Sep 29 15:57:39 EDT 2010 Command line: ro root=LABEL=/ gcc --version gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3469275&group_id=29880 From william at leibzon.org Wed Jan 11 06:52:59 2012 From: william at leibzon.org (William Leibzon) Date: Tue, 10 Jan 2012 21:52:59 -0800 Subject: [Nagiosplug-devel] patch to be able to specify both warning & critical days threshold for certificate expiration Message-ID: Hello everyone, The enclosed patch modifies check_tcp, check_http, check_smtp allowing to optionally specify two values for certificate expiration check. The first is days before it expires when WARNING alerts start to be issued and 2nd is for when critical alerts start to be issued. If 2nd value is not specified the critical alert days is default to 0 and behavior is as it is now when CRITICAL alerts are only issued when certificate actually expired. Let me know if you have any questions or concerns, William -------------- next part -------------- A non-text attachment was scrubbed... Name: nagios-plugins-1.4.15-certexpire_warncrit.patch Type: text/x-patch Size: 12355 bytes Desc: not available URL: From noreply at sourceforge.net Wed Jan 11 09:51:43 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 11 Jan 2012 00:51:43 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3472308 ] check_snmp: Regex not applied to numeric values Message-ID: Bugs item #3472308, was opened at 2012-01-11 00:51 Message generated for change (Tracker Item Submitted) made by shrank You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3472308&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: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Michael Salathe (shrank) Assigned to: Nobody/Anonymous (nobody) Summary: check_snmp: Regex not applied to numeric values Initial Comment: Thc check_snmp plugin doesn't test the regex if the return value is numeric. The check will always be OK as long as value is returned. In Version 1.4.14 the numeric comaprisons where applied only if the tresholds have been set. This has been changed in 1.4.15. Version 1.4.14: check_snmp -H 192.1686.1.1 -o ifOperStatus.2 -C public -r "up" SNMP CRITICAL - *down(2)* | Version 1.4.15: check_snmp -H 192.1686.1.1 -o ifOperStatus.2 -C public -r "up" SNMP OK - 2 | IF-MIB::ifOperStatus.2=2 IMHO the regex and string test should be applied to all values (even numeric). Therefore the "else if" on line 439 should be changed to a normal if. 408 if (is_numeric) { ... /* do some numeric comaprisons */ 444 } 445 446 /* Process this block for string matching */ 447 else if (eval_method[i] & CRIT_STRING) { .. 444 } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3472308&group_id=29880 From noreply at sourceforge.net Sat Jan 14 10:23:22 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Sat, 14 Jan 2012 01:23:22 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-3473669 ] Patch to specify critical threshold for cert expiration Message-ID: Patches item #3473669, was opened at 2012-01-14 01:23 Message generated for change (Tracker Item Submitted) made by willixix You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3473669&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: William Leibzon (willixix) Assigned to: Nobody/Anonymous (nobody) Summary: Patch to specify critical threshold for cert expiration Initial Comment: The enclosed patch modifies check_tcp, check_http, check_smtp allowing to optionally specify two values for certificate expiration check. The first is days before it expires when WARNING alerts start to be issued and 2nd is for when critical alerts start to be issued. If 2nd value is not specified the critical alert days is default to 0 and behavior is as it is now when CRITICAL alerts are only issued when certificate actually expired. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3473669&group_id=29880 From clayton256 at gmail.com Mon Jan 16 23:38:43 2012 From: clayton256 at gmail.com (Mark Clayton) Date: Mon, 16 Jan 2012 17:38:43 -0500 Subject: [Nagiosplug-devel] Missing character in plugin output Message-ID: I put together a bash script to use as a plugin. It is to monitor a hard drive temperature via hddtemp on a linux box. I based the script on check_log. The interesting bits are: HDTEMP=$(/user/sbin/hddtemp $DRIVE | awk '{ print $4}' | awk -F '?' '{ print $1}') /bin/echo "($DRIVE)=${HDTEMP} C." The command line output looks fine: root at little-harbor:/home/mark# /usr/lib/nagios/plugins/check_hddtemp -d /dev/sda (/dev/sda)=36 C. But Firefox and Safari show: Disk Temperature OK 2012-01-16 13:14:550d 4h 8m 22s 1/4(/dev/sda)= C. The machine details are: Ubuntu 11.10 Nagios core 3.2.3 Nagios plugins 1.4.15 Apache 2.2.20 Does anyone have any thoughts? Thanks, Mark -- claytoncapers.blogspot.com www.mark-clayton.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Bret_Cason at symantec.com Tue Jan 17 01:45:08 2012 From: Bret_Cason at symantec.com (Bret Cason) Date: Mon, 16 Jan 2012 16:45:08 -0800 Subject: [Nagiosplug-devel] Missing character in plugin output In-Reply-To: References: Message-ID: What does 'View Config' say for that service? After selecting the 'Check Command' for that service, you will see how the command is constructed. Maybe you need an additional $ARG2$ or something. The output is acting like ${HDTEMP} is (null). Best Regards. From: Mark Clayton [mailto:clayton256 at gmail.com] Sent: Monday, January 16, 2012 2:39 PM To: nagiosplug-devel at lists.sourceforge.net Subject: [Nagiosplug-devel] Missing character in plugin output I put together a bash script to use as a plugin. It is to monitor a hard drive temperature via hddtemp on a linux box. I based the script on check_log. The interesting bits are: HDTEMP=$(/user/sbin/hddtemp $DRIVE | awk '{ print $4}' | awk -F '?' '{ print $1}') /bin/echo "($DRIVE)=${HDTEMP} C." The command line output looks fine: root at little-harbor:/home/mark# /usr/lib/nagios/plugins/check_hddtemp -d /dev/sda (/dev/sda)=36 C. But Firefox and Safari show: Disk Temperature OK 2012-01-16 13:14:55 0d 4h 8m 22s 1/4 (/dev/sda)= C. The machine details are: Ubuntu 11.10 Nagios core 3.2.3 Nagios plugins 1.4.15 Apache 2.2.20 Does anyone have any thoughts? Thanks, Mark -- claytoncapers.blogspot.com www.mark-clayton.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From wferi at niif.hu Tue Jan 17 08:14:47 2012 From: wferi at niif.hu (Ferenc Wagner) Date: Tue, 17 Jan 2012 08:14:47 +0100 Subject: [Nagiosplug-devel] Missing character in plugin output In-Reply-To: (Mark Clayton's message of "Mon, 16 Jan 2012 17:38:43 -0500") References: Message-ID: <87wr8qby1k.fsf@tac.ki.iif.hu> Mark Clayton writes: > HDTEMP=$(/user/sbin/hddtemp $DRIVE | awk '{ print $4}' | awk -F '?' '{ print $1}') > > root at little-harbor:/home/mark# /usr/lib/nagios/plugins/check_hddtemp -d /dev/sda > (/dev/sda)=36 C. > > But Firefox and Safari show: > Disk Temperature > OK 2012-01-16 13:14:550d 4h 8m 22s 1/4(/dev/sda)= C. /usr/sbin/hddtemp probably requires elevated privileges, which it has when run from a root shell, but not when run by Nagios. You'll probably have to configure passwordless sudo from the nagios user to root or disk for this command. -- Regards, Feri. From clayton256 at gmail.com Tue Jan 17 13:59:57 2012 From: clayton256 at gmail.com (Mark Clayton) Date: Tue, 17 Jan 2012 07:59:57 -0500 Subject: [Nagiosplug-devel] Missing character in plugin output In-Reply-To: <87wr8qby1k.fsf@tac.ki.iif.hu> References: <87wr8qby1k.fsf@tac.ki.iif.hu> Message-ID: Bret & Feri, Oh how embarrassing.. You are both right. HDTEMP is (null) because hddtemp needs root privileges. I assumed I would be rusty after all these yeas but not so much to miss something this amateurish. Thank you for your help and forgive me. Blessings, Mark Clayton -- claytoncapers.blogspot.com www.mark-clayton.com On Tue, Jan 17, 2012 at 02:14, Ferenc Wagner wrote: > Mark Clayton writes: > > > HDTEMP=$(/user/sbin/hddtemp $DRIVE | awk '{ print $4}' | awk -F '?' > '{ print $1}') > > > > root at little-harbor:/home/mark# /usr/lib/nagios/plugins/check_hddtemp -d > /dev/sda > > (/dev/sda)=36 C. > > > > But Firefox and Safari show: > > Disk Temperature< > http://little-harbor.local/cgi-bin/nagios3/extinfo.cgi?type=2&host=localhost&service=Disk+Temperature > > > > OK 2012-01-16 13:14:550d 4h 8m 22s 1/4(/dev/sda)= C. > > /usr/sbin/hddtemp probably requires elevated privileges, which it has > when run from a root shell, but not when run by Nagios. You'll probably > have to configure passwordless sudo from the nagios user to root or disk > for this command. > -- > Regards, > Feri. > > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________________ > 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 adispi at compulab.co.il Wed Jan 18 15:36:42 2012 From: adispi at compulab.co.il (Adi Spivak) Date: Wed, 18 Jan 2012 16:36:42 +0200 Subject: [Nagiosplug-devel] check_ide_smart Message-ID: <0287b45f-7673-4bfe-98e8-e1a69ade0e0f@email.android.com> -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. Hi. I have 2 centos machines, running the same services and configurations. When i run the check_ide_smart on one it is seccessful, when i run on the second i get the error: check_ide_smart -d /dev/sda CRITICAL - SMART_ENABLE: Invalid argument CRITICAL - SMART_CMD_ENABLE Running smartctl shows that smart is enabled on this devise, trying to compare services and information between the two machines shows me no difference, even in drive size and maker. Can you help me debug this issue? Thanks you. -- Regards, *Adi Spivak* IT Manager 17 HaYetzira St, "Mordot HaCarmel" Industrial Park, Yokneam Elite Mail: P.O Box 687, Yokneam 20692. Israel TelFax.: (+972) 48-290-124. (+972) 48-290-100 www.fit-pc.com www.compulab.co.il