Here is my contacts.cfg
define contact {
contact_name nagiosadmin ; Short name of user
use generic-contact ; inherit from above
alias Nagios Admin ; Full name of user
email
jason.payne@payneintheit.com ; your email
}
Here is my nagios.cfg
# OBJECT CONFIGURATION FILE(S)
# These are the object configuration files in which you define hosts,
# host groups, contacts, contact groups, services, etc.
# You can split your object definitions across several config files
# if you wish (as shown below), or keep them all in a single config file.
# You can specify individual object config files as shown below:
cfg_file=/usr/local/nagios/etc/objects/commands.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
# Definitions for monitoring the local (Linux) host
cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
# Definitions for monitoring a Windows machine
cfg_file=/usr/local/nagios/etc/objects/windows.cfg
cfg_file=/usr/local/nagios/etc/objects/windows2.cfg
###############################################################################
#
# CONTACT GROUPS
#
###############################################################################
# We only have one contact in this simple configuration file, so there is
# no need to create more than one contact group.
define contactgroup {
contactgroup_name admins
alias Nagios Administrators
members nagiosadmin
}
Here is my windows.cfg file that points to one of my servers being monitored:
Define a host for the Windows machine we'll be monitoring
# Change the host_name, alias, and address to fit your situation
define host {
use windows-server ; Inherit default values from a template
host_name ALPSBS2K11 ; The name we're giving to this host
alias ALPSBS2K11 ; A longer name associated with the host
address 192.168.1.8 ; IP address of the host
contact_groups admins ; contact person
}
###############################################################################
#
# HOST GROUP DEFINITIONS
#
###############################################################################
# Define a hostgroup for Windows machines
# All hosts that use the windows-server template will automatically be a member of this group
define hostgroup {
hostgroup_name windows-servers ; The name of the hostgroup
alias Windows Servers ; Long name of the group
}
define service {
use generic-service
host_name ALPSBS2K11
service_description Uptime
check_command check_nt!UPTIME
}
Here is my windows2.cfg file that points to my 2nd server being monitored:
define host {
use windows-server ; Inherit default values from a template
host_name ALPBACKSRV2008 ; The name we're giving to this host
alias ALPBACKSRV2008 ; A longer name associated with the host
address 192.168.1.10 ; IP address of the host
contact_groups admins ; contact person
}
###############################################################################
#
# HOST GROUP DEFINITIONS
#
###############################################################################
# Define a hostgroup for Windows machines
# All hosts that use the windows-server template will automatically be a member of this group
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
# Create a service for monitoring the version of NSCLient++ that is installed
# Change the host_name to match the name of the host you defined above
define service {
use generic-service
host_name ALPBACKSRV2008
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}
I need contact group for every service dont I? Maybe that is why it is not alerting me for services.