Monitor HPE MSA 2050

Hi,

one of our customers has a HP MSA 2050 and with SNMP we get only Interface002, Interface003, SNMP Info and Uptime.

How can we get more data?

We are using 1.5.0p23 Managed Service Edition.

TIA,
Roland.

Does the target system export more information?
If not, sounds like a config issue.
If it does, you have to check why the inventory function doesn’t get hit.

MSA has only very limited information with SNMP.
You need to configure the special agent “agent_hp_msa”.
First you need to check if your MSA is working with the special agent.

If it is working you should get some more checks then.

Best regards
Andreas

If I switch from SNMP to the HP-MSA Agent, I get this:

CRIT - no unmonitored services found, no vanished services found, [special_hp_msa] Agent exited with code 1: Connection error: ‘NoneType’ object has no attribute ‘groups’

How does the output / error message looks like on the command line?

Here the full traceback. Hope it helps. :slight_smile:

~$ cmk -IIv --debug stor_hp_msa2050
Discovering services on: stor_hp_msa2050
stor_hp_msa2050:
+ FETCHING DATA
 [special_hp_msa] Execute data source
 [special_hp_msa] ERROR: Agent exited with code 1: Connection error: 'NoneType' object has no attribute 'groups'
Traceback (most recent call last):
  File "/omd/sites/intern/bin/cmk", line 96, in <module>
    exit_status = modes.call(o, a, opts, args)
  File "/omd/sites/intern/lib/python/cmk_base/modes/__init__.py", line 80, in call
    return mode.handler_function(*handler_args)
  File "/omd/sites/intern/lib/python/cmk_base/modes/check_mk.py", line 1451, in mode_discover
    options["discover"] == 1)
  File "/omd/sites/intern/lib/python/cmk_base/discovery.py", line 124, in do_discovery
    multi_host_sections = _get_host_sections_for_discovery(sources, use_caches=use_caches)
  File "/omd/sites/intern/lib/python/cmk_base/discovery.py", line 764, in _get_host_sections_for_discovery
    return sources.get_host_sections(max_cachefile_age)
  File "/omd/sites/intern/lib/python/cmk_base/data_sources/__init__.py", line 305, in get_host_sections
    host_sections_from_source = source.run()
  File "/omd/sites/intern/lib/python/cmk_base/data_sources/abstract.py", line 130, in run
    raw_data, is_cached_data = self._get_raw_data()
  File "/omd/sites/intern/lib/python/cmk_base/data_sources/abstract.py", line 181, in _get_raw_data
    raw_data = self._execute()
  File "/omd/sites/intern/lib/python/cmk_base/data_sources/programs.py", line 62, in _execute
    return self._get_agent_info_program(command_line)
  File "/omd/sites/intern/lib/python/cmk_base/data_sources/programs.py", line 102, in _get_agent_info_program
    raise MKAgentError("Agent exited with code %d: %s" % (exitstatus, stderr))
cmk_base.exceptions.MKAgentError: Agent exited with code 1: Connection error: 'NoneType' object has no attribute 'groups'

This is not the special agent output.
Please do a “cmk -D stor_hp_msa2050” then you find the line “Type of agent:”
There you should see the command line for the special agent.

Check the command and run it with debug enabled.

For your version of 1.5.0p23 check
/opt/omd/versions/default/share/check_mk/agents/special/agent_hp_msa
around line 182.

Change

session_key = re.match('.*"response">(.*?)<.*', r.text).groups()[0]

to

session_key = re.search('.*esponse">(.*?)<.*', r.text).groups()[0]

In my version 1.6.0p6.cre the extracting of the session key has been updated, there is a new
class HPMSAConnection(object)
in /opt/omd/versions/1.6.0p6.cre/share/check_mk/agents/special/agent_hp_msa

I’m new to CheckMk and I have to figure out how to patch an check agent that it survives omd update.

Thanks a lot, that worked like a charm.

You can put your modified special agent to “~/local/share/check_mk/agents/special/” and it will survive the update.

1 Like