Using mass update

Similar to items, a mass update can also be used for hosts, and we've already used it a couple of times. Let's explore in more detail what functionality mass update might offer here. Go to Configuration | Hosts. In the hosts list, mark the checkboxes next to A test host and Another host and click on the Mass update button at the bottom. Then switch to the Templates tab and mark the Link templates checkbox.

Selecting a template is done the same way as in the host properties; we can either type and search by that substring, or click on the Select button to choose from a list. We may specify multiple templates in that field, and there is no extra control to click like in the host properties—we had to click on Add there. In this form, it is enough to have the template listed in the first field. Switching between mass update and updating an individual host can be quite challenging as these forms work differently—be very, very careful.

There are also two checkboxes. Before we discuss what they do, let's figure out what happens by default. If we list a template or several and then update the configuration, that template is linked to all selected hosts in addition to the existing templates. The existing ones are not touched in any way. The checkboxes modify this behavior:

A short overview of the options we have:
  • Replace: Existing templates are unlinked. As before, any entities coming from those templates are not touched. Items, triggers, and everything else that was controlled by that template stays on the host. If the templates we had specified in this form have items with the same keys, such items are be linked to the new templates.
  • Clear when unlinking: Existing templates are unlinked and cleared—that is, anything coming from them is deleted. It's almost like clearing the host, except that directly-attached entities would not be touched; only templated entities are affected.

Of course, if there are any conflicts, such as the same item key being present in two templates, such a linkage would fail.

We will not modify the template linkage at this time, so click on the Cancel button here.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.255.134