Monitor HP SAN P2000 G3

Hi All,
I want to monitor my hp san p2000 with check_mk plugin.
Any help with this error?!

==========
~/share/check_mk/agents/special/agent_hp_msa --debug -u manage -p ‘pass’ 172.16.1.1
WARNING: RESPONSE.status_code, reason: (404, ‘Not Found’)
Traceback (most recent call last):
File “/omd/sites/mysite/share/check_mk/agents/special/agent_hp_msa”, line 212, in
sys.exit(main())
File “/omd/sites/mysite/share/check_mk/agents/special/agent_hp_msa”, line 192, in main
connection.login(args.username, args.password)
File “/omd/sites/mysite/share/check_mk/agents/special/agent_hp_msa”, line 159, in login
session_key = self._get_session_key(hashlib.md5, username, password)
File “/omd/sites/mysite/share/check_mk/agents/special/agent_hp_msa”, line 168, in _get_session_key
xml_tree = ET.fromstring(response.text)
File “/omd/sites/mysite/lib/python2.7/xml/etree/ElementTree.py”, line 1311, in XML
parser.feed(text)
File “/omd/sites/mysite/lib/python2.7/xml/etree/ElementTree.py”, line 1659, in feed
self._raiseerror(v)
File “/omd/sites/mysite/lib/python2.7/xml/etree/ElementTree.py”, line 1523, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: syntax error: line 1, column 49

1 Like

Hi
I have this problem too. any ideas?

1 Like

It looks like a problem with the response from you P2000.

I would do the following.

  • copy ~/share/check_mk/agents/special/agent_hp_msa to ~/local/share/check_mk/agents/special/agent_hp_msa
  • insert before line 168 (xml_tree …) a line with only a “print response.text”
  • run the manual execution again with this modified file to get the response text
1 Like

TNX for your reply.
As you can see I got this error . My user/pass in correct!

===========
~/local/share/check_mk/agents/special/agent_hp_msa --debug -u checkmk -p checkmk 172.16.1.14

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>error1Authentication Unsuccessful2

WARNING: RESPONSE.status_code, reason: (404, ‘Not Found’)

404 Not Found

Not Found

Traceback (most recent call last):
File “/omd/sites/mysite/local/share/check_mk/agents/special/agent_hp_msa”, line 213, in
sys.exit(main())
File “/omd/sites/mysite/local/share/check_mk/agents/special/agent_hp_msa”, line 193, in main
connection.login(args.username, args.password)
File “/omd/sites/mysite/local/share/check_mk/agents/special/agent_hp_msa”, line 159, in login
session_key = self._get_session_key(hashlib.md5, username, password)
File “/omd/sites/mysite/local/share/check_mk/agents/special/agent_hp_msa”, line 169, in _get_session_key
xml_tree = ET.fromstring(response.text)
File “/omd/sites/mysite/lib/python2.7/xml/etree/ElementTree.py”, line 1311, in XML
parser.feed(text)
File “/omd/sites/mysite/lib/python2.7/xml/etree/ElementTree.py”, line 1659, in feed
self._raiseerror(v)
File “/omd/sites/mysite/lib/python2.7/xml/etree/ElementTree.py”, line 1523, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: syntax error: line 1, column 49

Hi,
I edited the code and now it works ! :slightly_smiling_face:
#self._base_url = “https://%s/v3/api/” % self._host
self._base_url = “http://%s/api/” % self._host

But still have a problem(crash output) with some services
Here is crash details:
Any idea about the crash details?!

=============
File “/omd/sites/mysite/lib/python/cmk_base/checking.py”, line 322, in execute_check
cmk_base.check_utils.is_snmp_check(check_plugin_name))
File “/omd/sites/mysite/lib/python/cmk_base/checking.py”, line 444, in sanitize_check_result
return _sanitize_yield_check_result(result, is_snmp)
File “/omd/sites/mysite/lib/python/cmk_base/checking.py”, line 450, in _sanitize_yield_check_result
subresults = list(result)
File “/omd/sites/mysite/share/check_mk/checks/hp_msa_volume”, line 209, in check_hp_msa_volume_df
parsed = _get_item_data(item, parsed)
File “/omd/sites/mysite/share/check_mk/checks/hp_msa_volume”, line 142, in _get_item_data
if item in [k, v[“durable-id”]]:

