HPE iLO Restful Redfish API Agent

Yes i know it was only a test if IPv6 will work with the special agent. As i have no “real” IPv6 on these devices active.

Hi
Is there a document to start with? I have installed and replicated the MKP in the RAW version. And now . . .? - I do not see the forrest for the threes.

Best,
Rene

You should have a new entry in the “Other integrations” section. there you can configure the special agent. Inside “Other integrations” search for Redfish.

Thank you for bringing some more light into this. I’m afraid, it’s not yet showing up there. I have disabled and re-enabled the package. What can I do more?

image


image

Please change the package from the old legacy HPE iLO Redfish to the generic Redfish one.
https://exchange.checkmk.com/p/redfish

Thanks a lot, good point. Now I have the choice for redfish but obviously messed up something else:

Good question - it is an automation problem.
What happens if you try on the command line a cmk --debug -vvI hostname to discover the services?
With your first screenshot it also see that this is a distributed environment (two different site names) and there you need to distribute the installed mkps first to all sites.

Thanks, that’s one for the records. It dropped me another error like “ModuleNotFoundError: No module named ‘redfish.rest.v1’”

Then, I poked around with a few other of your tipps like:
installing ‘urllib3<2’ redfish

That led me into some “botocore 1.20.102 requires urllib3” errors which pointed me into other tipps like “as SITE user pip3 install ‘urllib3<2’ redfish (–upgrade)” and THAT was the trick.

Thanks Andreas for your valuable know how and efforts.

best,
rene

In the description of the package is the command you need to do :wink:
Also on the download page^^

Hello,

we are testing the new integration of the Redfish API Agent in Check_MK 2.3 beta. After activating the package in our test enviroment we are able to call the special agent manually and get a good result:

cd local/share/check_mk/agents/special/
./agent_redfish -u <username> -s <passwort>  <ilohostname>

<<<check_mk:sep(32)>>>
Version: 2.0
AgentOS: iLO 5 - X.XX
<<<redfish_manager:sep(0)>>>
[{"@odata.context": "/redfish/v1/$metadata#Manager.Manager", "@od ..
[many lines more ...]

But we cannot discover any service:

cmk --debug –vvI <ilohostname>

Discovering services and host labels on: ilohostname
ilohostname:
+ FETCHING DATA
Trying to acquire lock on /omd/sites/test_23b/var/check_mk/crashes/base/311fcb40-fb3a-11ee-b9a8-005056a2a9c5/crash.info
Got lock on /omd/sites/test_23b/var/check_mk/crashes/base/311fcb40-fb3a-11ee-b9a8-005056a2a9c5/crash.info
Releasing lock on /omd/sites/test_23b/var/check_mk/crashes/base/311fcb40-fb3a-11ee-b9a8-005056a2a9c5/crash.info
Released lock on /omd/sites/test_23b/var/check_mk/crashes/base/311fcb40-fb3a-11ee-b9a8-005056a2a9c5/crash.info
Traceback (most recent call last):
  File "/omd/sites/test_23b/lib/python3/cmk/discover_plugins/_python_plugins.py", line 193, in add_from_module
    module = importer(mod_name, raise_errors=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/test_23b/lib/python3/cmk/discover_plugins/_python_plugins.py", line 156, in _import_optionally
    return importlib.import_module(module_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/test_23b/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 994, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/omd/sites/test_23b/local/lib/python3/cmk/plugins/redfish/server_side_calls/special_agent.py", line 12, in <module>
    from cmk.server_side_calls.v1 import (
ImportError: cannot import name 'parse_secret' from 'cmk.server_side_calls.v1' (/omd/sites/test_23b/lib/python3.12/site-packages/cmk/server_side_calls/v1/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/omd/sites/test_23b/bin/cmk", line 114, in <module>
    exit_status = modes.call(mode_name, mode_args, opts, args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/test_23b/lib/python3/cmk/base/modes/__init__.py", line 70, in call
    return handler(*handler_args)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/test_23b/lib/python3/cmk/base/modes/check_mk.py", line 2013, in mode_discover
    commandline_discovery(
  File "/omd/sites/test_23b/lib/python3/cmk/checkengine/discovery/_commandline.py", line 65, in commandline_discovery
    fetched = fetcher(host_name, ip_address=None)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/test_23b/lib/python3/cmk/base/checkers.py", line 299, in __call__
    return _fetch_all(
           ^^^^^^^^^^^
  File "/omd/sites/test_23b/lib/python3/cmk/base/checkers.py", line 114, in _fetch_all
    return [
           ^
  File "/omd/sites/test_23b/lib/python3/cmk/base/checkers.py", line 301, in <genexpr>
    make_sources(
  File "/omd/sites/test_23b/lib/python3/cmk/base/sources/_builder.py", line 395, in make_sources
    return _Builder(
           ^^^^^^^^^
  File "/omd/sites/test_23b/lib/python3/cmk/base/sources/_builder.py", line 134, in __init__
    self._initialize_agent_based()
  File "/omd/sites/test_23b/lib/python3/cmk/base/sources/_builder.py", line 191, in _initialize_agent_based
    special_agents = tuple(make_special_agents())
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/test_23b/lib/python3/cmk/base/sources/_builder.py", line 171, in make_special_agents
    load_special_agents()[1],
    ^^^^^^^^^^^^^^^^^^^^^
  File "/omd/sites/test_23b/lib/python3/cmk/base/server_side_calls/_loading.py", line 26, in load_special_agents
    loaded = discover_plugins(
             ^^^^^^^^^^^^^^^^^
  File "/omd/sites/test_23b/lib/python3/cmk/discover_plugins/_python_plugins.py", line 56, in discover_plugins
    collector.add_from_module(mod_name, _import_optionally)
  File "/omd/sites/test_23b/lib/python3/cmk/discover_plugins/_python_plugins.py", line 196, in add_from_module
    self._handle_error(exc_sub)
  File "/omd/sites/test_23b/lib/python3/cmk/discover_plugins/_python_plugins.py", line 235, in _handle_error
    raise exc
ImportError: cmk.plugins.redfish.server_side_calls.special_agent: cannot import name 'parse_secret' from 'cmk.server_side_calls.v1' (/omd/sites/test_23b/lib/python3.12/site-packages/cmk/server_side_calls/v1/__init__.py)

What may be the problem here? We are testing Check_MK 2.3.0b4.cee on SLES15SP5.

Thanks

Miwu

This is a beta bug and should be fixed inside b5 - in b3 and b4 no external special agent with passwords are working. Only the directly included ones.

1 Like

Thank you for this information. We will wait for the next beta.

Same problem in beta 5 …

Yes as there is no new version of Redfish MKP in beta 5 at the moment.
I tested yesterday what needs to be done and found another bug :wink:
In 1 or 2 days you can expect a new MKP to be available from github. This is than hopefully also inside beta 6.

1 Like

Now a version for beta 5 is available.

Pay attention - there is a “bug” in beta 5 that forces you to activate changes after creation of a special agent rule before you can discover services on the host object assigned to this rule.

Andreas, thank you.

With mkp version 2.3.35 and 2.3.0b5 the bug is fixed in our enviroment. Everything is working fine now :grinning: :grinning: :grinning: