How to add new servers to Nagios
Steps to add new servers to Nagios:
To add a host
1. Go to the folder /usr/local/nagios/etc
2. Add entires in following files.
> hosts.cfg
> hostgroups.cfg
> services.cfg
Note: Please make sure that you are backing up these files with date & time before modifying it.
To check syntax
# cd ../libexec
# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Finally, restart Nagios as given below.
Stop Nagios.
# /usr/local/etc/rc.d/nagios stop
Check whether Nagios is running.
# ps aux | grep nagios
If so, kill all Nagios.
# kill -9 `pgrep nagios`
Start Nagios again.
# /usr/local/etc/rc.d/nagios start
Thank you.
To add a host
1. Go to the folder /usr/local/nagios/etc
2. Add entires in following files.
> hosts.cfg
> hostgroups.cfg
> services.cfg
Note: Please make sure that you are backing up these files with date & time before modifying it.
To check syntax
# cd ../libexec
# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Finally, restart Nagios as given below.
Stop Nagios.
# /usr/local/etc/rc.d/nagios stop
Check whether Nagios is running.
# ps aux | grep nagios
If so, kill all Nagios.
# kill -9 `pgrep nagios`
Start Nagios again.
# /usr/local/etc/rc.d/nagios start
Thank you.
Comments
Post a Comment