--- GW IMAGE NOT DISPLAYED --- Configuring Hosts

Copyright 2006 GroundWork Open Source, Inc. (“GroundWork”).
All rights reserved. Use is subject to GroundWork commercial license.

Contents

Configuring Hosts


--- GW IMAGE NOT DISPLAYED --- How Do I Define a New Host?


Step 1 – Host Vitals

  1. Select Hosts from the Configuration menu options.
  2. Select Host Wizard.
  3. In the Host Wizard screen, enter the properties (see Table 5.5.1a. below).
  4. Select Next to go to the Host Properties 1 screen.

    Note: To copy an existing Host select Clone from the Hosts options. This will let you name a new Host, provide the IP address, and then attach an existing Host’s properties. You can then edit and save the new Host. To find an existing Host you can use the Search host option under Hosts. Here you can enter the Host name or address. A list of matching Hosts will be displayed. Typing in just one or a series of characters will provide you with all Hosts that start with the specified sequence.

    Figure 5.5.1a. Host Vitals

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.5.1a. Host Vitals

    Name [Required] Name of Host.
    Alias [Required] This directive is used to define a longer name or description used to identify the Host. It is provided in order to allow you to more easily identify a particular Host.
    Address [Required] This directive is used to define the address of the Host. Normally, this is an IP address, although it could really be anything you want (so long as it can be used to check the status of the Host). You can use a FQDN to identify the Host instead of an IP address, but if DNS Services are not available this could cause problems. When used properly, the $HOSTADDRESS$ macro will contain this address. Note: If you do not specify an address directive in a Host definition, the name of the Host will be used as its address. A word of caution about doing this, however – if DNS fails, most of your Service checks will fail because the plugins will be unable to resolve the Host name.
    Host Profile [Optional] Host Profiles can be used to aid the design and management of Hosts.

Step 2 – Host Properties 1

  1. In the Host Properties 1 screen enter the properties (see Table 5.5.1b. below).
  2. Select Next to go to the Host Properties 2 screen.

    Figure 5.5.1b. Host Properties 1

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.5.1b. Host Properties 1

    Name Named Host.
    Host Template [Required] Select the Host template most suitable for this Host.
    Parents [Optional] Assign this Host one or more parents. Parent child relationships may also be managed via Hosts>Parent Child.

Step 3 – Host Properties 2

  1. In the Host Properties 2 screen enter the properties (see Table 5.5.1c. below).
  2. Select Next to go to the Select Services screen.

    Figure 5.5.1c. Host Properties 2

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.5.1c. Host Properties 2

    Host Groups [Optional] Assign this Host one or more Host Groups. Host Groups may also be managed via Hosts>Host Groups.
    Extended Host Info [Optional] Defines extended Host information for this Host profile. The template controls the icon and url link as seen in Nagios®.
    2d Status Map Coords [Optional] Defines the Host’s position in the Nagios® 2d status map. Coordinates should be given in positive integers, as they correspond to physical pixels in the generated image. The origin for drawing (0,0) is in the upper left hand corner of the image and extends in the positive x direction (to the right) along the top of the image and in the positive y direction (down) along the left hand side of the image. For reference, the size of the icons drawn is usually about 40×40 pixels (text takes a little extra space). The coordinates you specify here are for the upper left hand corner of the Host icon that is drawn. Note: Don’t worry about what the maximum x and y coordinates that you can use are. The CGI will automatically calculate the maximum dimensions of the image it creates based on the largest x and y coordinates you specify.
    3d Status Map Coords [Optional] Defines the Host’s position in the Nagios® 3d status map. Coordinates can be positive or negative real numbers. The origin for drawing is (0.0,0.0,0.0). For reference, the size of the Host cubes drawn is 0.5 units on each side (text takes a little more space). The coordinates you specify here are used as the center of the Host cube.
    Host Escalation Tree [Optional] Select an escalation tree appropriate for this Host. To avoid amplified notifications (i.e. multiple notifications for the same event), a Host escalation assigned to this Host should not also be assigned to a Host Group in which the Host is a member.
    Service Escalation Tree [Optional] Select an escalation tree appropriate for Services on this Host. When a Service escalation is assigned to a Host, all Services on that Host use the same escalation tree. To avoid amplified notifications (i.e. multiple notifications for the same event), a Service escalation assigned to a Service name should not also be assigned to the Host or the Host Group.

Step 4 – Select Services

  1. In the Select Services screen enter the properties (see Table 5.5.1d. below).
  2. Select Next to proceed to the final screen.

    Figure 5.5.1d. Select Services

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.5.1d. Select Services

    Service Profiles This is the list of Service Profiles that have been added to this Host.
    Include/Modify/Discard Service Name You will see a list of Services are derived from the Service Profile (if one was selected) in the last step. Each Service has an option to Include/Modify/Discard. Include accepts this Service as is with its default settings. Modify accepts this Service but prompts for changes. Discard does not include this Service on this Host. Add Profile adds additional Service profiles to this Hosts. Add to list adds a Service not included in the profile.
    Select Service Profile [Optional] Select additional Service Profiles to add to this Host.
    Select Other Services [Optional] Select other Services to add to this Host. Click on Service and select Add to List.

Step 5 – Final Screen

  1. On the final New Host Wizard screen, select Save as Profile to complete the process and save the new Host as a Host Profile, select Save on the next screen to save the Profile. Select Continue to begin again at the Host Vitals screen to reconfigure the new Host.

    Figure 5.5.1e. Final Screen

    --- GW IMAGE NOT DISPLAYED ---

Configuring Hosts


--- GW IMAGE NOT DISPLAYED --- How Do I Configure a Host Template?


Step 1 – Host Template Properties

  1. Select Hosts from the Configuration menu options.
  2. Expand the Host Templates drop-down menu.
  3. Select New.
  4. In the Host Template Properties screen, enter the properties (see Table 5.5.2a. below).
  5. Select Add to add the new template.

    Note: To copy an existing template select Copy from the Host Template options. This will let you name and edit the copied properties for a new template. To modify or delete a template select Modify. You will then be able to edit and Save a modified template. Select Delete to remove a selected template, Rename to change the name, or Cancel to exit out without any changes.

    Figure 5.5.2a. Host Template Properties

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.5.2a. Host Template Properties

    Name [Required] Name of Host Template.
    Process Perf Data [Optional] This directive is used to determine whether or not the processing of performance data is enabled for Hosts using this template. Values: Unchecked disable performance data processing, Checked enable performance data processing.
    Retain Status Information [Optional] This directive is used to determine whether or not status-related information about the Host is retained across program restarts. This is only useful if you have enabled state retention using the retain_state_information directive. Value: Unchecked disable status information retention, Checked enable status information retention.
    Flap Detection Enabled [Optional] This directive is used to determine whether or not flap detection is enabled for Hosts using this template. Values: Unchecked disable Host flap detection, Checked enable Host flap detection.
    Low Flap Threshold [Optional] This directive is used to specify the low state change threshold used in flap detection for Hosts using this template. If you set this directive to a value of 0, the program-wide value specified by the low_host_flap_threshold directive will be used.
    High Flap Threshold [Optional] This directive is used to specify the high state change threshold used in flap detection for Hosts using this template. If you set this directive to a value of 0, the program-wide value specified by the high_host_flap_threshold directive will be used.
    Retain Nonstatus Information [Optional] This directive is used to determine whether or not non-status information about the Host is retained across program restarts. This is only useful if you have enabled state retention using the retain_state_information directive. Value: Unchecked disable non-status information retention, Checked enable non-status information retention.
    Active Checks Enabled This directive is used to determine whether or not active checks (either regularly scheduled or on-demand) of this Host are enabled. Values: Unchecked disable active Host checks, Checked enable active Host checks.
    Passive Checks Enabled This directive is used to determine whether or not passive checks are enabled for this Host. Values: Unchecked disable passive Host checks, Checked enable passive Host checks.
    Obsess Over Host This directive determines whether or not checks for the Host will be ‘obsessed’ over using the ochp_command (defined in Nagios® main configuration). Checked is enabled
    Check Freshness This directive is used to determine whether or not freshness checks are enabled for Hosts using this template. Checked enable freshness checks.
    Freshness Threshold This directive is used to specify the freshness threshold (in seconds) for Hosts using this template. If you set this directive to a value of 0, Nagios® will determine a freshness threshold to use automatically.
    Check Command Host templates: Optional. This directive is used to specify the short name of the command that should be used to check if the Host is up or down. Typically, this command would try and ping the Host to see if it is ‘alive’. The command must return a status of OK (0) or Nagios® will assume the Host is down. If you leave this argument blank, the Host will not be checked – Nagios® will always assume the Host is up. This is useful if you are monitoring printers or other devices that are frequently turned off. The maximum amount of time that the notification command can run is controlled by the host_check_timeout option.
    Max Check Attempts [Required] This directive is used to define the number of times that Nagios® will retry the Host check command if it returns any state other than an OK state. Setting this value to 1 will cause Nagios® to generate an alert without retrying the Host check again. Note: If you do not want to check the status of the Host, you must still set this to a minimum value of 1. To bypass the Host check, just leave the check_command option blank.
    Check Interval [Optional] Note: Do NOT enable regularly scheduled checks of a Host unless you absolutely need to! Host checks are already performed on-demand when necessary, so there are few times when regularly scheduled checks would be needed. Regularly scheduled Host checks can negatively impact performance. This directive is used to define the number of “time units” between regularly scheduled checks of the Host. Unless you’ve changed the interval_length directive from the default value of 60, this number will mean minutes.
    Event Handler Enabled [Optional] This directive is used to determine whether or not the event handler for Hosts using this template is enabled. Values: Unchecked disable Host event handler, Checked enable Host event handler.
    Event Handler [Optional] This directive is used to specify the short name of the command that should be run whenever a change in the state of the Host is detected (i.e. whenever it goes down or recovers). The maximum amount of time that the event handler command can run is controlled by the event_handler_timeout option.
    Notifications Enabled [Optional] This directive is used to determine whether or not Notifications for Hosts using this template are enabled. Values: Unchecked Disable Host Notifications, Checked Enable Host Notifications.
    Notification Interval [Required] This directive is used to define the number of ‘time units’ to wait before re-notifying a contact that this server is still down or unreachable. Unless you’ve changed the interval_length directive from the default value of 60, this number will mean minutes. If you set this value to 0, Nagios® will not re-notify contacts about problems for Hosts using this template – only one problem notification will be sent out.
    Notification Period [Required] This directive is used to specify the short name of the time period during which notifications of events for Hosts using this template can be sent out to contacts. If a Host goes down, becomes unreachable, or recoveries during a time which is not covered by the Time Period, no notifications will be sent out.
    Notification Options [Required] This directive is used to determine when notifications for the Host should be sent out. Valid options are a combination of one or more of the following: Down checked send notifications on a DOWN state, Unreachable checked send notifications on an UNREACHABLE state, and Recovery checked send notifications on recoveries (OK state). If you specify n (none) as an option, no Host Notifications will be sent out. Example: If you specify Down and Recovery, Notifications will only be sent out when the Host goes DOWN and when it recovers from a DOWN state.
    Stalking Options [Optional] This directive determines which Host states ‘stalking’ is enabled for. Valid options are a combination of one or more of the following: Up checked stalk on UP states, Down checked stalk on DOWN states, and Unreachable checked stalk on UNREACHABLE states.
    Contact Groups This is a list of the short names of the contact groups that should be notified whenever there are problems (or recoveries) with this Host.

