Cisco UCS C220 M5 Rack Server

Hello,

I am looking for a solution to monitor CISCO APIC server, running on UCS C220 M5 Rack Server.

I tried IPMI: k_g key has max 20 characters but cisco always fills with zeros until 40 caracters
With SNMP nothing is discovered.
With UCS Bladecenter we get only this:

A lot is missing here like CPU utillization, PSU´s etc. etc.

I see that after ''XML PARSING ERROR: no class named equipmentFanModuleStats" it logges out. See below debug output.

Whats wrong here?

CMK version: 2.1.0p35
OS version:Virt1

Error message:No Error

Output of UCS Bladecenter:

OMD[master]:~$ /omd/sites/master/share/check_mk/agents/special/agent_ucs_bladecenter '-u' 'uuuu' '-p' 'pppp' '--no-cert-check' '1.2.3.1' --debug
DEBUG: root: agent_ucs_bladecenter.py: 374: Server.login: Login
DEBUG: root: agent_ucs_bladecenter.py: 510: Server._communicate: Sending XML string: 'b'<aaaLogin inName="uuuu" inPassword="pppp" />''
DEBUG: urllib3.connectionpool: connectionpool.py: 971: Starting new HTTPS connection (1): 1.2.3.1:443
DEBUG: urllib3.connectionpool: connectionpool.py: 452: https://1.2.3.1:443 "POST /nuova HTTP/1.1" 200 None
DEBUG: root: agent_ucs_bladecenter.py: 526: Server._communicate: Got response content: 'b'<aaaLogin cookie="" response="yes" outCookie="1698651385/d61987d0-08ea-18ea-800e-ec1e5a1aea70" outRefreshPeriod="600" outPriv="read-only" outSessionId="24" outVersion="4.0(4h)"> </aaaLogin>\n'' (200)
DEBUG: root: agent_ucs_bladecenter.py: 383: Server.login: Found cookie
DEBUG: root: agent_ucs_bladecenter.py: 404: Server.get_model_info: Get model info
DEBUG: root: agent_ucs_bladecenter.py: 510: Server._communicate: Sending XML string: 'b'<configResolveClass classId="biosUnit" inHierarchical="false" cookie="1698651385/d61987d0-08ea-18ea-800e-ec1e5a1aea70" />''
DEBUG: urllib3.connectionpool: connectionpool.py: 452: https://1.2.3.1:443 "POST /nuova HTTP/1.1" 200 None
DEBUG: root: agent_ucs_bladecenter.py: 526: Server._communicate: Got response content: 'b'<configResolveClass cookie="1698651385/d61987d0-08ea-18ea-800e-ec1e5a1aea70" response="yes" classId="biosUnit">\n<outConfigs>\n<biosUnit dn="sys/rack-unit-1/bios" model="APIC-SERVER-L3" vendor="Cisco Systems Inc" adminAction="no-op" ></biosUnit></outConfigs>\n</configResolveClass>\n'' (200)
DEBUG: root: agent_ucs_bladecenter.py: 492: Server._get_class_data: Entries found: '[<Element 'biosUnit' at 0x7fa04123cd10>]'
DEBUG: root: agent_ucs_bladecenter.py: 462: Server._get_attribute_data: Try getting attribute 'dn'
DEBUG: root: agent_ucs_bladecenter.py: 462: Server._get_attribute_data: Try getting attribute 'model'
DEBUG: root: agent_ucs_bladecenter.py: 419: Server.get_data_from_entities: Try to get entities
DEBUG: root: agent_ucs_bladecenter.py: 423: Server.get_data_from_entities: header: 'ucs_bladecenter_fans', class_id: 'equipmentFan' - attributes: 'Dn,Model,OperState'
DEBUG: root: agent_ucs_bladecenter.py: 510: Server._communicate: Sending XML string: 'b'<configResolveClass classId="equipmentFan" inHierarchical="false" cookie="1698651385/d61987d0-08ea-18ea-800e-ec1e5a1aea70" />''
DEBUG: urllib3.connectionpool: connectionpool.py: 452: https://1.2.3.1:443 "POST /nuova HTTP/1.1" 200 None
DEBUG: root: agent_ucs_bladecenter.py: 526: Server._communicate: Got response content: 'b'<configResolveClass cookie="1698651385/d61987d0-08ea-18ea-800e-ec1e5a1aea70" response="yes" classId="equipmentFan">\n<outConfigs>\n<equipmentFan id="1" model="" module="1" operability="operable" power="on" presence="equipped" serial="" thermal="not-supported" tray="1" vendor="" voltage="not-supported" dn="sys/rack-unit-1/fan-module-1-1/fan-1" ></equipmentFan><equipmentFan id="2" model="" module="1" operability="operable" power="on" presence="equipped" serial="" thermal="not-supported" tray="1" vendor="" voltage="not-supported" dn="sys/rack-unit-1/fan-module-1-1/fan-2" ></equipmentFan><equipmentFan id="1" model="" module="2" operability="operable" power="on" presence="equipped" serial="" thermal="not-supported" tray="1" vendor="" voltage="not-supported" dn="sys/rack-unit-1/fan-module-1-2/fan-1" ></equipmentFan><equipmentFan id="2" model="" module="2" operability="operable" power="on" presence="equipped" serial="" thermal="not-supported" tray="1" vendor="" voltage="not-supported" dn="sys/rack-unit-1/fan-module-1-2/fan-2" ></equipmentFan><equipmentFan id="1" model="" module="3" operability="operable" power="on" presence="equipped" serial="" thermal="not-supported" tray="1" vendor="" voltage="not-supported" dn="sys/rack-unit-1/fan-module-1-3/fan-1" ></equipmentFan><equipmentFan id="2" model="" module="3" operability="operable" power="on" presence="equipped" serial="" thermal="not-supported" tray="1" vendor="" voltage="not-supported" dn="sys/rack-unit-1/fan-module-1-3/fan-2" ></equipmentFan><equipmentFan id="1" model="" module="4" operability="operable" power="on" presence="equipped" serial="" thermal="not-supported" tray="1" vendor="" voltage="not-supported" dn="sys/rack-unit-1/fan-module-1-4/fan-1" ></equipmentFan><equipmentFan id="2" model="" module="4" operability="operable" power="on" presence="equipped" serial="" thermal="not-supported" tray="1" vendor="" voltage="not-supported" dn="sys/rack-unit-1/fan-module-1-4/fan-2" ></equipmentFan><equipmentFan id="1" model="" module="5" operability="operable" power="on" presence="equipped" serial="" thermal="not-supported" tray="1" vendor="" voltage="not-supported" dn="sys/rack-unit-1/fan-module-1-5/fan-1" ></equipmentFan><equipmentFan id="2" model="" module="5" operability="operable" power="on" presence="equipped" serial="" thermal="not-supported" tray="1" vendor="" voltage="not-supported" dn="sys/rack-unit-1/fan-module-1-5/fan-2" ></equipmentFan><equipmentFan id="1" model="" module="6" operability="operable" power="on" presence="equipped" serial="" thermal="not-supported" tray="1" vendor="" voltage="not-supported" dn="sys/rack-unit-1/fan-module-1-6/fan-1" ></equipmentFan><equipmentFan id="2" model="" module="6" operability="operable" power="on" presence="equipped" serial="" thermal="not-supported" tray="1" vendor="" voltage="not-supported" dn="sys/rack-unit-1/fan-module-1-6/fan-2" ></equipmentFan><equipmentFan id="1" model="" module="7" operability="operable" power="on" presence="equipped" serial="" thermal="not-supported" tray="1" vendor="" voltage="not-supported" dn="sys/rack-unit-1/fan-module-1-7/fan-1" ></equipmentFan><equipmentFan id="2" model="" module="7" operability="operable" power="on" presence="equipped" serial="" thermal="not-supported" tray="1" vendor="" voltage="not-supported" dn="sys/rack-unit-1/fan-module-1-7/fan-2" ></equipmentFan></outConfigs>\n</configResolveClass>\n'' (200)
DEBUG: root: agent_ucs_bladecenter.py: 492: Server._get_class_data: Entries found: '[<Element 'equipmentFan' at 0x7fa041258450>, <Element 'equipmentFan' at 0x7fa0412584a0>, <Element 'equipmentFan' at 0x7fa0412584f0>, <Element 'equipmentFan' at 0x7fa041258540>, <Element 'equipmentFan' at 0x7fa041258590>, <Element 'equipmentFan' at 0x7fa0412585e0>, <Element 'equipmentFan' at 0x7fa041258630>, <Element 'equipmentFan' at 0x7fa041258680>, <Element 'equipmentFan' at 0x7fa0412586d0>, <Element 'equipmentFan' at 0x7fa041258720>, <Element 'equipmentFan' at 0x7fa041258770>, <Element 'equipmentFan' at 0x7fa0412587c0>, <Element 'equipmentFan' at 0x7fa041258810>, <Element 'equipmentFan' at 0x7fa041258860>]'
DEBUG: root: agent_ucs_bladecenter.py: 462: Server._get_attribute_data: Try getting attribute 'dn'
DEBUG: root: agent_ucs_bladecenter.py: 462: Server._get_attribute_data: Try getting attribute 'dn'
DEBUG: root: agent_ucs_bladecenter.py: 462: Server._get_attribute_data: Try getting attribute 'dn'
DEBUG: root: agent_ucs_bladecenter.py: 462: Server._get_attribute_data: Try getting attribute 'dn'
DEBUG: root: agent_ucs_bladecenter.py: 462: Server._get_attribute_data: Try getting attribute 'dn'
DEBUG: root: agent_ucs_bladecenter.py: 462: Server._get_attribute_data: Try getting attribute 'dn'
DEBUG: root: agent_ucs_bladecenter.py: 462: Server._get_attribute_data: Try getting attribute 'dn'
DEBUG: root: agent_ucs_bladecenter.py: 462: Server._get_attribute_data: Try getting attribute 'dn'
DEBUG: root: agent_ucs_bladecenter.py: 462: Server._get_attribute_data: Try getting attribute 'dn'
DEBUG: root: agent_ucs_bladecenter.py: 462: Server._get_attribute_data: Try getting attribute 'dn'
DEBUG: root: agent_ucs_bladecenter.py: 462: Server._get_attribute_data: Try getting attribute 'dn'
DEBUG: root: agent_ucs_bladecenter.py: 462: Server._get_attribute_data: Try getting attribute 'dn'
DEBUG: root: agent_ucs_bladecenter.py: 462: Server._get_attribute_data: Try getting attribute 'dn'
DEBUG: root: agent_ucs_bladecenter.py: 462: Server._get_attribute_data: Try getting attribute 'dn'
DEBUG: root: agent_ucs_bladecenter.py: 423: Server.get_data_from_entities: header: 'ucs_bladecenter_fans', class_id: 'equipmentFanModuleStats' - attributes: 'Dn,AmbientTemp'
DEBUG: root: agent_ucs_bladecenter.py: 510: Server._communicate: Sending XML string: 'b'<configResolveClass classId="equipmentFanModuleStats" inHierarchical="false" cookie="1698651385/d61987d0-08ea-18ea-800e-ec1e5a1aea70" />''
DEBUG: urllib3.connectionpool: connectionpool.py: 452: https://1.2.3.1:443 "POST /nuova HTTP/1.1" 200 None
DEBUG: root: agent_ucs_bladecenter.py: 526: Server._communicate: Got response content: 'b'<error cookie="" response="yes" errorCode="ERR-xml-parse-error" invocationResult="594" errorDescr="XML PARSING ERROR: no class named equipmentFanModuleStats" />\n'' (200)
DEBUG: root: agent_ucs_bladecenter.py: 538: Server._communicate: Errors found: 'XML PARSING ERROR: no class named equipmentFanModuleStats'
DEBUG: root: agent_ucs_bladecenter.py: 433: Server.get_data_from_entities: Failed to get data
DEBUG: root: agent_ucs_bladecenter.py: 624: Failed getting entity data: 'XML PARSING ERROR: no class named equipmentFanModuleStats'
DEBUG: root: agent_ucs_bladecenter.py: 393: Server.logout: Logout
DEBUG: root: agent_ucs_bladecenter.py: 510: Server._communicate: Sending XML string: 'b'<aaaLogout inCookie="1698651385/d61987d0-08ea-18ea-800e-ec1e5a1aea70" />''
DEBUG: urllib3.connectionpool: connectionpool.py: 452: https://1.2.3.1:443 "POST /nuova HTTP/1.1" 200 None
DEBUG: root: agent_ucs_bladecenter.py: 526: Server._communicate: Got response content: 'b'<aaaLogout cookie="" response="yes" outStatus="success"> </aaaLogout>\n'' (200)
OMD[master]:~$

It’s a little bit strange normally the C series should work with the UCS special agent.
Some of my installations also have C series devices and i get valid responses.
I had a look only difference i have here → all the C220 are M4 models.
I found also two Business Edition 6000h M5 rack systems and they are working without problem with SNMP:
You can try the Redfish test agent, it should give some data back :wink:

The error message itself only indicates that the XML structure don’t know any class named “equipmentFanModuleStats”.
I think the special agent don’t recognize the system as a C class. The query for “equipmentFanModuleStats” should only be made if you have a B class.
Your model “APIC-SERVER-L3” is not matching the any model string in the special agent.
Strange is that he tries to fetch data then :smiley:
One solution would be to extend the regex for the C class to match this model then some output should be visible.

Thanks Andreas for the hint, that helped.
In 2.0.0 it was quite easy to fix this but in 2.1.0 the code is quite a bit complicated.

For model_info I get '{'sys/rack-unit-1': 'APIC'}

I changed the regex to:

C_SERIES_REGEX = re.compile(
    r"""
    ^
    (
        APIC      # apic-server-l3
        |
        UCSC      # normal, direct form
        |
        HX        # hyperflex
        (AF)?     # optional "all flash"
        [0-9]{3}  # model number
        C         # C for UCSC
    )
    $
""",
    re.VERBOSE,
)

Also added it here:

"""
>>> C_SERIES_REGEX.match("HXAF240C") is not None
True
>>> C_SERIES_REGEX.match("UCSC") is not None
True
>>> C_SERIES_REGEX.match("APIC") is not None
True
>>> B_SERIES_REGEX.match("UCSB") is not None
True
"""

That way it looks much better. I will open a ticket to ask to add but I assume that I will pushed back because its a feature request.

regards

Michael

Nice to see that the regex problem was the only one.
Normally this is not a good way to select a model - the mentioned BusinessEdition6000h had only a cryptic model number and no text in this output field :smiley:

Yes, looks weird to me either, but it is as it is.