SNMP No Services - Need Guidence

Attention not valid anymore after some search for the device information on the internet

This assumption is correct.

The next lines are from the check definition of your PDU check.

check_info["sentry_pdu"] = {
    "check_function": check_sentry_pdu,
    "inventory_function": inventory_sentry_pdu,
    "service_description": "Plug %s",
    "group": "plugs",
    "snmp_info": (".1.3.6.1.4.1.1718.3.2.2.1", [3, 5, 12]),
    "snmp_scan_function": lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.1718.3",
}

You see the scan function is only looking for “.1718.3”
Easy way to solve this problem and to check if your other PDU works with the same check is the following.

copy the three files “sentry_pdu”, “sentry_pdu_outlets” and “sentry_pdu_systempower” from “~/share/check_mk/checks/” to “~/local/share/check_mk/checks/”.

Now you can change the line

    "snmp_scan_function": lambda oid: oid(".1.3.6.1.2.1.1.2.0") == ".1.3.6.1.4.1.1718.3",

to

    'snmp_scan_function': lambda oid: oid(".1.3.6.1.2.1.1.2.0") in [
        ".1.3.6.1.4.1.1718.3",
        ".1.3.6.1.4.1.1718.4",
    ],

If the replacement is done the right way you can test with “cmk --debug -vvI hostname” on your PDU where until now nothing was found. It is possible that this will not work if there are other things changed inside the OIDs.
I think so as the OIDs the check pulls are also inside the “.1718.3” range.
Then you need to duplicate the old check and give them new names and replace the old OIDs with the new ones. That’s a little bit more work than extend one line.

1 Like