Configuring Hosts

--- GW IMAGE NOT DISPLAYED --- How Do I Create a New Host Group?


Step 1 – Host Group Properties

  1. Select Hosts from the Configuration menu options.
  2. Expand the Host Groups drop-down menu.
  3. Select New.
  4. In the Host Group Properties screen, enter the properties (see Table 5.5.3a. below).
  5. Select Add to save the new Host Group.

    Note: To copy an existing Host Group select Copy from the Host Groups options. This will let you name and edit the copied properties for a new Host Group. To modify or delete a Host Group select Modify. You will then be able to edit and Save a modified Host Group. Select Delete to remove a selected Host Group, Rename to change the name, or Cancel to exit out without any changes.

    Figure 5.5.3a. Host Group Properties

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.5.3a. Host Group Properties

    Name [Required] Name of Host Group. Note: Use a unique Host Group name and do not label Host Groups and Contact Groups the same name.
    Alias [Required] This directive is used to define a longer name or description used to identify the Host Group. It is provided in order to allow you to more easily identify a particular Host Group.
    Members [Required] This is a list of the short names of Hosts that should be included in this Host Group.
    Contact Group [Required] This is a list the contact groups that should be notified whenever there are problems (or recoveries) with any of the Hosts in this Host Group.
    Host Group Escalation ID [Optional] Select the Host Group Escalation Tree applicable to this Host Group (see Escalations>Escalation Trees). (Note Nagios® 2.x users may use this directive or the Host escalation id directive to achieve the same result.)
    Host Escalation ID [Optional] Select the Host escalation tree applicable to this Host Group in (see Escalations -> Escalation Trees). All Hosts in the Host Group receive the same Host escalation.
    Service Escalation ID [Optional] Select the Service escalation tree applicable to this Host Group in (see Escalations -> Escalation Trees). All Services on each Host in the Host Group receive the same Host escalation.

