Bulk move of hosts after search by host label

Checkmk 2.0.0p22.cre on Oracle Linux

Hi all,

I have some tens of hosts with an host label applied by a rule and I need to move that hosts from where they are to another folder.
I used the “hosts search” function on “Monitor” and I’m able to find all hosts with that label applied but I can’t move it because there isn’t a move function on “Command” menù under “Hosts search”.

I’m doing something wrong?

You need to do that kind of operations under WATO/Setup.
Wato/Setup - Hosts - Display - Search Hosts - Apply the label filter
Then choose all the hosts and → Hosts → Move to another folder.

Hi ricardo,
this search seems to work only on “service labels” not on “host labels”

Yes, that’s exactly what I’m doing.
But if I search using a “service label” I get results, if I search using a “host label” I get no results.

Instead, using “Host search” from “Monitor” and I filter using “host Labels” I get expected hosts but there is not the ability to move them.

That’s a weird behavior. I’m still using a lower version than yours (p13) and it works as expected.

I’ve just noticed something you said (my mistake!) - you affect hosts labels by rules.
You can’t search for those.
Try to search for the hosts by the same criteria that you use to define in rule.

In WATO you can only search for hosts that you registered “hardcoded” labels.

Azz…
I can’t do it because I made the rule adding tens of hostnames and label it (not using an attribute, for example). So “host label” rules simply match tens of hostname not some attributes I can use to refine the search in WATO.

I need to move to the same folder all hosts which are running on the same vmware cluster: Sadly, vm’s name and hostame in check_mk often didn’t match so I haven’t an attribute I can use to find them and I thought to this workaround.

Well I think I’ll try to add a service label to the “Check_MK” service and I’ll use it to do the job

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.