From noreply at sourceforge.net Thu Nov 8 19:32:30 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 08 Nov 2012 10:32:30 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3585441 ] snmp_check -C parsing error Message-ID: Bugs item #3585441, was opened at 2012-11-08 10:32 Message generated for change (Tracker Item Submitted) made by leandrotoledo You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3585441&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: Parsing problem Group: Release (specify) Status: Open Resolution: None Priority: 5 Private: No Submitted By: Leandro Toledo de Souza (leandrotoledo) Assigned to: Nobody/Anonymous (nobody) Summary: snmp_check -C parsing error Initial Comment: Hi there, I'm having some issues with release v1.4.16 when using check_snmp with -C arg. See above: - In check_snmp (nagios-plugins 1.4.16) v1.4.16: # ./check_snmp -C border -H 10.10.0.6 -o iso.3.6.1.2.1.2.2.1.9.3 -v /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] 10.10.0.6:161 iso.3.6.1.2.1.2.2.1.9.3 (Service Check Timed Out) - In check_snmp (nagios-plugins 1.3.1) v1.24.2.2: # ./check_snmp -C border -H 10.10.0.6 -o iso.3.6.1.2.1.2.2.1.9.3 -v /usr/bin/snmpget -t 1 -r 9 -m ALL -v 1 -c border 10.10.0.6:161 iso.3.6.1.2.1.2.2.1.9.3 RFC1213-MIB::ifLastChange.3 = Timeticks: (362154105) 41 days, 21:59:01.05 SNMP OK - Timeticks: (362154105) 41 days, 21:59:01.05 It seems that the -C (--community too) argument was not treated. OS/Arch: Linux nagios3teste 2.6.32-5-686 #1 SMP Sun Sep 23 09:49:36 UTC 2012 i686 GNU/Linux Compiler: gcc version 4.4.5 (Debian 4.4.5-8) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3585441&group_id=29880 From noreply at sourceforge.net Thu Nov 8 20:04:10 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 08 Nov 2012 11:04:10 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3585441 ] snmp_check -C parsing error Message-ID: Bugs item #3585441, was opened at 2012-11-08 10:32 Message generated for change (Comment added) made by leandrotoledo You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3585441&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: Parsing problem Group: Release (specify) Status: Open Resolution: None Priority: 5 Private: No Submitted By: Leandro Toledo de Souza (leandrotoledo) Assigned to: Nobody/Anonymous (nobody) Summary: snmp_check -C parsing error Initial Comment: Hi there, I'm having some issues with release v1.4.16 when using check_snmp with -C arg. See above: - In check_snmp (nagios-plugins 1.4.16) v1.4.16: # ./check_snmp -C border -H 10.10.0.6 -o iso.3.6.1.2.1.2.2.1.9.3 -v /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] 10.10.0.6:161 iso.3.6.1.2.1.2.2.1.9.3 (Service Check Timed Out) - In check_snmp (nagios-plugins 1.3.1) v1.24.2.2: # ./check_snmp -C border -H 10.10.0.6 -o iso.3.6.1.2.1.2.2.1.9.3 -v /usr/bin/snmpget -t 1 -r 9 -m ALL -v 1 -c border 10.10.0.6:161 iso.3.6.1.2.1.2.2.1.9.3 RFC1213-MIB::ifLastChange.3 = Timeticks: (362154105) 41 days, 21:59:01.05 SNMP OK - Timeticks: (362154105) 41 days, 21:59:01.05 It seems that the -C (--community too) argument was not treated. OS/Arch: Linux nagios3teste 2.6.32-5-686 #1 SMP Sun Sep 23 09:49:36 UTC 2012 i686 GNU/Linux Compiler: gcc version 4.4.5 (Debian 4.4.5-8) ---------------------------------------------------------------------- >Comment By: Leandro Toledo de Souza (leandrotoledo) Date: 2012-11-08 11:04 Message: After read the source I saw the verbose message above only show some args. Full command above (through pid info): /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 -c 200.196.193.25:161 iso.3.6.1.2.1.2.2.1.9.3 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3585441&group_id=29880 From noreply at sourceforge.net Fri Nov 9 09:29:00 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Fri, 09 Nov 2012 00:29:00 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3585441 ] snmp_check -C parsing error Message-ID: Bugs item #3585441, was opened at 2012-11-08 10:32 Message generated for change (Comment added) made by j-bern You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3585441&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: Parsing problem Group: Release (specify) Status: Open Resolution: None Priority: 5 Private: No Submitted By: Leandro Toledo de Souza (leandrotoledo) Assigned to: Nobody/Anonymous (nobody) Summary: snmp_check -C parsing error Initial Comment: Hi there, I'm having some issues with release v1.4.16 when using check_snmp with -C arg. See above: - In check_snmp (nagios-plugins 1.4.16) v1.4.16: # ./check_snmp -C border -H 10.10.0.6 -o iso.3.6.1.2.1.2.2.1.9.3 -v /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] 10.10.0.6:161 iso.3.6.1.2.1.2.2.1.9.3 (Service Check Timed Out) - In check_snmp (nagios-plugins 1.3.1) v1.24.2.2: # ./check_snmp -C border -H 10.10.0.6 -o iso.3.6.1.2.1.2.2.1.9.3 -v /usr/bin/snmpget -t 1 -r 9 -m ALL -v 1 -c border 10.10.0.6:161 iso.3.6.1.2.1.2.2.1.9.3 RFC1213-MIB::ifLastChange.3 = Timeticks: (362154105) 41 days, 21:59:01.05 SNMP OK - Timeticks: (362154105) 41 days, 21:59:01.05 It seems that the -C (--community too) argument was not treated. OS/Arch: Linux nagios3teste 2.6.32-5-686 #1 SMP Sun Sep 23 09:49:36 UTC 2012 i686 GNU/Linux Compiler: gcc version 4.4.5 (Debian 4.4.5-8) ---------------------------------------------------------------------- Comment By: J. Bern (j-bern) Date: 2012-11-09 00:29 Message: I can *not* confirm that this is a general problem with this plugin version ... [root at nagios ~]# nagios-plugins-1.4.16/plugins/check_snmp -C public -H $TARGET -o sysUpTime.0 -v /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] $TARGET:161 sysUpTime.0 DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1356951290) 157 days, 1:18:32.90 SNMP OK - Timeticks: (1356951290) 157 days, 1:18:32.90 | [root at nagios ~]# nagios-plugins-1.4.16/plugins/check_snmp -C wrong -H $TARGET -o sysUpTime.0 -v /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] $TARGET:161 sysUpTime.0 External command error: Timeout: No Response from $TARGET:161. The community being hidden in the command line (as "ps" sees it) is a safety mechanism of snmpget itself: [root at nagios ~]# nagios-plugins-1.4.16/plugins/check_snmp -C wrong -H $TARGET -o sysUpTime.0 -v & [...] [root at nagios ~]# ps auwwwwx | grep snmpget root 22907 0.0 0.1 4364 1856 pts/1 S 09:17 0:00 /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 -c $TARGET:161 sysUpTime.0 Source retrieved 28-Jun, md5sum is: 862f5e44fb5bc65ce7e5d86d654d4da0 nagios-plugins-1.4.16.tar.gz You might want to rerun the tests with numeric-only OIDs, to make sure that the timeout isn't due to the MIB file parsing. ---------------------------------------------------------------------- Comment By: Leandro Toledo de Souza (leandrotoledo) Date: 2012-11-08 11:04 Message: After read the source I saw the verbose message above only show some args. Full command above (through pid info): /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 -c 200.196.193.25:161 iso.3.6.1.2.1.2.2.1.9.3 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3585441&group_id=29880 From noreply at sourceforge.net Fri Nov 9 14:28:23 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Fri, 09 Nov 2012 05:28:23 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3585441 ] snmp_check -C parsing error Message-ID: Bugs item #3585441, was opened at 2012-11-08 10:32 Message generated for change (Comment added) made by leandrotoledo You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3585441&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: Parsing problem Group: Release (specify) Status: Open Resolution: None Priority: 5 Private: No Submitted By: Leandro Toledo de Souza (leandrotoledo) Assigned to: Nobody/Anonymous (nobody) Summary: snmp_check -C parsing error Initial Comment: Hi there, I'm having some issues with release v1.4.16 when using check_snmp with -C arg. See above: - In check_snmp (nagios-plugins 1.4.16) v1.4.16: # ./check_snmp -C border -H 10.10.0.6 -o iso.3.6.1.2.1.2.2.1.9.3 -v /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] 10.10.0.6:161 iso.3.6.1.2.1.2.2.1.9.3 (Service Check Timed Out) - In check_snmp (nagios-plugins 1.3.1) v1.24.2.2: # ./check_snmp -C border -H 10.10.0.6 -o iso.3.6.1.2.1.2.2.1.9.3 -v /usr/bin/snmpget -t 1 -r 9 -m ALL -v 1 -c border 10.10.0.6:161 iso.3.6.1.2.1.2.2.1.9.3 RFC1213-MIB::ifLastChange.3 = Timeticks: (362154105) 41 days, 21:59:01.05 SNMP OK - Timeticks: (362154105) 41 days, 21:59:01.05 It seems that the -C (--community too) argument was not treated. OS/Arch: Linux nagios3teste 2.6.32-5-686 #1 SMP Sun Sep 23 09:49:36 UTC 2012 i686 GNU/Linux Compiler: gcc version 4.4.5 (Debian 4.4.5-8) ---------------------------------------------------------------------- >Comment By: Leandro Toledo de Souza (leandrotoledo) Date: 2012-11-09 05:28 Message: # md5sum nagios-plugins-1.4.16.tar.gz 862f5e44fb5bc65ce7e5d86d654d4da0 nagios-plugins-1.4.16.tar.gz # ./check_snmp -P 2c -C border -H 10.10.0.6 -o sysUpTime.0 -v /usr/bin/snmpget -t 1 -r 5 -m ALL -v 2c [authpriv] 10.10.0.6:161 sysUpTime.0 command_line[0] /usr/bin/snmpget command_line[1] -t command_line[2] 1 command_line[3] -r command_line[4] 5 command_line[5] -m command_line[6] ALL command_line[7] -v command_line[8] 2c command_line[9] -c command_line[10] border command_line[11] 10.10.0.6:161 command_line[12] sysUpTime.0 After read the code (i'm not a dev), I changed a little bit to see more output, and I noticed that the community arg (command_line[10]) is filled of blank spaces with the same lenght of string. ---------------------------------------------------------------------- Comment By: J. Bern (j-bern) Date: 2012-11-09 00:29 Message: I can *not* confirm that this is a general problem with this plugin version ... [root at nagios ~]# nagios-plugins-1.4.16/plugins/check_snmp -C public -H $TARGET -o sysUpTime.0 -v /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] $TARGET:161 sysUpTime.0 DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1356951290) 157 days, 1:18:32.90 SNMP OK - Timeticks: (1356951290) 157 days, 1:18:32.90 | [root at nagios ~]# nagios-plugins-1.4.16/plugins/check_snmp -C wrong -H $TARGET -o sysUpTime.0 -v /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] $TARGET:161 sysUpTime.0 External command error: Timeout: No Response from $TARGET:161. The community being hidden in the command line (as "ps" sees it) is a safety mechanism of snmpget itself: [root at nagios ~]# nagios-plugins-1.4.16/plugins/check_snmp -C wrong -H $TARGET -o sysUpTime.0 -v & [...] [root at nagios ~]# ps auwwwwx | grep snmpget root 22907 0.0 0.1 4364 1856 pts/1 S 09:17 0:00 /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 -c $TARGET:161 sysUpTime.0 Source retrieved 28-Jun, md5sum is: 862f5e44fb5bc65ce7e5d86d654d4da0 nagios-plugins-1.4.16.tar.gz You might want to rerun the tests with numeric-only OIDs, to make sure that the timeout isn't due to the MIB file parsing. ---------------------------------------------------------------------- Comment By: Leandro Toledo de Souza (leandrotoledo) Date: 2012-11-08 11:04 Message: After read the source I saw the verbose message above only show some args. Full command above (through pid info): /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 -c 200.196.193.25:161 iso.3.6.1.2.1.2.2.1.9.3 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3585441&group_id=29880 From jaminbecker at gmail.com Fri Nov 9 15:44:08 2012 From: jaminbecker at gmail.com (Jamin Becker) Date: Fri, 9 Nov 2012 09:44:08 -0500 Subject: [Nagiosplug-devel] Plugin Wrapper written in python Message-ID: The other day I wrote a sort of wrapper that uses Nagios' check_icmp plugin to monitor several nodes on our network. If any one of the nodes down it returns a value of 1 (WARNING), if two or more nodes go down it returns a value of 2 (CRITICAL). Unfortunately, even if it is critical it still shows up as Ok...even though I know it is returning a value of 2. The plugin is written in python. #!/usr/bin/env python import os import subprocess home="/usr/lib/nagios/plugins" def checkNodes(): up = 0 aProblemsDetected=0 bProblemsDetected=0 cProblemsDetected=0 status=0 message=" - " TEST_OK=0 TEST_WARNING=1 TEST_CRITICAL=2 TEST_UKNOWN=3 try: cloud_alpha_status=subprocess.check_output(home+"/check_icmp -H cloud-alpha ",shell=True) if "OK" in cloud_alpha_status: ++up else: message=message+ "Cloud Bravo does not seem to be reachable. " aProblemsDetected=1 except: message=message+"Node (Cloud-Alpha) is either down or unreachable. " aProblemsDetected=1 try: cloud_bravo_status=subprocess.check_output(home+"/check_icmp -H cloud-bravo",shell=True) if "OK" in cloud_bravo_status: ++up else: print cloud_bravo_status message=message+"Cloud Bravo does not seem to be reachable. " bProblemsDetected=1 except: message=message+"Node (Cloud-Bravo) is either down or unreachable. " bProblemsDetected=1 try: cloud_charlie_status=subprocess.check_output(home+"/check_icmp -H cloud-charlie",shell=True) if "OK" in cloud_charlie_status: ++up else: print cloud_charlie_status message=message+"Cloud Charlie does not seem to be reachable. " cProblemsDetected=1 except: print "Node (Cloud-Charlie) is either down or unreachable. " cProblemsDetected=1 if aProblemsDetected+bProblemsDetected+cProblemsDetected==0: status=TEST_OK message=message+"CLUSTER IS UP! -- Cloud-Alpha up -- Cloud-Bravo up -- Cloud-Charlie up" code='OK' if aProblemsDetected+bProblemsDetected+cProblemsDetected==1: status=TEST_WARNING code='WARNING' message="Errors Detected:"+message elif aProblemsDetected+bProblemsDetected+cProblemsDetected>1: status=TEST_CRITICAL message="Many Errors Detected"+message code='CRITICAL' return status,(code+' '+message) print checkNodes() -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at sourceforge.net Sun Nov 11 13:27:08 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Sun, 11 Nov 2012 04:27:08 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3586201 ] Nagios check_snmp not displaying enumeration values Message-ID: Bugs item #3586201, was opened at 2012-11-11 04:27 Message generated for change (Tracker Item Submitted) made by tomwong321456 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3586201&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: tom_wong (tomwong321456) Assigned to: Nobody/Anonymous (nobody) Summary: Nagios check_snmp not displaying enumeration values Initial Comment: Hi, when I create a service to check_snmp values, if the snmp agent returns a enumeration value with the following declaration rttState OBJECT-TYPE SYNTAX INTEGER { unknown(0), running(1), stopped(2) } MAX-ACCESS read-only STATUS current DESCRIPTION "The currently configured status of an instance." ::= { rttEntry 3 } if the command doesn't include a warning or critical threshold, ./check_snmp -p 161 -H 10.36.0.50 -o enterprises.40312.1.1.1.3.1 -C public -P 2c -l "rttState-Instance1" -m /usr/share/snmp/mibs/RTT-MIB.txt the check_snmp command returns rttState-Instance1 OK - running(1) | However, if the warning or critical threshold is declared, such as ./check_snmp -p 161 -H 10.36.0.50 -o enterprises.40312.1.1.1.3.1 -C public -P 2c -l "rttState-Instance1" -m /usr/share/snmp/mibs/RTT-MIB.txt -w 1:2 it would return rttState-Instance1 OK - 1 | RTT-MIB::rttState.1=1 It doesn't display the enumerated value. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3586201&group_id=29880 From joram.agten at gmail.com Mon Nov 12 09:15:19 2012 From: joram.agten at gmail.com (Joram Agten) Date: Mon, 12 Nov 2012 09:15:19 +0100 Subject: [Nagiosplug-devel] Plugin Wrapper written in python In-Reply-To: References: Message-ID: the last lines of your python program should contain something like status_code, message = checkNodes() # print message to stdout print(message) # end process with correct exit status sys.exit(status_code) On Fri, Nov 9, 2012 at 3:44 PM, Jamin Becker wrote: > The other day I wrote a sort of wrapper that uses Nagios' check_icmp > plugin to monitor several nodes on our network. If any one of the nodes > down it returns a value of 1 (WARNING), if two or more nodes go down it > returns a value of 2 (CRITICAL). > > Unfortunately, even if it is critical it still shows up as Ok...even > though I know it is returning a value of 2. The plugin is written in > python. > > #!/usr/bin/env python > import os > import subprocess > home="/usr/lib/nagios/plugins" > > def checkNodes(): > up = 0 > aProblemsDetected=0 > bProblemsDetected=0 > cProblemsDetected=0 > status=0 > message=" - " > TEST_OK=0 > TEST_WARNING=1 > TEST_CRITICAL=2 > TEST_UKNOWN=3 > try: > > cloud_alpha_status=subprocess.check_output(home+"/check_icmp -H cloud-alpha > ",shell=True) > if "OK" in cloud_alpha_status: > ++up > > else: > message=message+ "Cloud Bravo does not seem to be > reachable. " > aProblemsDetected=1 > > except: > message=message+"Node (Cloud-Alpha) is either down or > unreachable. " > aProblemsDetected=1 > try: > > cloud_bravo_status=subprocess.check_output(home+"/check_icmp -H > cloud-bravo",shell=True) > if "OK" in cloud_bravo_status: > ++up > else: > print cloud_bravo_status > message=message+"Cloud Bravo does not seem to be > reachable. " > bProblemsDetected=1 > except: > message=message+"Node (Cloud-Bravo) is either down or > unreachable. " > bProblemsDetected=1 > try: > > cloud_charlie_status=subprocess.check_output(home+"/check_icmp -H > cloud-charlie",shell=True) > if "OK" in cloud_charlie_status: > ++up > else: > print cloud_charlie_status > message=message+"Cloud Charlie does not seem to be > reachable. " > cProblemsDetected=1 > except: > print "Node (Cloud-Charlie) is either down or unreachable. > " > cProblemsDetected=1 > > if aProblemsDetected+bProblemsDetected+cProblemsDetected==0: > status=TEST_OK > message=message+"CLUSTER IS UP! -- Cloud-Alpha up -- > Cloud-Bravo up -- Cloud-Charlie up" > code='OK' > if aProblemsDetected+bProblemsDetected+cProblemsDetected==1: > status=TEST_WARNING > code='WARNING' > message="Errors Detected:"+message > elif aProblemsDetected+bProblemsDetected+cProblemsDetected>1: > status=TEST_CRITICAL > message="Many Errors Detected"+message > code='CRITICAL' > return status,(code+' '+message) > > print checkNodes() > > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_nov > _______________________________________________________ > 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 noreply at sourceforge.net Mon Nov 12 09:34:06 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 12 Nov 2012 00:34:06 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Feature Requests-3586320 ] check_dig should have -4 and -6 options Message-ID: Feature Requests item #3586320, was opened at 2012-11-12 00:34 Message generated for change (Tracker Item Submitted) made by bortz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397600&aid=3586320&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 Priority: 5 Private: No Submitted By: Stephane Bortzmeyer (bortz) Assigned to: Nobody/Anonymous (nobody) Summary: check_dig should have -4 and -6 options Initial Comment: Unlike most plugins, check_dig offers no way to test IPv4 and Ipv6 specifically. check_dig v1.4.16 (nagios-plugins 1.4.16) [I did not indicate OS or architecture because the problem is independent of them.] ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397600&aid=3586320&group_id=29880 From noreply at sourceforge.net Mon Nov 12 19:49:56 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 12 Nov 2012 10:49:56 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3585441 ] snmp_check -C parsing error Message-ID: Bugs item #3585441, was opened at 2012-11-08 10:32 Message generated for change (Comment added) made by leandrotoledo You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3585441&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: Parsing problem Group: Release (specify) >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Leandro Toledo de Souza (leandrotoledo) Assigned to: Nobody/Anonymous (nobody) Summary: snmp_check -C parsing error Initial Comment: Hi there, I'm having some issues with release v1.4.16 when using check_snmp with -C arg. See above: - In check_snmp (nagios-plugins 1.4.16) v1.4.16: # ./check_snmp -C border -H 10.10.0.6 -o iso.3.6.1.2.1.2.2.1.9.3 -v /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] 10.10.0.6:161 iso.3.6.1.2.1.2.2.1.9.3 (Service Check Timed Out) - In check_snmp (nagios-plugins 1.3.1) v1.24.2.2: # ./check_snmp -C border -H 10.10.0.6 -o iso.3.6.1.2.1.2.2.1.9.3 -v /usr/bin/snmpget -t 1 -r 9 -m ALL -v 1 -c border 10.10.0.6:161 iso.3.6.1.2.1.2.2.1.9.3 RFC1213-MIB::ifLastChange.3 = Timeticks: (362154105) 41 days, 21:59:01.05 SNMP OK - Timeticks: (362154105) 41 days, 21:59:01.05 It seems that the -C (--community too) argument was not treated. OS/Arch: Linux nagios3teste 2.6.32-5-686 #1 SMP Sun Sep 23 09:49:36 UTC 2012 i686 GNU/Linux Compiler: gcc version 4.4.5 (Debian 4.4.5-8) ---------------------------------------------------------------------- >Comment By: Leandro Toledo de Souza (leandrotoledo) Date: 2012-11-12 10:49 Message: Sorry guys, my bad. Solved when installed snmp-mibs-downloader. Thanks @j-bern for the help. ---------------------------------------------------------------------- Comment By: Leandro Toledo de Souza (leandrotoledo) Date: 2012-11-09 05:28 Message: # md5sum nagios-plugins-1.4.16.tar.gz 862f5e44fb5bc65ce7e5d86d654d4da0 nagios-plugins-1.4.16.tar.gz # ./check_snmp -P 2c -C border -H 10.10.0.6 -o sysUpTime.0 -v /usr/bin/snmpget -t 1 -r 5 -m ALL -v 2c [authpriv] 10.10.0.6:161 sysUpTime.0 command_line[0] /usr/bin/snmpget command_line[1] -t command_line[2] 1 command_line[3] -r command_line[4] 5 command_line[5] -m command_line[6] ALL command_line[7] -v command_line[8] 2c command_line[9] -c command_line[10] border command_line[11] 10.10.0.6:161 command_line[12] sysUpTime.0 After read the code (i'm not a dev), I changed a little bit to see more output, and I noticed that the community arg (command_line[10]) is filled of blank spaces with the same lenght of string. ---------------------------------------------------------------------- Comment By: J. Bern (j-bern) Date: 2012-11-09 00:29 Message: I can *not* confirm that this is a general problem with this plugin version ... [root at nagios ~]# nagios-plugins-1.4.16/plugins/check_snmp -C public -H $TARGET -o sysUpTime.0 -v /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] $TARGET:161 sysUpTime.0 DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1356951290) 157 days, 1:18:32.90 SNMP OK - Timeticks: (1356951290) 157 days, 1:18:32.90 | [root at nagios ~]# nagios-plugins-1.4.16/plugins/check_snmp -C wrong -H $TARGET -o sysUpTime.0 -v /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 [authpriv] $TARGET:161 sysUpTime.0 External command error: Timeout: No Response from $TARGET:161. The community being hidden in the command line (as "ps" sees it) is a safety mechanism of snmpget itself: [root at nagios ~]# nagios-plugins-1.4.16/plugins/check_snmp -C wrong -H $TARGET -o sysUpTime.0 -v & [...] [root at nagios ~]# ps auwwwwx | grep snmpget root 22907 0.0 0.1 4364 1856 pts/1 S 09:17 0:00 /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 -c $TARGET:161 sysUpTime.0 Source retrieved 28-Jun, md5sum is: 862f5e44fb5bc65ce7e5d86d654d4da0 nagios-plugins-1.4.16.tar.gz You might want to rerun the tests with numeric-only OIDs, to make sure that the timeout isn't due to the MIB file parsing. ---------------------------------------------------------------------- Comment By: Leandro Toledo de Souza (leandrotoledo) Date: 2012-11-08 11:04 Message: After read the source I saw the verbose message above only show some args. Full command above (through pid info): /usr/bin/snmpget -t 1 -r 5 -m ALL -v 1 -c 200.196.193.25:161 iso.3.6.1.2.1.2.2.1.9.3 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3585441&group_id=29880 From dejan at hello-penguin.com Wed Nov 14 18:17:07 2012 From: dejan at hello-penguin.com (Dejan Muhamedagic) Date: Wed, 14 Nov 2012 18:17:07 +0100 Subject: [Nagiosplug-devel] nagios plugins in a cluster Message-ID: <20121114171706.GA18737@walrus.homenet> Hello, I'm involved in several open source projects for HA clustering (pacemaker, corosync, linux-ha). We're looking into using nagios plugins for monitoring of cluster managed resources. To make that possible it is necessary for a plugin to be able to print its documentation as structured document (aka XML). Content-wise, it is more or less like what --help produces, just with XML scaffolding. The way I wanted to deal with this is fairly straightforward, i.e. with a static array of options which includes all help text and from which one can then produce either the --help text (as it is now) or an XML document. I'd probably put together some custom text processing code to convert the --help output into C code. Would that be acceptable for inclusion in the nagios plugins project? Cheers, Dejan From noreply at sourceforge.net Wed Nov 14 21:08:01 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 14 Nov 2012 12:08:01 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1614552 ] no perf-data check_procs Message-ID: Patches item #1614552, was opened at 2006-12-12 23:14 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1614552&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: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: FliTTi (flitti) Assigned to: Nobody/Anonymous (nobody) Summary: no perf-data check_procs Initial Comment: The plugincheck_procs doens't return perfdata. This patch will enable perf data. Please put it into the next release. Best regards, FliTTi ---------------------------------------------------------------------- >Comment By: Holger Weiss (hweiss) Date: 2012-11-14 12:08 Message: In the next release, the check_procs plugin will provide performance data. ---------------------------------------------------------------------- Comment By: Peter Mansvelder (pmansvelder) Date: 2011-10-01 01:45 Message: I agree with the intention of this patch, I find myself constantly patching the source of check_procs.c whenever I add a new nagios installation, although my patch consisted only of a single line (printf (" | procs=%d",procs);) without any of the other parameters. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1614552&group_id=29880 From noreply at sourceforge.net Wed Nov 14 21:08:14 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 14 Nov 2012 12:08:14 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1106840 ] Enables performance data on check_procs Message-ID: Patches item #1106840, was opened at 2005-01-21 09:12 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1106840&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: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Paulo Fessel (paulo_fessel) Assigned to: Nobody/Anonymous (nobody) Summary: Enables performance data on check_procs Initial Comment: This a patch that implements performance counters for check_procs. When run without metrics specified, it can check against warning and critical thresholds of the absolute number of processes. When the option "--metric=VARIABLE" is specified, it will show 3 performance counters: the number of process for which the counter is in "OK", "WARNING" and "CRITICAL" states. Again, tested on linux and AIX. ---------------------------------------------------------------------- >Comment By: Holger Weiss (hweiss) Date: 2012-11-14 12:08 Message: In the next release, the check_procs plugin will provide performance data. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1106840&group_id=29880 From noreply at sourceforge.net Wed Nov 14 21:08:36 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 14 Nov 2012 12:08:36 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Feature Requests-2458521 ] Add performance data to check_procs plugin Message-ID: Feature Requests item #2458521, was opened at 2008-12-22 05:10 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397600&aid=2458521&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: Closed Priority: 5 Private: No Submitted By: Jan Ondrej (ondrejj) Assigned to: Nobody/Anonymous (nobody) Summary: Add performance data to check_procs plugin Initial Comment: check_procs plugin has no performance data. It can be nice to display performance data for number of processes or zombie processes. I have my own perfdata wrapper until this will be a part of nagios-plugins, but my wrapper has very limited functionality. You only need to display this at end of line from check_plugin: |procs=NUMBER_OF_PROCS;WARN_PROC_COUNT;CRITICAL_PROC_COUNT;0 Attaching my wrapper, which does this, but it's not a right way. :) ---------------------------------------------------------------------- >Comment By: Holger Weiss (hweiss) Date: 2012-11-14 12:08 Message: In the next release, the check_procs plugin will provide performance data. ---------------------------------------------------------------------- Comment By: Paul M. Dubuc (dubuc) Date: 2012-08-14 14:15 Message: Please consider patching with this enhanced version from nagios exchange: http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_procs_perf/details ---------------------------------------------------------------------- Comment By: J.M. Roth (jmroth) Date: 2011-01-27 04:37 Message: Please forget my previous patch. I see there are several patches already listed: ID# 2918676 1106840 1396989 The oldest one is from 2005 :-\ Additionally, here is my current one against 1.4.15 --- check_procs-old.c 2010-07-27 22:47:16.000000000 +0200 +++ check_procs.c 2011-01-27 13:34:19.000000000 +0100 @@ -301,6 +301,35 @@ if ( verbose >= 1 && strcmp(fails,"") ) printf (" [%s]", fails); + printf ("|procs=%d", procs); + if (wmin == -1) { + if (wmax == -1) { + printf (";"); + } else { + printf (";:%d", wmax); + } + } else { + if (wmax == -1) { + printf (";%d:", wmin); + } else { + printf (";%d:%d", wmin, wmax); + } + } + if (cmin == -1) { + if (cmax == -1) { + printf (";"); + } else { + printf (";:%d", cmax); + } + } else { + if (cmax == -1) { + printf (";%d:", cmin); + } else { + printf (";%d:%d", cmin, cmax); + } + } + printf (";1"); + printf ("\n"); return result; } ---------------------------------------------------------------------- Comment By: J.M. Roth (jmroth) Date: 2011-01-27 01:07 Message: here's a diff to add performance data to check_procs.c --- check_procs-old.c 2010-07-27 22:47:16.000000000 +0200 +++ check_procs.c 2011-01-27 10:02:08.000000000 +0100 @@ -301,6 +301,7 @@ if ( verbose >= 1 && strcmp(fails,"") ) printf (" [%s]", fails); + printf ("|procs=%d;%d;%d;%d:%d;%d:%d", procs, warn, crit, wmin, wmax, cmin, cmax); printf ("\n"); return result; } ---------------------------------------------------------------------- Comment By: GreenRover (greenrover) Date: 2009-03-06 05:09 Message: Her as the original check_procs.c /root/nagios-plugins-1.4.13/plugins/check_procs.c row 308 befor " printf ("\n");" add: printf (" | "); printf (ngettext ("process=%d", "processes=%d", (unsigned long) procs), procs); printf (";%d;%d", wmax, cmax); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397600&aid=2458521&group_id=29880 From noreply at sourceforge.net Wed Nov 14 21:08:53 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 14 Nov 2012 12:08:53 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-1396989 ] patch to output performance data in check_procs Message-ID: Patches item #1396989, was opened at 2006-01-04 08:13 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1396989&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: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Florian Gleixner (redflo) Assigned to: Nobody/Anonymous (nobody) Summary: patch to output performance data in check_procs Initial Comment: Adds performance data. ---------------------------------------------------------------------- >Comment By: Holger Weiss (hweiss) Date: 2012-11-14 12:08 Message: In the next release, the check_procs plugin will provide performance data. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1396989&group_id=29880 From noreply at sourceforge.net Wed Nov 14 21:10:05 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 14 Nov 2012 12:10:05 -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 (Comment added) made by hweiss 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: Closed >Resolution: Fixed 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 ---------------------------------------------------------------------- >Comment By: Holger Weiss (hweiss) Date: 2012-11-14 12:10 Message: In the next release, the check_procs plugin will provide performance data. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=3451435&group_id=29880 From noreply at sourceforge.net Wed Nov 14 21:10:24 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 14 Nov 2012 12:10:24 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Patches-2918676 ] This patch adds performance data to check_procs program. Message-ID: Patches item #2918676, was opened at 2009-12-21 05:32 Message generated for change (Comment added) made by hweiss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=2918676&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.14 >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: tayfun () Assigned to: Nobody/Anonymous (nobody) Summary: This patch adds performance data to check_procs program. Initial Comment: I have simply added some print statements to the end so that number of processes are seen according to the performance data format. It also makes sure that it uses a dash, and not a colon while printing these. ---------------------------------------------------------------------- >Comment By: Holger Weiss (hweiss) Date: 2012-11-14 12:10 Message: In the next release, the check_procs plugin will provide performance data. ---------------------------------------------------------------------- Comment By: tayfun () Date: 2009-12-21 05:55 Message: Apparently I created a reverse patch. I just added the correct direction now. Just do a $ patch plugins/check_procs.c plugins/check_procs.c.patch --verbose for the patch to work, from the nagios-plugins directory. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397599&aid=2918676&group_id=29880 From william at leibzon.org Mon Nov 19 18:41:37 2012 From: william at leibzon.org (William Leibzon) Date: Mon, 19 Nov 2012 09:41:37 -0800 Subject: [Nagiosplug-devel] need testers for latest check_netint (especially those using --cisco and --STP options) Message-ID: Hi guys and gals, I need some testers for newest version of check_netint.pl (previously known as check_snmp_netint and originally check_smp_int) since I made a bunch of code updates this weekend. And I'm running cloud environment and can not quickly test --cisco and --stp options. If you're using this plugin with cisco switches and using these options, please get the latest dev (2.4a8) and see if it works as before: https://github.com/willixix/WL-NagiosPlugins/blob/dev/check_netint.pl Also those who've been pitching me to support 48+ port switches with one check, I added --bulk_snmp_queries option. You can test if that made things faster. I'm actually not sure if it would, because the plugin does does not do get_next on a tree which is what bulk query is supposed to speed up. Lastly this plugin now supports checking interfaces on a local linux machine instead of just SNNP. Feel free to test this as well. And if you are using FreeBSD or Solaris or some other unix, please consider helping out with a code to support your platform. Send all comments/issues/reports to my private email. Thanks, William -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at sourceforge.net Tue Nov 20 16:58:45 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 20 Nov 2012 07:58:45 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3588761 ] Buffer overrun with -u option by check_snmp. Message-ID: Bugs item #3588761, was opened at 2012-11-20 07:58 Message generated for change (Tracker Item Submitted) made by one6f You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3588761&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: one6f (one6f) Assigned to: Nobody/Anonymous (nobody) Summary: Buffer overrun with -u option by check_snmp. Initial Comment: Plugin Version (-V output): rested with check_snmp v1.4.16 (nagios-plugins 1.4.16) and v1.4.15 Plugin Name: check_snmp Plugin Commandline showing issues: ./check_snmp -H 10.31.17.180 -C public -o "ifOperStatus.1,ifOperStatus.17,ifOperStatus.18,ifOperStatus.21,ifOperStatus.29" -u "port_1","port_17","port_18","port_21","port_29" ?? OK - up(1) port_1 up(1) port_17 up(1) port_18 up(1) port_21 up(1) port_29 | If I leave out the last unit, "port_29", it shows SNMP OK Operating System:Ubuntu 10.04 LTS Architecture: 64bit Compiler: tested with apt-get install or self compiled with gcc ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3588761&group_id=29880 From noreply at sourceforge.net Tue Nov 20 17:14:42 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 20 Nov 2012 08:14:42 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3588761 ] Buffer overrun with -u option by check_snmp. Message-ID: Bugs item #3588761, was opened at 2012-11-20 07:58 Message generated for change (Comment added) made by j-bern You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3588761&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: one6f (one6f) Assigned to: Nobody/Anonymous (nobody) Summary: Buffer overrun with -u option by check_snmp. Initial Comment: Plugin Version (-V output): rested with check_snmp v1.4.16 (nagios-plugins 1.4.16) and v1.4.15 Plugin Name: check_snmp Plugin Commandline showing issues: ./check_snmp -H 10.31.17.180 -C public -o "ifOperStatus.1,ifOperStatus.17,ifOperStatus.18,ifOperStatus.21,ifOperStatus.29" -u "port_1","port_17","port_18","port_21","port_29" ?? OK - up(1) port_1 up(1) port_17 up(1) port_18 up(1) port_21 up(1) port_29 | If I leave out the last unit, "port_29", it shows SNMP OK Operating System:Ubuntu 10.04 LTS Architecture: 64bit Compiler: tested with apt-get install or self compiled with gcc ---------------------------------------------------------------------- Comment By: J. Bern (j-bern) Date: 2012-11-20 08:14 Message: Additional information: -- Bug confirmed to exist in 1.4.14, 1.4.15 and 1.4.16 (from source on a CentOS 5.5 machine) -- apparently triggered by number of units provided (must be five or more) -- probably *not* related: Note difference in second "if" expression: # grep -n -A 2 'realloc (unitv' nagios-plugins-1.4.16/plugins/check_snmp.c 779: unitv = realloc (unitv, unitv_size); 780- if (unitv == NULL) 781- die (STATE_UNKNOWN, _("Could not reallocate units [%d]\n"), (int)nunits); -- 791: unitv = realloc (unitv, unitv_size); 792- if (units == NULL) 793- die (STATE_UNKNOWN, _("Could not realloc() units\n")); # UNITS="port_1,port_17,port_18,port_21,port_29,port_4711,port_grr" # nagios-plugins-1.4.16/plugins/check_snmp $AUTH -o "$OIDS" -u "$UNITS" | hexdump -C | head -2 00000000 db 5b b1 bf e3 5b b1 bf ed 5b b1 bf 11 20 4f 4b |.[...[...[... OK| 00000010 20 2d 20 75 70 28 31 29 20 70 6f 72 74 5f 31 20 | - up(1) port_1 | ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3588761&group_id=29880 From andreas.a.lamprecht at atos.net Wed Nov 21 14:20:33 2012 From: andreas.a.lamprecht at atos.net (Lamprecht, Andreas) Date: Wed, 21 Nov 2012 13:20:33 +0000 Subject: [Nagiosplug-devel] check_http, redirects and expect Message-ID: Helo! We recently ran into problems with check_http. One of our checked webapps redirects to another website and that redirected page sends back a stupid, but correct result code of 494. The command we run looks ike this: check_http -p 8080 -c 30 -I ServerIP -u "URL" -f follow -e '302,494' However, the check always returns OK, even if the redirected page returns a different error code. It seems check_http is not following redirects when "-e" is used. This is because of that "if" statement in line 996 . This completely disables the checking for a possible redirection. 994 /* Bypass normal status line check if server_expect was set by user and not default */ 995 /* NOTE: After this if/else block msg *MUST* be an asprintf-allocated string */ 996 if ( server_expect_yn ) { 997 asprintf (&msg, 998 _("Status line output matched \"%s\" - "), server_expect); 999 if (verbose) 1000 printf ("%s\n",msg); 1001 } 1002 else { .... 1028 /* check redirected page if specified */ 1029 else if (http_status >= 300) { 1030 1031 if (onredirect == STATE_DEPENDENT) 1032 redir (header, status_line); 1033 else 1034 result = max_state_alt(onredirect, result); 1035 asprintf (&msg, _("%s - "), status_line); 1036 } /* end if (http_status >= 300) */ 1037 else { i could "fix" this behaviour by simply disabling the "if" in line 996 by adding a " && 0" to the if: 996 if ( server_expect_yn && 0 ) { That works for the moment, but now check_http finishes with a WARNING state because the status-code is greater than 400. To fix this, too, i had to change the stauts-code logic to include a check for the expected status code. And since this resulted into a segfault, i had to extend the "if" even further. The result is this: 1006 /* server errors result in a critical state */ 1007 else if (http_status >= 500 && http_status < 600 && ! expected_statuscode (status_line, server_expect) ) { 1008 asprintf (&msg, _("%s - "), status_line); 1009 result = STATE_CRITICAL; 1010 } 1011 /* client errors result in a warning state */ 1012 else if (http_status >= 400 && http_status < 500 && ! expected_statuscode (status_line, server_expect) ) { 1013 asprintf (&msg, _("%s - "), status_line); 1014 result = max_state_alt(STATE_WARNING, result); 1015 } 1016 /* check redirected page if specified */ 1017 else if (http_status >= 300 && http_status < 400 ) { This seems to work now. I am sure that could be done in a more elegant way and i am willing to invest more time in coding a better fix but first of all i would like to check with you guys if such a change in the behaviour of check_http would be acceptable. Greetings Andreas Lamprecht -------------- next part -------------- An HTML attachment was scrubbed... URL: From noreply at sourceforge.net Wed Nov 21 21:06:58 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 21 Nov 2012 12:06:58 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3588978 ] check_http "-L" output doesn't print closing anchor tag Message-ID: Bugs item #3588978, was opened at 2012-11-21 12:06 Message generated for change (Tracker Item Submitted) made by drawks You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3588978&group_id=29880 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General plugin execution Group: release-1.4.15 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Dave Rawks (drawks) Assigned to: Nobody/Anonymous (nobody) Summary: check_http "-L" output doesn't print closing anchor tag Initial Comment: Whe calling check_http if the result is a timeout or unable to open socket the closing anchor tag is not printed. This results in display corruption in the nagios web ui. $/usr/lib/nagios/plugins/check_http -H bogus -u /index.html -t 30 -L Name or service not known HTTP CRITICAL - Unable to open TCP socket ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3588978&group_id=29880 From noreply at sourceforge.net Fri Nov 23 14:03:10 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Fri, 23 Nov 2012 05:03:10 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Feature Requests-3589394 ] enable deploying nagios plugins in pacemaker clusters Message-ID: Feature Requests item #3589394, was opened at 2012-11-23 05:03 Message generated for change (Tracker Item Submitted) made by dmuhamedagic You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397600&aid=3589394&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 Priority: 5 Private: No Submitted By: Dejan Muhamedagic (dmuhamedagic) Assigned to: Nobody/Anonymous (nobody) Summary: enable deploying nagios plugins in pacemaker clusters Initial Comment: In order to be able to use a nagios plugin in the pacemaker cluster, it must be able to produce so-called meta-data, i.e. documentation as XML structured document. Content-wise, it is more or less like what --help produces, just with XML scaffolding. These patches add support for printing both help page and the XML meta-data from the same source (a set of C structs). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397600&aid=3589394&group_id=29880 From noreply at sourceforge.net Fri Nov 23 14:06:16 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Fri, 23 Nov 2012 05:06:16 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Feature Requests-3589394 ] enable deploying nagios plugins in pacemaker clusters Message-ID: Feature Requests item #3589394, was opened at 2012-11-23 05:03 Message generated for change (Comment added) made by dmuhamedagic You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397600&aid=3589394&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 Priority: 5 Private: No Submitted By: Dejan Muhamedagic (dmuhamedagic) Assigned to: Nobody/Anonymous (nobody) Summary: enable deploying nagios plugins in pacemaker clusters Initial Comment: In order to be able to use a nagios plugin in the pacemaker cluster, it must be able to produce so-called meta-data, i.e. documentation as XML structured document. Content-wise, it is more or less like what --help produces, just with XML scaffolding. These patches add support for printing both help page and the XML meta-data from the same source (a set of C structs). ---------------------------------------------------------------------- Comment By: Dejan Muhamedagic (dmuhamedagic) Date: 2012-11-23 05:06 Message: A set of patches similar to the one for check_http would follow. The .po files will have to be edited in part too. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397600&aid=3589394&group_id=29880 From noreply at sourceforge.net Tue Nov 27 15:44:47 2012 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 27 Nov 2012 06:44:47 -0800 Subject: [Nagiosplug-devel] [ nagiosplug-Bugs-3590374 ] check_disk: inconsistency when given device file as -p Message-ID: Bugs item #3590374, was opened at 2012-11-27 06:44 Message generated for change (Tracker Item Submitted) made by jmeurer You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3590374&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: Jonas Meurer (jmeurer) Assigned to: Nobody/Anonymous (nobody) Summary: check_disk: inconsistency when given device file as -p Initial Comment: Hello, I observed a inconstency in check_disk plugin when device files are given as argument to option -p: On recent linux system fstab and mtab often list symlinks like '/dev/disk/by-uuid/...' as device path. The nagios plugin check_disk supports only the exact same device name as given in fstab (and listed in mtab) as argument to -p. If you give a device path like '/dev/sda1' instead of the one from fstab, the argument is not treated as device path, but instead as path to a file on mountpoint '/dev'. This should be fixed, best by using libblkid. In Debian/Squeeze: # mount [...] /dev/sda1 on / type ext4 (rw,errors=remount-ro) udev on /dev type tmpfs (rw,mode=0755) # /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p / DISK OK - free space: / 68787 MB (85% inode=99%);| /=11402MB;67585;76033;0;84482 # /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sda1 DISK OK - free space: / 68787 MB (85% inode=99%);| /=11402MB;67585;76033;0;84482 # /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev DISK OK - free space: /dev 36312 MB (99% inode=99%);| /dev=0MB;29049;32680;0;36312 in Debian/Wheezy (another system): # mount [...] /dev/disk/by-uuid/********** on / type ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered) udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=3090668,mode=755) # /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p / DISK CRITICAL - free space: / 16313 MB (7% inode=99%);| /=200808MB;182992;205866;0;228741 # /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sda1 DISK OK - free space: /dev 10 MB (100% inode=99%);| /dev=0MB;8;9;0;10 # /usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev DISK OK - free space: /dev 10 MB (100% inode=99%);| /dev=0MB;8;9;0;10 I verified that the same nagiosplugins 1.4.15 source was compiled on both systems. Only difference is the underlying Debian release. I guess that some shared library or kernel changes triggered this bug. Kind regards, Jonas Meurer ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3590374&group_id=29880