Configuring Hosts

--- GW IMAGE NOT DISPLAYED --- How Do I Create a Parent/Child Relationship?


Step 1 – Parent Child Properties

  1. Select Hosts from the Configuration menu options.
  2. Expand the Parent Child drop-down menu.
  3. Select New.
  4. In the Parent Child screen, enter the properties (see Table 5.5.4a. below).
  5. Select Save to create the Parent/Child Relationship.

    Note: To modify or delete an existing Parent Child relationship Modify. You will then be able to edit and Save a modified relationship. Select Delete to remove a selected Parent Child relationship, or Cancel to exit out without any changes.

    Figure 5.5.4a. Parent Child Properties

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.5.4a. Parent Child Properties

    Parent Host [Required] Name of the Parent Host. Available Hosts will be listed in the drop-down box.
    Children Dependent Child Hosts of the Parent Host. Select the Host and the Add button.

Configuring Hosts

--- GW IMAGE NOT DISPLAYED --- How Do I Create Extended Host Info Templates?


Step 1 – Extended Host Info Template Properties

  1. Select Hosts from the Configuration menu options.
  2. Expand the Host extended info drop-down menu.
  3. Select New.
  4. In the Extended Host Info Template Properties screen, enter the properties (see Table 5.5.5a. below).
  5. Select Add to add the new Extended Host Info Template.
  6. You will be prompted that the template has been saved. Select Continue.

    Note: To copy an existing template select Copy from the Extended Host Info Template options. This will let you name and edit the copied properties for a new template. To modify or delete a template select Modify. You will then be able to edit and Save a modified template. Select Delete to remove a selected template, Rename to change the name, or Cancel to exit out without any changes.

    Figure 5.5.5a. Extended Host Info Template Properties

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.5.5a. Extended Host Info Template Properties

    Name [Required] Name of the Extended Host Info Template.
    Notes URL [Optional] This option is used to define a URL that can be used to provide more information about the Host. If you specify an URL, you will see a link that says ‘Notes About This Host’ in the extended information CGI (when you are viewing information about the specified Host). Any valid URL can be used. If you plan on using relative paths, the base path will the the same as what is used to access the CGIs (i.e. /cgi-bin/nagios/). This can be very useful if you want to make detailed information on the Host, emergency contact methods, etc. available to other support staff. Also, as this is a template, you may use macros $HOSTNAME$ and $HOSTADDRESS$ in the URL.
    Icon Image [Optional] This variable is used to define the name of a GIF, PNG, or JPG image that should be associated with this Host. This image will be displayed in the status and extended information CGIs. The image will look best if it is 40×40 pixels in size. Images for Hosts are assumed to be in the logos/ subdirectory in your HTML images directory (i.e. /usr/local/nagios/share/images/logos).
    Icon Image Alt [Optional] This variable is used to define an optional string that is used in the ALT tag of the image specified by the <icon_image> argument. The ALT tag is used in the status, extended information and statusmap CGIs.
    VRML Image [Optional] This variable is used to define the name of a GIF, PNG, or JPG image that should be associated with this Host. This image will be used as the texture map for the specified Host in the statuswrl CGI. Unlike the image you use for the <icon_image> variable, this one should probably not have any transparency. If it does, the Host object will look a bit weird. Images for Hosts are assumed to be in the logos/ subdirectory in your HTML images directory (i.e. /usr/local/nagios/share/images/logos).
    Statusmap Image [Optional] This variable is used to define the name of an image that should be associated with this Host in the statusmap CGI. You can specify a JPEG, PNG, and GIF image if you want, although I would strongly suggest using a GD2 format image, as other image formats will result in a lot of wasted CPU time when the statusmap image is generated. GD2 images can be created from PNG images by using the pngtogd2 utility supplied with Thomas Boutell’s gd library. The GD2 images should be created in uncompressed format in order to minimize CPU load when the statusmap CGI is generating the network map image. The image will look best if it is 40×40 pixels in size. You can leave these option blank if you are not using the statusmap CGI. Images for Hosts are assumed to be in the logos/ subdirectory in your HTML images directory (i.e. /usr/local/nagios/share/images/logos).
    2d Coords [Optional] This variable is used to define coordinates to use when drawing the Host in the statusmap CGI. Coordinates should be given in positive integers, as the correspond to physical pixels in the generated image. The origin for drawing (0,0) is in the upper left hand corner of the image and extends in the positive x direction (to the right) along the top of the image and in the positive y direction (down) along the left hand side of the image. For reference, the size of the icons drawn is usually about 40×40 pixels (text takes a little extra space). The coordinates you specify here are for the upper left hand corner of the Host icon that is drawn. Note: Don’t worry about what the maximum x and y coordinates that you can use are. The CGI will automatically calculate the maximum dimensions of the image it creates based on the largest x and y coordinates you specify.
    3d Coords [Optional] This variable is used to set coordinates to use when drawing the Host in the statuswrl CGI. Coordinates can be positive or negative real numbers. The origin for drawing is (0.0,0.0,0.0). For reference, the size of the Host cubes drawn is 0.5 units on each side (text takes a little more space). The coordinates you specify here are used as the center of the Host cube.


--- GW IMAGE NOT DISPLAYED --- How Do I Apply an Extended Host Info Template to a Host Profile?


You can apply an Extended Host Info Template within a Host Profile which will add the template properties to all Hosts associated with the Host Profile.

  1. Select Profiles from the Configuration menu options.
  2. Expand the Host Profiles option.
  3. Select Modify, (for New Host Profiles follow the same procedure).
  4. Select the Host Profile to add an Extended Host Info Template to.
  5. Select the drop-down box for Extended Host Info Template and select an existing template.
  6. Select Save.
  7. Next you can assign Hosts to use this Host Profile with the Extended Host Info Template by selecting the Assign Hosts tab. After adding the Hosts make sure you Save your changes. As a last step make sure you select the Apply tab, check the Apply Detail to Hosts and select Apply.

    Note: Assigning a Host Profile directly from within the Hosts option versus the Host Profile creates the association so that the Host can be managed from the Host Profile, but there is no other effect on the Host configuration. In other words, if you are in Hosts and adding or changing a Host Profile the Host Profile will update ONLY the Service properties and not the Host detail (including Extended Host Info Template). Tip: Work within the Host Profile when possible.


--- GW IMAGE NOT DISPLAYED --- How Do I Apply an Extended Host Info Template to a Host?


You can also add the template properties directly to an individual Host.

  1. Select Hosts from the Configuration menu options.
  2. Select a Host to add the an Extended Host Info Template.
  3. Select the drop-down box for Extended Host Info Template and select an existing template.
  4. Select Save.

Configuring Hosts

--- GW IMAGE NOT DISPLAYED --- How Do I Create Host Dependencies?


Step 1 – Host Dependency Properties

  1. Select Hosts from the Configuration menu options.
  2. Expand the Host Dependencies drop-down menu.
  3. Select New.
  4. In the Host Dependency Properties screen, enter the properties (see Table 5.5.6a. below).
  5. Select Add to create the new Host Dependency.
  6. You will be notified on the next screen that the Host Dependency has been saved, select Continue.

    Note: To modify or delete a Host Dependency select Modify from the Host Dependencies options. You will then be able to edit and Save a modified Host Dependency. Select Delete to remove a selected Host Dependency, or Cancel to exit out without any changes.

    Figure 5.5.6a. Host Dependency Properties

    --- GW IMAGE NOT DISPLAYED ---

    Table 5.5.6a. Host Dependency Properties

    Dependent Host [Required] This directive is used to identify the short name of the dependent Host.
    Parent Host [Required] This directive is used to identify the short name of the Host that is being depended upon.
    Notification Failure Criteria [Required] This directive is used to define the criteria that determine when Notifications for the dependent Host should not be sent out. If the Host that is being depended upon is in one of the failure states we specify, Notifications for the dependent Host will not be sent to contacts. Valid options are a combination of one or more of the following: o = fail on an UP state, d = fail on a DOWN state, and u = fail on an UNREACHABLE state. If you specify n (none) as an option, the Notification dependency will never fail and Notifications for the dependent Host will always be sent out. Example: If you specify d in this field, the Notifications for the dependent Host will not be sent out if the Host that is being depended upon is in a DOWN state.

Leave a Reply

Your email address will not be published. Required fields are marked *

clear formPost comment