Adding host to nagios
# /usr/local/nagios/etc/
cd /usr/local/nagios/etc/objects
vim godwin.cfg
define host{
use linux-server ; Name of host template to use
; This host definition will inherit all variables that are defined
; in (or inherited by) the linux-server host template definition.
host_name godwin
alias godwin
address 10.0.0.40
}
vim localhost.cfg
define hostgroup{
hostgroup_name linux-servers ; The name of the hostgroup
alias Linux Servers ; Long name of the group
members localhost, godwin ; Comma separated list of hosts that belong to this group
}
vim /usr/local//nagios/etc/nagios.cfg
# Definitions for monitoring the GODWIN
cfg_file=/usr/local/nagios/etc/objects/godwin.cfg
service nagios restart