[ nagiosplug-Bugs-3576105 ] check_hpjd doesn't handle locale in response
SourceForge.net <[email protected]>
| Newsgroups | gmane.network.nagios.plugins.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #3576105, was opened at 2012-10-10 12:21
Message generated for change (Tracker Item Submitted) made by gsancosme
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3576105&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: Djo (gsancosme)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_hpjd doesn't handle locale in response
Initial Comment:
Plugin Version (-V output): check_hpjd v1.4.16 (nagios-plugins 1.4.16)
Plugin Name: check_hpjd
Plugin Commandline showing issues:
# ./check_hpjd -H 10.10.10.201
Printer ok - ("Pr..t")
Operating System:
SuSE Linux Eterprise Server 11 SP1 (SLES 11)
Linux neptune 3.0.13-0.27-default #1 SMP Wed Feb 15 13:33:49 UTC 2012 (d73692b) x86_64 x86_64 x86_64 GNU/Linux
Architecture: x86_64
Compiler:gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
Plugins from distribution.
system charset : utf-8
When handling the response, check_http doesn't handle correctly the answer according to printer's language setup.
In the answer of the above command
Printer ok - ("Pr..t")
should be
Printer ok - ("Prêt")
To ensure that the problem was not laying into the snmp library, I made a tcpdump of the communication between the server and the printer.
# tcpdump -i eth0 -X -s0 host 10.10.10.201
This short tcpdump of the communication shows in SNMP get-respose packet :
50 72 c3 aa 74 where c3 aa is according to utf-8 table the ê
U+00EA ê c3 aa LATIN SMALL LETTER E WITH CIRCUMFLEX
thus the sequence "50 72 c3 aa 74" should be handled as "Prêt"
See below at the end of the answer packet ( 0x0130: 0309 0101 0300 0405 5072 c3aa 74 ........Pr..t)
# tcpdump -i eth0 -X -s0 host 10.10.10.201
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
21:18:25.302711 IP neptune.sancosme.home.57361 > hp.sancosme.home.snmp: GetRequest(254) E:hp.2.3.9.1.1.2.1.0 E:hp.2.3.9.1.1.2.2.0 E:hp.2.3.9.1.1.2.3.0 E:hp.2.3.9.1.1.2.6.0 E:hp.2.3.9.1.1.2.9.0 E:hp.2.3.9.1.1.2.8.0 E:hp.2.3.9.1.1.2.10.0 E:hp.2.3.9.1.1.2.11.0 E:hp.2.3.9.1.1.2.12.0 E:hp.2.3.9.1.1.2.17.0 E:hp.2.3.9.1.1.2.19.0 E:hp.2.3.9.1.1.3.0
0x0000: 4500 012c 0000 4000 4011 10e2 0a0a 0a03 E..,..@.@.......
0x0010: 0a0a 0ac9 e011 00a1 0118 2a09 3082 010c ..........*.0...
0x0020: 0201 0004 0670 7562 6c69 63a0 81fe 0204 .....public.....
0x0030: 7618 2bed 0201 0002 0100 3081 ef30 1206 v.+.......0..0..
0x0040: 0e2b 0601 0401 0b02 0309 0101 0201 0005 .+..............
0x0050: 0030 1206 0e2b 0601 0401 0b02 0309 0101 .0...+..........
0x0060: 0202 0005 0030 1206 0e2b 0601 0401 0b02 .....0...+......
0x0070: 0309 0101 0203 0005 0030 1206 0e2b 0601 .........0...+..
0x0080: 0401 0b02 0309 0101 0206 0005 0030 1206 .............0..
0x0090: 0e2b 0601 0401 0b02 0309 0101 0209 0005 .+..............
0x00a0: 0030 1206 0e2b 0601 0401 0b02 0309 0101 .0...+..........
0x00b0: 0208 0005 0030 1206 0e2b 0601 0401 0b02 .....0...+......
0x00c0: 0309 0101 020a 0005 0030 1206 0e2b 0601 .........0...+..
0x00d0: 0401 0b02 0309 0101 020b 0005 0030 1206 .............0..
0x00e0: 0e2b 0601 0401 0b02 0309 0101 020c 0005 .+..............
0x00f0: 0030 1206 0e2b 0601 0401 0b02 0309 0101 .0...+..........
0x0100: 0211 0005 0030 1206 0e2b 0601 0401 0b02 .....0...+......
0x0110: 0309 0101 0213 0005 0030 1106 0d2b 0601 .........0...+..
0x0120: 0401 0b02 0309 0101 0300 0500 ............
21:18:25.304320 IP hp.sancosme.home.snmp > neptune.sancosme.home.57361: GetResponse(270) E:hp.2.3.9.1.1.2.1.0=0 E:hp.2.3.9.1.1.2.2.0=0 E:hp.2.3.9.1.1.2.3.0=0 E:hp.2.3.9.1.1.2.6.0=0 E:hp.2.3.9.1.1.2.9.0=0 E:hp.2.3.9.1.1.2.8.0=0 E:hp.2.3.9.1.1.2.10.0=0 E:hp.2.3.9.1.1.2.11.0=0 E:hp.2.3.9.1.1.2.12.0=0 E:hp.2.3.9.1.1.2.17.0=0 E:hp.2.3.9.1.1.2.19.0=0 E:hp.2.3.9.1.1.3.0=50_72_c3_aa_74
0x0000: 4500 013d 02f3 0000 4011 4dde 0a0a 0ac9 [email protected].....
0x0010: 0a0a 0a03 00a1 e011 0129 794a 3082 011d .........)yJ0...
0x0020: 0201 0004 0670 7562 6c69 63a2 8201 0e02 .....public.....
0x0030: 0476 182b ed02 0100 0201 0030 81ff 3013 .v.+.......0..0.
0x0040: 060e 2b06 0104 010b 0203 0901 0102 0100 ..+.............
0x0050: 0201 0030 1306 0e2b 0601 0401 0b02 0309 ...0...+........
0x0060: 0101 0202 0002 0100 3013 060e 2b06 0104 ........0...+...
0x0070: 010b 0203 0901 0102 0300 0201 0030 1306 .............0..
0x0080: 0e2b 0601 0401 0b02 0309 0101 0206 0002 .+..............
0x0090: 0100 3013 060e 2b06 0104 010b 0203 0901 ..0...+.........
0x00a0: 0102 0900 0201 0030 1306 0e2b 0601 0401 .......0...+....
0x00b0: 0b02 0309 0101 0208 0002 0100 3013 060e ............0...
0x00c0: 2b06 0104 010b 0203 0901 0102 0a00 0201 +...............
0x00d0: 0030 1306 0e2b 0601 0401 0b02 0309 0101 .0...+..........
0x00e0: 020b 0002 0100 3013 060e 2b06 0104 010b ......0...+.....
0x00f0: 0203 0901 0102 0c00 0201 0030 1306 0e2b ...........0...+
0x0100: 0601 0401 0b02 0309 0101 0211 0002 0100 ................
0x0110: 3013 060e 2b06 0104 010b 0203 0901 0102 0...+...........
0x0120: 1300 0201 0030 1606 0d2b 0601 0401 0b02 .....0...+......
0x0130: 0309 0101 0300 0405 5072 c3aa 74 ........Pr..t
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3576105&group_id=29880
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________________
Nagios Plugin Development Mailing List [email protected]
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