Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Adding host to nagios  (Read 2971 times)

0 Members and 1 Guest are viewing this topic.

Godwin

  • Guest
Adding host to nagios
« on: November 29, 2014, 06:38:35 pm »
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