[Check_mk (english)] Assign host labels based on existing services

I don’t know if I am just doing it wrong or I don’t understand the labels feature…

I created a Predefined condition (CondA) to match services that start with a certain name, for example “IIS_Whatever”

I then created a Service labels rule that uses Predefined condition == CondA to add service label srv:whatever

I then created Predefined condition (CondB) to match services with tag srv:whatever

And finally created a Host labels rule that uses Predefined condition == CondB to add host label app:whatever

The first part works fine: I can see the proper services tagged.

But when I try to search for hosts with the label app:whatever, I get all my servers back, including those that don’t have that app running.

Is it possible to chain conditions that way or I just misunderstood how this works?

In the end I want a way of filtering hosts by services they’re running, because we have a pool of servers where we run multiple apps, and some of them are on 4 servers, some on 2, some on 6…

You cannot use conditions that match services on rules for hosts.

Regards

···

On 15.11.19 13:04, NublaII Lists wrote:

I then created *Predefined condition* (CondB) to _match services_ with
tag /srv:whatever/

And finally created a *Host labels* rule that uses *Predefined condition
== CondB* to add _host_ label /app:whatever/

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

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

Amtsgericht Berlin-Charlottenburg - HRB 93818 B
Geschäftsführer: Peer Heinlein - Sitz: Berlin

Fair enough. It would be something really nice to have.

Nonetheless I think this should be documented.

Thanks!

···

On Fri, Nov 15, 2019 at 1:27 PM Robert Sander r.sander@heinlein-support.de wrote:

On 15.11.19 13:04, NublaII Lists wrote:

I then created Predefined condition (CondB) to match services with

tag /srv:whatever/

And finally created a Host labels rule that uses *Predefined condition

== CondB* to add host label /app:whatever/

You cannot use conditions that match services on rules for hosts.

Regards

Robert Sander

Heinlein Support GmbH

Schwedter Str. 8/9b, 10119 Berlin

https://www.heinlein-support.de

Tel: 030 / 405051-43

Fax: 030 / 405051-19

Amtsgericht Berlin-Charlottenburg - HRB 93818 B

Geschäftsführer: Peer Heinlein - Sitz: Berlin


checkmk-en mailing list

checkmk-en@lists.mathias-kettner.de

Manage your subscription or unsubscribe

https://lists.mathias-kettner.de/cgi-bin/mailman/listinfo/checkmk-en