SNNP Plugin - DHCP Scope


I’m new to create my own plugins.
I want to create a plugin where I get the DHCP Scope from some firewalls.
I already know which OIDs I need etc…
Reading the “writing your own check plug-ins” document is not helping me much.

This is currently what I have, I tried to import on the ~local/bin/check_mk/based/plugins/agent_based

    name = "DHCP Scope",
    detect = startswith(".", "T30"),
    fetch = SNMPTree (
        base = '.',
        oids = [

I must be doing something wrong, I don’t know where to find this service or if I’m importing it in the right place.

The small code part is only the registering of an data section for SNMP.
You define there only what data should be fetched from a device matching the detect condition.

Now the next step is to write you discovery and check function.
A complete plugin looks like the example under “2.9. The complete plug-in at a glance” plus your registering of an snmp section.

The linked example here is a complete SNMP check with all needed parts.

It is not to complicated. Only the detect part is imported from external.