SNMP No Services - Need Guidence

Greetings!!

I need some help understanding what this means and what I need to do.

I have added a device (a PDU for example) to CheckMK via SNMP. When I perform the check it only displays Interface, SNMP Info, and Uptime (and nothing else). I found the Devices MIB and dropped it into the location CheckMK wants the other Custom MIBs but it doesn’t seem to do anything different.

When I do an snmpwalk or snmpbulkwalk it dumps out all the info pertaining to the outlets, voltages, usage, etc. etc. etc. (basically all the stuff I want to monitor).

Am I missing something? Does this mean CheckMK doesn’t know what these things are? What are next steps?

Any help would greatly be appreciated. I know this sounds like a really stupid question but I’m just not getting it when I’m Googling or reading the “Monitoring via SNMP” section of CheckMK “How-To’s”.

Thanks!

Hi,

the custom MIB is only affected by

Chapter 7.4

More Details you can fetch by a check_plugin

Chapter 8

What kind of PDU you want to discover ???

Greets

Hey BH2005,

Thanks for the reply!

Good to know about the MIBs. In this case I guess I would be looking towards the Chapter 8 section as opposed to Processing Logs and SNMP Traps.

Just so I understand, because there isn’t “pre-compiled” check(s) that fit my PDU, it only displays the basic info. In order to get more data, I would essentially need to build out the Checks based on the OID’s/etc. that I want to monitor. Does that sound about right?

In this case I have 2 versions of Sentry PDU’s that I want to monitor. One of the versions already has the checks built out so thats reporting back info. I guess this version doesn’t have that available (which sucks but good practice on how to build an SNMP check!).

If I am assuming this is correct, then I have 2 questions:

  1. How can I look at the existing SNMP check that’s in place now? (Would like to get an idea on how to build it out)

  2. Once I build my check, where does it need to go in order for CheckMK to use it?

Thanks for the info!!

Ben

Hi Ben,
the 1st question is:
What check does the working PDU use?

then you only need to use a MIB browser to find the appropriate OIDs for your 2nd version and add them to the existing check.
That`s all

Hey BH2005,

Here is a screenshot of the working PDU. Can’t display all of it in a screenshot but it basically has everything I want check (all Outlets, Watts, Power Supply System, etc.)

Am I correct to assume the “check” you are referring to is the Check Plugin which in this case it is using is the snmp_info check located in the top left corner?

If not, my assumption would be it is using one of the Server Technology provided Sentry PDU plugins already available in CheckMK (under Setup > Services > Catalog of check plugins > Appliances, other dedicated Hardware > Power supplies and PDUs (see screenshot).

If thats not the answer to both, I may need some help on where I can find the answer to your question. If it helps, I am running “OMD - Open Monitoring Distribution Version 2.0.0.cre”.

Let me know what else you need!

Thanks,
Ben

One small remark from my side.
You can do an snmpwalk/get to get the OID .1.3.6.1.2.1.1.2.0
Now you can compare the output for booth of your PDUs. What shows the “not working” one under this OID?
With the output from this OID CheckMK decides what check should work on the device as it is something like the device identifier.

1 Like

Hey Andreas,

Thanks for the tip. Below are the OID’s for the reporting PDU and non-reporting PDU

PDU Reporting Checks:
.1.3.6.1.2.1.1.1.0 Sentry Switched CDU
.1.3.6.1.2.1.1.2.0 .1.3.6.1.4.1.1718.3

PDU Not Reporting Checks
.1.3.6.1.2.1.1.1.0 Sentry Switched PDU
.1.3.6.1.2.1.1.2.0 .1.3.6.1.4.1.1718.4

By doing a side-by-side spot check comparison, it looks like a lot of the OIDs are similar or the same between both devices. The “.1.3.6.1.4.1.1718.4” device is reporting more fields but I suspect thats because it’s a different model and has additional outlets and so forth.

I was reading throughout the forums on building SNMP checks and based on BH2005’s remarks above, do you think its possible that CheckMK is restricting the checks to the working “.1.3.6.1.4.1.1718.3” identifier? If so, is there a way I can “expand” that request to include my other model?

Ben

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

Some more information for this problem. My last answer you can discard :wink:
I have done a quick search for the two OIDs you found and the first one is SentryPDU Gen3 and the next one is Gen4 with a completely different OID structure.

Only my last two sentences are good as an answer. A complete new check needs to be build for this device class.

Hey Andreas,

Yeah, that was totally my bad on that. Once I compared the snmpwalks further down I noticed it got REALLY different. However, thanks to you and @BH2005, I found out that basically I had to create my own check and with the folder you provided (copy "~/share/check_mk/checks/” to “~/local/share/check_mk/checks/”), I was able to create the checks I needed by tweaking the copy checks, renaming them, and BOOM!!, I have reporting checks.

One final question…

If I wanted to add/modify/tweak alert thresholds (say for Watts usage for example), would I do that in the CheckMK GUI or would I do that in the new check file(s) I created?

For the gui you need to write some extensions. Like this one - it is only an example for one of my extensions.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.