Tags or Labels Query

I want to create a temp label or tag which I can add to a number of hosts before pushing out a new agent so this is done in groups/stages.

It seems when I try to bulk edit and add a new label to a group of hosts it overwrites any labels that it currently has - is this correct?

If so what is the best way to edit and add a new ‘temp’ label to a group of hosts and not overwrite any current labels.

Any ideas would be great thanks.

Hi.
The best way to set label to prevent lost of existing ones is to use the RestAPI for host config.
Rg, Christian

To limit the hosts we use folders but maybe not applicable in your setup. May you think about using Tags. We dont use labels because they can get lost as you already recognized.

regards

Mike

alternatively add the label using the “Host labels” rule. We use that way sometimes as this way it’s easy to use other conditions like tags/folder/hostname/hostnames via regex to slowly fill the temp label with more and more hosts during agent deployment and then have one place (maybe with multiple rules) to simply delete the temp label again :slight_smile:

If you mean you have labels that comes from a WATO folder(s) and when you set labels directly pn the host you remove all previous labels?

Thats not correct, it just looks like it. When you set the labels you want you can still look at the host in a host view and you will see all labels, including those set by WATO or by rules.

If you have agent bakery and automatic updates I think your method is valid and a good one, that you set labels in batches so the agent is baked and updated in stages.

I do not think all agents will check for updates however at the same time, as this might be dependent on when the agent was started.

One appeared to be deleted from a host when I went back into the host configuration and couldn’t see the previous label. Instead I only saw the one I updated with.

I am now testing by using a tag instead. I created a new tag and I’m just bulk selecting to specific hosts at a time to push the agent update out with.

I guess the only thing with this way is I’ll need to eventually remove the tags and bake into a new agent again for all hosts? Which will mean a new one will be pushed out again for all hosts is that right?

Surely there is a better way to do this. Otherwise I’ll need to keep that tag or label always attached to all hosts.

not sure who you responded to, if any but what you said makes no sense

1 Like

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.