Monitoring Hosted website using local nagios instance
I used nagios check_http plugin for this.</p>
1) Create a new command in commands.cfg file and use check_http as your base command and then alter the parameters
e.g.
define command{
command_name check_http_tnt
command_line $USER1$/check_http -H www.tipsntraps.com $ARG1$
}
2) Define a new service to monitor the web page www.tipsntraps.com/index.php and expect the http_responce code 200
define service{
use local-service ; Name of service template to use
host_name Rubicon Live
service_description TNT
check_command check_http_tnt! -u /index.php -e 200
notifications_enabled 0
}
3) Verify the sample Nagios configuration files.
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
4) If there are no errors, start Nagios.
/etc/init.d/nagios start