Hi,
I’m trying to create a custom plugin that will dynamically create host labels based on the content of a given SNMP OID (sysDescr). A more advanced version of the way some defaults are set with SNMPDeviceType (but I need to match against things including spaces and hyphens)
I’ve been able to create a basic plugin which does this; with the list of string to look for / labels to create are stored in the check itself.
I’d like to move this list to being WATO configurable, but I can’t see how to pass the list of parameters to the host label function.
A check has check_default_parameters
, and the check function can be passed params
and I can find a reference to host_label_default_parameters
in the definition for snmp_section
; However I can’t see how to pass parameters to the host_label_function
as the documentation says “It must accept exactly one argument by the name ‘section’.”
Any ideas how WATO parameters can be passed to the label function?