Monitoring a web server

Nagwin example - monitoring a web site

1. Create host file www.itefix.net.cfg in etc/nagios/nagwin directory with the content below:

# Define a hostgroup for web servers
define hostgroup{
  hostgroup_name	web-servers	; The name of the hostgroup
  alias	 		Web Servers	; Long name of the group
}

# Define a host for www.itefix.net
define host{
  use			linux-server            
  host_name		www.itefix.net
  alias			ITeF!x website
  address		62.109.39.44
  hostgroups		web-servers
}

# Services
define service {
  use 			generic-service	 ; defined in templates
  host_name		www.itefix.net
  service_description	http on itefix.no
  check_command		check_http!www.itefix.net  ; defined in commands
}

define service {
  use			generic-service  ; defined in templates
  host_name		www.itefix.net
  service_description	ping on itefix.no
  check_command		check-host-alive  ; defined in commands
}

2. Restart Nagwin_Nagios service and check results via web interface: