Project

General

Profile

Actions

Add Host

A host should be grouped under a specify host group to ease the configuration tasks.

[Important] Before begin, the following items should be prepared and ready:
  • host name - a short name to identify the host
  • alias - a longer name or description to identify the host
  • IP address - IP address of the host. Should not use hostname as it rely on DNS
  • host group - the host group of the host

If the host is a not *nix machine, please consult the administrator.

Steps

  1. login to the nagios server with nagios user
  2. edit the /usr/local/nagios/etc/ecosway/hosts/hosts.cfg
    nagios$ vi /usr/local/nagios/etc/ecosway/hosts/hosts.cfg
    
    • Template:
      define host{
              use                     linux-server
              host_name               host name
              alias                   alias
              address                 IP address
              }
      
    • Example:
      define host{
              use                     linux-server
              host_name               cwydb1
              alias                   database server
              address                 192.168.2.68
              }
      
  1. assign the host to a host group (the host group should exist and prepare by administrator)
    1. edit the /usr/local/nagios/etc/ecosway/hosts/host_groups.cfg
      nagios$ vi /usr/local/nagios/etc/ecosway/hosts/host_groups.cfg 
      
    • Template:
      define hostgroup{
              hostgroup_name  development-nodes
              alias           Development Nodes
              members         host name
              }
      
    • Example:
      define hostgroup{
              hostgroup_name  development-nodes
              alias           Development Nodes
              members         cwydb1
              }
      

Updated by chin-yeh over 14 years ago · 2 revisions