Discussion:
[Check_mk (english)] check_parameters with Service exclude
Patrick Kaiser
2018-09-26 06:27:54 UTC
Permalink
Hi,

I’ve created a plugin for monitoring dynamically every RabbitMQ queue in our environment.
The plugin on the client side works fine and provides the output.

On the monitoring server I’ve created the extension to handle this agent output data, which is also working fine.

At least I’ve also created a register_check_parameters definition to be able to use a rule to overwrite the default_values.

It is in the file: /opt/omd/site/knt/local/share/check_mk/web/plugins/wato/rabbit_mq_check_parameters.py:

register_check_parameters(
subgroup_inventory,
"rabbit_mq",
_("RabbitMQ Queue Monitoring"),
Dictionary(
elements = [
("warn_messages",
Integer(
title = _("Warning if above"),
default_value = 5,
),
),
("crit_messages",
Integer(
title = _("Critical if above"),
default_value = 10,
),
),
],
),
None,
'dict',
)



Now I have the problem, when I want to create a rule inside WATO I am not able to limit to specific services, only to specific hosts
(See the „Explicit hosts“ option)




Mit freundlichen GrÌßen

Patrick Kaiser
Senior System Administrator






CHECK24 Vergleichsportal Karten & Konten GmbH
Erika-Mann-Str. 62-66 | 80636 MÃŒnchen
Tel. 089 2000 47 5411 | Fax 089 2000 47 1011
***@check24.de | www.check24.de


GeschÀftsfÌhrer: Rainer Gerhard | Amtsgericht MÌnchen HRB 231529 | UST Ident Nr.: DE 310 935 564

Versicherungen | Konto & Kredit | Strom & Gas | DSL & Handy | Reise & Flug | Hotel | Mietwagen | Shopping
Robert Sander
2018-09-26 07:40:52 UTC
Permalink
Post by Patrick Kaiser
register_check_parameters(
    subgroup_inventory,
    "rabbit_mq",
    _("RabbitMQ Queue Monitoring"),
    Dictionary(
        elements = [
            ("warn_messages",
                   Integer(
                       title = _("Warning if above"),
                       default_value = 5,
                   ),
             ),
             ("crit_messages",
                   Integer(
                       title = _("Critical if above"),
                       default_value = 10,
                   ),
             ),
         ],
    ),
    None,
    'dict',
)
Now I have the problem, when I want to create a rule inside WATO I am
not able to limit to specific services, only to specific hosts
(See the „Explicit hosts“ option)
You need to replace the "None" with an input field definition for your
item. E.g.: TextAscii(title=_('RabbitMQ queue name'))

If you pass a None at that paramtere position, WATO registers the
parameter rule as a host rule, not a service rule.

Regards
--
Robert Sander
Heinlein Support GmbH
Schwedter Str. 8/9b, 10119 Berlin

http://www.heinlein-support.de

Tel: 030 / 405051-43
Fax: 030 / 405051-19

Zwangsangaben lt. §35a GmbHG:
HRB 93818 B / Amtsgericht Berlin-Charlottenburg,
GeschÀftsfÌhrer: Peer Heinlein -- Sitz: Berlin
Continue reading on narkive:
Loading...