Host templates are similar to Service Groups in that they allow for the logical grouping of Service Checks into a single container; a ‘Host template’.
Unlike with Service Groups, a Service Check can be part of more than one Host template. This means you can create a Host template with Service Checks from one or more Service Groups.
These Host templates can then be *applied *to one or more Hosts. This means that if you need to apply 10 Service Checks to 1,000 standard hosts, you can create and apply a new Host template containing the 10 Service Checks, to all 1,000 hosts via a single screen.
This means that all Hosts that have the aforementioned Host template applied will inherit the Service Checks set within the template. This allows you to add Service Checks to one Host Template, knowing they will be applied to every host, be it one or 1,000 hosts, that have the Host Template. In the future, if you need to add another five Service Checks to all the hosts, you can simply edit the Host template, add the five Service Checks. Once you have confirmed those changes by using Configuration > Apply Changes, all Hosts that have the Host Template will have the Service Checks applied.
Host Templates also allow for the addition of icons and management URL’s:
Used solely within Business Service Monitoring; the icon uploaded is displayed on the dashboard when a Component is created using the host template.
Management URLs are used to put extra entries onto the contextual menus for Hosts using a given template. Examples include SSH, Telnet and more. These management URLs are created in the Host template, and then appear in the contextual menus of Hosts that have the Host template applied.
The addition, removal and modification of Host templates is all done via the Configuration > Host Templates menu.
Once within the Host Templates window, you can click on the ‘Add New’ button in the top left:
Clicking the ‘Add New’ button will load the modal window as shown below.
The Host Template tab is a very simple one containing only three fields:
The name of the Host Template. This is what will be visible within the Host edit window.
A friendly, more detailed text field outlining what the Host Template does ’ or what Hosts it should be applied to, etc.
The Hosts who should have this Host template applied. Select from the left box (all) to the right box (selected Hosts).
The Service Checks tab is where you can choose which service checks are part of the template.
From a host template perspective, you should check the service checks you wish to be part of this host template using the tree structure on the left hand side. A counter at the top, i.e. ‘All Selected (3)’, will display the number of service checks within the host template.
To change the default arguments for the service check, i.e. ‘Apache Solr ’ System Memory’ in the screenshot above, simply check the ‘Exception’ field ’ which will allow the arguments to be edited. These edited arguments will be pushed down to all hosts who have this host template added. Editing the timed exception works on the same basis.
To add an event handler to this service check simply check the ‘Event handler’ checkbox and complete as required.
The Management URLs tab allows you to add extra entries onto the contextual menus for Hosts using a given template. Examples include SSH, Telnet and more. These management URLs are created in the Host template, and then appear in the contextual menus of Hosts that have the Host template applied.
In the example above, we have created a new management URL called ‘Web URL’, which will appear as a clickable link in the host contextual menu for any Host that has the template applied. When this link is clicked, it will open up a new browser tab and go to
http://ip-of-the-host:80880. The IP or hostname will be populated based on the host, i.e. if the template is applied to a Host with the ‘Primary Hostname / IP’ of 192.168.0.1, then the contextual menu item ‘Web URL’ when clicked will navigate to ‘http://192.168.0.1:8080’.
The ‘Icon’ tab allows for the uploading of a png, jpeg or gif image. The maximum supported file size is 5MB and, after uploading, will be converted to 100x100 40x40 and 20x20 png for previewing. The aspect ratio will be retained and a transparent background will be applied. You may use an image with a transparent background.
To upload an image simply click on ‘Browse’, find the image file on your computer and click OK. Then finally click ‘Upload’ and the image will be added.
Once you have provided all the necessary information, the new Host Template row will be highlighted, indicating that you must go to Configuration > Apply Changes, so that all Hosts containing the new Host Template start being actively monitored with the newly applied setup.
You can make any change to your Host template, by simply clicking on the contextual menu of the Host template and click on Edit:
After clicking Edit, the modal window will load for the Host Template details:
Once you are done with your modifications, click Submit Changes.
To delete a Host Template, simply click on the contextual menu of the Host Template and click on Edit:
After clicking on Delete, a modal window will appear asking you to confirm.
Simply click on OK and the Host template is deleted. If any Hosts were using the Host Template and thus the Service Checks from within the Host template, then those Service Checks will be removed from the Hosts in question.
If the Host Template is being used by a ‘BSM Component’, then it cannot be deleted until the Component is deleted or is using a different Host template. If you attempt to delete a Host Template that is used by a BSM component, you will see the ‘Delete’ button is disabled and a tooltip message will appear: