Understanding check_plugins_snmp vs nagios snmp plug-ins

Greetings to all

First of all, sorry if my question is stupid, but I’ve been trying to understand it for quite some hours now and I don’t know exactly the best way to handle it :frowning_face:

We currently have ~500 hosts that I would like to monitor using SNMP to get some specific OIDs values to get the coverage that these IoT-M2M devices have (RSSI value)

I have seen that the most “simple” is to use the Nagios plug-ins for these scenarios (Setup–>Services–>Other services → Integrate Nagios plug-ins)

This way it works without problems, but of course, it is pulling Nagios and not the CheckMK core, so I understand it will not be the most optimal way for CheckMK (more resource intensive, not as fast… you name it)

The other option is to create a SNMP plug-in (https://docs.checkmk.com/latest/en/devel_check_plugins_snmp. html), where I have also managed to get it to work

Here is where my doubts come:

  • If I do it through the Nagios agent, it is easy to deploy it to all those hosts, since I assign the nagios “check” to the folder where the IoT devices are and the service is generated with the OID value retrieved

  • If I do it through the SNMP plug-in, I have to enable it from the Checkmk server by CLI

My question is:

  • is there a way to manage this SNMP plug-in from WATO? Check_MK_Discovery should handle this iirc, but since it does a full snmpwalk it times-out)

  • Is there a way to restrict this plugin only to apply to certain hosts? (I understand that by host tags, but I’ve tried multiple iterations unsuccessfully)

The SNMP plug-in only checks certain OIDs for Mikrotik, Teltonika and Cinterion brands, but since this is working correctly my doubts come from how to massive “manage” this service as this will escalade in the near future :frowning:

If you use the enterprise edition with CMC core enabled then these old “Nagios” checks will also utilize the CMC core and don’t start any Nagios.
It is more work from config standpoint as you see in your screenshot with the many rules.

Not really, if your plugin has a proper discovery function, the plugin should be found for your devices thru the “Check_MK Discovery” service.
If you do the “cmk -vI” without the “detect-plugin” option is your check then found on the device?

Here you should/must use the rule “disable SNMP sections” for the folder with your devices to switch of all SNMP sections you don’t want to discover.

If you use the enterprise edition with CMC core enabled then these old “Nagios” checks will also utilize the CMC core and don’t start any Nagios.
It is more work from config standpoint as you see in your screenshot with the many rules.

Ohh okay, good to know; sorry for the dumb assumption then, been using Nagios core for a while and currently doing the transition to cmc core x)

Not really, if your plugin has a proper discovery function, the plugin should be found for your devices thru the “Check_MK Discovery” service.
If you do the “cmk -vI” without the “detect-plugin” option is your check then found on the device?

This wasn’t working correctly from my plugin (first time lol), with cmk -vI I had no plugin detected (SNMP timeout since I’m not disabling SNMP sections and I wasn’t filtering correctly on the “detect” plugin:

Editing my plugin fixed this behaviour

Here you should/must use the rule “disable SNMP sections” for the folder with your devices to switch of all SNMP sections you don’t want to discover.

Ookay, this was the one rule I was missing, if i configure it correctly now all works as expected

So for this SNMP Section to be deployed to a folder, just enabling that SNMP section for that folder and ignoring the rest works fine (there’s no option just for only enable 1 section and ignore the rest I suppose)

Thanks a lot Andreas :blush: