Adding Monitored Hosts - jacob-dinapoli/tech-journal GitHub Wiki
Prerequisite
Make sure you can ping the server you wish to add from your Nagios server.
In this example we will be adding a server called "test.nagios" with an IP of 10.0.0.1.
Steps
Change directory /usr/local/nagios/etc/objects, create a new filed called test.nagios.cfg. Add the following into the file:
define host {
host_name test.nagios
alias Test Server
address 10.0.0.1
max_check_attempts 3
check_period 24x7
check_command check-host-alive
contacts nagiosadmin
notification_interval 60
notificaion_period 24x7
}
Navigate to /usr/local/nagios/etc and edit the nagios.cfg file. Add cfg_file=/usr/local/nagios/etc/objects/test.nagios.cfg to the end of the file. Restart Nagios service and check your Host dashboard to see the newly configured host.