Huawei switch monitoring

Hi erveryone,

I would like to use the checkmk built-in plugins huawei_switch_stack and huawei_switch_temp to monitor stackvalues and temperature of our Huawei S5735-L48LP4XE-A-V2 switches.

I thought that no special configuration is needed, and plugins “work” automatically at service discovery, but they don’t.

I can monitor interfaces and fans, so the plugin huawei_switch_fan works.

How can I get the plugins huawei_switch_stack and huawei_switch_temp work?
Perhaps our switches are not compatible?

Thank you for your replies!

Hi,
this is same problem i am facing too. I opened discussion here : SNMP not getting data from huawei Switch and Router

Best regards,
JF

One thing you should try is the following.
Check with snmpwalk if you can get data from the following OID table.

.1.3.6.1.4.1.2011.5.25.31.1.1.1.1

This table is used by all the checks like memory, psu and memory.
The fan check gets the data from another table.

Thanks for sharing @jan.filo !

Thank you Andreas!
I would love to check that, but no matter what I do, snmpwalk tells me Timeout: No Response from X.X.X.X
I am confused since I have snmp data in checkmk :melting_face:

Hi,
I did snmpwalk and i am getting the data. Here is file with all of them.
huawei.txt (67.3 KB)

Best regards,
JF

You doing snmpwalk from same server where cmk is installed?

Yes, it’s the same server.

Try increasing timeout value maybe you have rule in cmk for that and that is why there it works.

I really have to apologize - I’m such an idiot! I was using the wrong snmp community name.
Data is now coming in.

Thanks for share this information.

Hi Andreas,
like @jan.filo I can query this table. Sorry, my knowledge of snmp is limited - how can this table help us getting the temperature values in cmk?

Some more information is fetched from these checks. Also the table “.1.3.6.1.2.1.47.1.1.1.1”, this table is not needed by the fan check. It is possible that the data from there is not matching with this table you already fetched.

Well that table is inside legacy includes which i presume all Huawei checks should use.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2019 Checkmk GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.

# type: ignore[list-item,import,assignment,misc,operator]  # TODO: see which are needed in this file
from cmk.base.check_api import OID_END
import collections


def huawei_switch_scan_function(oid):
    return ".1.3.6.1.4.1.2011.2.23" in oid(".1.3.6.1.2.1.1.2.0")


def huawei_entity_specific_snmp_info(snmp_info):
    """
    Used for the 'snmp_info' of a check to retrieve values that are indexed by a
    entPhyisicalIndex. See parse_huawei_physical_entity_values() for a detailed description.
    """
    return [
        (
            '.1.3.6.1.2.1.47.1.1.1.1',
            [OID_END, "7"],
        ),  # retrieve list of [entPhysicalIndex, entPhysicalName]
        snmp_info,
    ]


Not all - only the checks that fetch information about hardware entities.

Hi @andreas-doehler and @jan.filo

I had some other things to do and lost sight of the topic, sorry.
So how can we achieve our goal? Do you think there is a solution?

I still remember checking our old HP UPS, I used a legacy check that simply executed an SNMP command with the appropriate OID. Wouldn’t something like that be possible here too?

I just implemented a manual check under Setup > Services > Other services > Integrate Nagios plugins

Command line: check_snmp -H $HOSTADDRESS$ -C SNMP-Community -P 2c -o .1.3.6.1.4.1.2011.5.25.31.1.1.1.1.11.16842753 -u “°C” -c 50 -w 40

This way I get the data I want, although I’m sure there are more elegant ways :relieved: