Custom SNMP plugin, works via cmk, services vanish via WATO

Hey,

TLDR: custom SNMP check plugin works when run via command line, but in WATO no new services are discovered.

I’ve written a custom SNMP check plugin (for Dell PowerVault ME4s, the data they return for the FCMGMT-MIB in the experimental sub-tree).

The inventory works by running cmk -II --debug -v --checks dell_emc_powervault_me4_status $MyHostName which returns, among other things:

+ EXECUTING DISCOVERY PLUGINS (1)
 41 dell_emc_powervault_me4_status
SUCCESS - Found 41 services, no host labels

What also works is running the checks afterwards via cmk --debug -vp --checks dell_emc_powervault_me4_status $MyHostName which outputs:

Check_MK version 1.6.0p20
…
ME4 controller firmware OK - I/O Manager-A: GTS280R10-10; I/O Manager-B: GTS280R10-10 ()
ME4 overall status   OK - state: online; status: ok
…

and so on for all the other 39 services.

However, as soon as I visit the host in WATO & click on the services & run a “full scan”, all of those services vanish, never to be seen again.

I have built custom SNMP checks in the past, and those work just fine, both via the command line an in WATO.

What I have to add is that I’m in a distributed situation. I’m developing the plugin on a site server as it’s the only one with access to the target host. I’ve made sure to copy the new plugin file from the site server to the central server, too. I’ve restarted cmk with cmk -R on both the central & the site servers. No luck.

(ARG! While I was writing this one of my two ME4 hosts suddenly showed all new services via WATO. The other one, though? Still no new services found.)

Sooo… which steps am I missing? Is this caching, if so, how do I get around it?

Thanks!

If you use the “–checks” option, you will ignore the scan function. This means the scan function cannot decide if your device is a Dell Powervault.
Can you post your “snmp_scan_function” and the content of the system description & object OID?

For the Powervault ME4 i wrote last week a special agent for the well documented REST Api.
If all goes the right direction i can upload this mkp to my github the next days. Then you can test if it is working with your system :slight_smile:

1 Like

If you use the “–checks” option, you will ignore the scan function.

Ooooh, I wasn’t aware of that. Thanks.

Here’s my scan function (directly copy-pasted from the check_info structure):

    'snmp_scan_function':  lambda oid:
            oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.674") \
                        and 'me4' in oid(".1.3.6.1.2.1.1.1").lower(),

and after trying both OIDs shown I can easily see my mistake: the second one is too short, should be .1.3.6.1.2.1.1.1.0. Changed to

    'snmp_scan_function':  lambda oid:
            oid(".1.3.6.1.2.1.1.2.0").startswith(".1.3.6.1.4.1.674") \
                        and 'me4' in oid(".1.3.6.1.2.1.1.1.0").lower(),

and a “full scan” in WATO instantly starts to work on both hosts.

Thanks a lot! Solved!

For the record:

.1.3.6.1.2.1.1.2.0 = OID: .1.3.6.1.4.1.674
.1.3.6.1.2.1.1.1.0 = STRING: "DELL EMC ME4024"

For the Powervault ME4 i wrote last week a special agent for the well documented REST Api.

Very nice! I’ll gladly give it a try once it’s out. Where should I look for a release announcement?

The special agent found it’s way to the github repo :slight_smile:

3 Likes

Thanks for the heads-up! I’ll give it a go soonish (very little time next week) & am looking forward to it.

This plugin is exceptionally nice, thank you so much for making it available. It offers so much more information than what was available via SNMP, even via the FCMGMT MIB in the experimental tree (that one basically offered all the sensors + a general “everything ok?” flag, but nothing on pools or the individual drives).

One thing I’d be glad to have is the controller firmware version. Any chance you could add that somewhere (assuming the API provides a way to query that information)?

The data should already be there :slight_smile:
It need only be included in the controller check as output.

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