=============

File “/omd/sites/mysite/lib/python/cmk_base/checking.py”, line 322, in execute_check
cmk_base.check_utils.is_snmp_check(check_plugin_name))
File “/omd/sites/mysite/lib/python/cmk_base/checking.py”, line 444, in sanitize_check_result
return _sanitize_yield_check_result(result, is_snmp)
File “/omd/sites/mysite/lib/python/cmk_base/checking.py”, line 450, in _sanitize_yield_check_result
subresults = list(result)
File “/omd/sites/mysite/share/check_mk/checks/hp_msa_volume”, line 209, in check_hp_msa_volume_df
parsed = _get_item_data(item, parsed)
File “/omd/sites/mysite/share/check_mk/checks/hp_msa_volume”, line 142, in _get_item_data
if item in [k, v[“durable-id”]]:
{‘item’: u’san1_FTP_en2_R5_FTP’,
‘k’: u’san1_vd2_en1_R50_v1’,
‘parsed’: {u’san1_FTP_en2_R5_FTP’: {u’blocks’: u’1145719808’,
u’bytes-per-second’: u’4608B’,
u’bytes-per-second-numeric’: u’4608’,
u’cache-optimization’: u’standard’,
u’cache-optimization-numeric’: u’0’,
u’capabilities’: u’dme’,
u’container-name’: u’FTP_en2_R5_D21-25’,
u’container-serial’: u’00c0ff13c8fd00005c069e5b00000000’,
u’data-read’: u’1531.8MB’,
u’data-read-numeric’: u’1531888640’,
u’data-written’: u’9565.1MB’,
u’data-written-numeric’: u’9565119488’,
u’full-stripe-write-destages’: u’28732’,
u’iops’: u’1’,
u’number-of-reads’: u’123780’,
u’number-of-writes’: u’351206’,
u’owner’: u’B’,
u’owner-numeric’: u’0’,
u’preferred-owner’: u’B’,
u’preferred-owner-numeric’: u’0’,
u’progress’: u’0%’,
u’progress-numeric’: u’0’,
u’read-ahead-operations’: u’13189’,
u’read-ahead-size’: u’Default’,
u’read-ahead-size-numeric’: u’-1’,
u’read-cache-hits’: u’154570’,
u’read-cache-misses’: u’36694’,
u’serial-number’: u’00c0ff13c8fd00001c079e5b01000000’,
u’size’: u’586.6GB’,
u’size-numeric’: u’1145719808’,
u’small-destages’: u’21101’,
u’virtual-disk-name’: u’FTP_en2_R5_D21-25’,
u’virtual-disk-serial’: u’00c0ff13c8fd00005c069e5b00000000’,
u’volume-class’: u’standard’,
u’volume-class-numeric’: u’0’,
u’volume-name’: u’san1_FTP_en2_R5_FTP’,
u’volume-qualifier’: u’N/A’,
u’volume-qualifier-numeric’: u’0’,
u’volume-type’: u’standard’,
u’volume-type-numeric’: u’0’,
u’write-cache-hits’: u’319400’,
u’write-cache-misses’: u’533693’,
u’write-cache-percent’: u’12’,
u’write-cache-space’: u’52’,
u’write-policy’: u’write-back’,
u’write-policy-numeric’: u’1’,
u’wwn’: u’600C0FF00013C8FD1C079E5B01000000’},

any idea about this error?!

Your firmware version is not compatible with the check or vice versa :wink:
I had one MSA also with this newer firmware and created a new set of checks.
If i remember it correctly then not only the disk name was changed, there where some other changes also.