... h6. Contents This page provides an overview of hosts and related components. We'll review how host definitions are interrelated throughout various configuration objects and the setting up of host objects. We'll start with an explanation of each of the host objects, the walk through how to define a host and use a host template, use the host wizard, and delete hosts. {toc:minLevel=4|maxLevel=4|printable=false} h4. About Hosts !managing_hosts_1.gif! A host is a physical entity. A physical server, workstation, device, etc. that resides on your network. Services are the logical entities that hosts provide. A host definition stores its _Name_, _Alias_, and an _IP Address_ along with a required *Host Template* definition, and optional definitions including *Host* and *Service Profiles*, *Extended Host Info*, *2d/3d* *Status Map Coordinates*, and *Host* and *Service Escalation Tree* definitions. One or more *Parent Hosts*, and *Host Groups* can be assigned to a host definition. Services are included through the use of host and service profiles, however individual *services* can also be added, modified, or removed within a host definition. The bulleted items below describe the host definition components in more detail. A _Host Template_ is the only required object, all others are optional. h5. Host Objects * *Host Templates* \[{color:red}required{color}\] - Stores common object properties that are used to define multiple hosts. _GroundWork Monitor_ ships with the template; _generic-host_. * *Host and Service Profiles* \- Aid in the design and management of hosts and services. Service profiles are made up of multiple service definitions, and host profiles can incorporate service profiles. * *Parents* \- Are typically routers, switches, firewalls, etc. that lie between the monitoring host and a remote host. * *Host Groups* \- An arbitrary collection of hosts into named sets. The usage of host groups simplifies access control, drawing layering, status displays, notifications, scheduling maintenance, multi-server commands, and reports. * *Extended Host Info* \- Entries are basically used to make the output from the status, statusmap, statuswrl, and extinfo CGIs look good. * *2d and 3d Status Coordinates* \- Are optional and define the host's position in the _Nagios_ 2d status map. 3d status coords are optional and define the host's positions in the _Nagios_ 3d status map. * *Host and Service Escalation Trees* \- Are used to escalate contact notifications for a particular service, host, or host group. * *Services* \- These are predefined service definitions included in hosts, and service and host profiles. h4. Creating New Hosts *Hosts* are used to define a physical server, workstation, device, etc. that resides on your network. *Host Templates* store common object properties that are used to define multiple hosts. Templates are used to reduce the number of repetitive entries when defining objects. For example, when defining a new host you would first create a host template with common properties. Then, to define a specific host, you apply the properties using a host template. Note that _GroundWork Monitor_ does provide a _generic-host_ template. Let's first define a new host template, and then use the _New Host Wizard_ to create a new host using a template. Select the _screenshot_ icon below to view the host template page. h5. Defining a Host Template # Select Configuration > *Hosts*, *Host Templates*, and *New*. # In the *Host Template Properties* screen, enter a *Name* for the new host template. Continue by entering a check for selected template properties. By selecting the {color:#ff7f00}*?*{color} question mark next to each field you can view a description of the directive which also indicates if it is required or optional. Host templates also enable you to define and manage optional [custom object variables|http://nagios.sourceforge.net/docs/3_0/customobjectvars.html]. # When finished defining template properties and any custom object variables, select *Save*. Now that we have a new host template, you can use the New Host Wizard feature to create a new host using this template. \\ \\ Figure: Host Template !managing_hosts_2.jpg|border=1! h4. Creating a New Host using the New Host Wizard When creating a new host there are many objects that can be configured into a host definition. However after providing a _Name_, _Alias_, and _IP Address_, a _Host Template_ is the only required object, all others are optional. Below, each of the five host property screens are described in detail. h5. Defining a New Host # Select Configuration > *Hosts*, and *Host wizard* which will display the first screen, *Host Vitals*. # In this screen, enter a *Name* for the new host, an *Alias* as a name to identify the host, and an *IP address* for the new host. The _Host Profile_ option applies a set of pre-defined services to a host. We will cover _Host Profiles_ in another section. Optionally enter *Notes*. This field is intended to hold a free-text description of this item. It is displayed in the Status application, and can be included in notifications via the $HOSTNOTES$ macro. It is commonly used to provide additional information about the item such as the team in charge of maintenance, the asset tag, or other identifying data. And, optionally select a *Host Profile* which can be used to aid the design and management of hosts. # Select *Next* which will display the _Host Properties 1_ screen. \\ \\ Figure: Defining a new host !managing_hosts_3.jpg|border=1! {anchor:HostProperties1} # In the Host Properties 1 screen we can select our previously defined *Host Template*, which will apply all of the directive settings from the template to our new host. _Parents_ are typically routers, switches, firewalls, etc. that lie between the monitoring host and a remote host. A host can be assigned to one or more parent hosts. We will visit the _Parents_ option in another section. Select *Next* to go to the _Host Properties 2_ screen. \\ \\ Figure: Host Properties 1 !managing_hosts_4.jpg|border=1! {anchor:HostProperties2} # _Host Groups_ are an arbitrary collection of hosts into named sets. The usage of host groups simplifies access control, drawing layering, status displays, notifications, scheduling maintenance, multi-server commands, and reports. Here you can add host groups for this host, in other words this host will be a member within the selected host groups. You will get a warning message during a _Pre Flight Test_ or _Commit_ if a host is not a member of any host group. Select and *add a host group for this host*. Select *Next* to go to the *Select Services* screen. \\ \\ Figure: Host Properties 2
|
... There is an easy way to delete one, many, or all hosts. The *Delete Hosts* tool completely removes the host, it's associated services, and any reference such a a membership in host groups, service groups, groups, and profiles. h5. Deleting Hosts # Select *Hosts* from the _Configuration_ page. # Select *Delete hosts*. # Next, in the *Delete Hosts* screen, select from the list of abbreviated host names and host addresses. For example, selecting "" lists all hosts, and 1\* will list all hosts with an IP address that starts with the number 1. Example: If you used _Discover_ to import hosts and learned that you imported a number of hosts beginning with "lab", you can select "lab" to list the specific hosts to be removed. # Once a host abbreviation is chosen the available hosts will be displayed. Select the check box next to each host to be removed. # Select *Delete*. Choose *Check All* and *Delete* to remove all hosts. {Note}If you select "*" to list all hosts and you select _Check All_ to remove all hosts, the system will consider this action as an invalid configuration with no hosts and services. This should be avoided.{Note} {Note}You will need to select *Control>Commit*, to complete the task of removing a host.{Note} {Note}Also, you can use the _Configuration_ option *Hosts* in the _Detail_ screen to accomplish the same task one host at a time.{Note}Figure: Delete multiple hosts !managing_hosts_7.jpg|border=1!
|