[Check_mk (english)] How to create a "settings" page for a custom check in WATO?

Andreas Döhler andreas.doehler at gmail.com
Wed Feb 15 08:49:56 CET 2017

Hi Antti,

you can create your own settings for WATO inside
/local/share/check_mk/web/plugins/wato folder.
I will paste an example from one of my checks.

    _("Windows System Certificates"),
              title = _("Time left for installed certificates before renew
is needed"),
              help = _("This rule sets the days before a certificate needs
              elements = [
                  Integer(title = _("Warning at"), unit = _("days"),
default_value = 30),
                  Integer(title = _("Critical at"), unit = _("days"),
default_value = 15)

Inside your check you need to define the "check_group"
check_info['win_cert'] = {
    "inventory_function"    : inventory_win_cert,
    "check_function"        : check_win_cert,
    "group"                 : "win_cert",
    "service_description"   : "System Certificates",

This group must match your definition inside the WATO rule.

Best regards

Mäkelä, Antti <Antti.Makela at vintor.fi> schrieb am Mi., 15. Feb. 2017 um
08:19 Uhr:

> Hi,
>   I've created a few custom checks for our purposes. Now, for the I've
> built something that would need an easy way to parametrize.
>   I've done a (basically) simple check that just looks at ip-forwarding
> MIB (SNMP) to check if a route exists in a routing table of a device
>   The check accepts two parameters: What routing protocols and subnets to
> inventorize (according to the MIB). The check then returns whether the
> route exists (OK) or not (UNKNOWN, I'm thinking about making that
> configurable as well to return either CRIT or UNKNOWN). I can specify such
> parameters in rules.mk, but how can I include this stuff in WATO
> configuration pages?
>   I've looked into the documentation (e.g.
> http://mathias-kettner.com/checkmk_devel_factorysettings.html) and while
> they cover writing the checks quite well, adding them to WATO doesn't seem
> to be covered.
>   I found a huge (416k) file check_parameters.py that seems to include the
> Wato rules structure that has a ton of register_check_parameters calls, can
> we include such a call in our own checks?
>   Thanks.
> --
> - Dr. Antti Mäkelä | Senior Architect | CCIE #20962 -
> - Vintor Oy, Itsehallintokuja 6, 02600 Espoo | www.vintor.fi -
> _______________________________________________
> checkmk-en mailing list
> checkmk-en at lists.mathias-kettner.de
> http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mathias-kettner.de/pipermail/checkmk-en/attachments/20170215/e73b2379/attachment-0001.html>

More information about the checkmk-en mailing list