<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:D="DAV:" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>We’ve set up Nagios for the first time here. Version
3.0b2. We’ve set up several hosts and services. But we’re
not receiving any notifications and I can’t figure out why. The
service and host details all show “Last Notification: N/A (notification
0)”. The notify-service-by-email command works from the command
line as the nagios user. I’ll try to include as many relevant
config sections as possible below.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>The box is CentOS 4.5 running Linux version 2.6.9-55.0.2.ELsmp.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>There doesn’t seem to be any debug information for
notifications, so I can’t tell if the notifications are being blocked by
something I haven’t looked at. I wish there was a logging option
that allowed me to audit the notification filters, or at least a “test
notification” feature. (if these things are there, someone tell me
where and I’ll admit I’m an ‘idiot’). <o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I appreciate any help that can be given.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><b>From Contact.cfg:<o:p></o:p></b></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>define contact{<o:p></o:p></p>
<p class=MsoNormal>
contact_name
mdsouza_e
; Short name of user<o:p></o:p></p>
<p class=MsoNormal>
use
generic-contact ; Inherit
default values from generic-contact template (defined above)<o:p></o:p></p>
<p class=MsoNormal>
alias
Marvin
D'Souza ; Full name of
user<o:p></o:p></p>
<p class=MsoNormal>
email
XXXXX ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS
******<o:p></o:p></p>
<p class=MsoNormal> }<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>define contact{<o:p></o:p></p>
<p class=MsoNormal>
contact_name
rwadkins_e
; Short name of user<o:p></o:p></p>
<p class=MsoNormal>
use
generic-contact ; Inherit
default values from generic-contact template (defined above)<o:p></o:p></p>
<p class=MsoNormal>
alias
Ray
Wadkins
; Full name of user<o:p></o:p></p>
<p class=MsoNormal>
email
XXXXX ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS
******<o:p></o:p></p>
<p class=MsoNormal>
host_notifications_enabled 1<o:p></o:p></p>
<p class=MsoNormal>
service_notifications_enabled 1<o:p></o:p></p>
<p class=MsoNormal> host_notification_period
24x7<o:p></o:p></p>
<p class=MsoNormal>
service_notification_period 24x7<o:p></o:p></p>
<p class=MsoNormal>
host_notification_options d,u,r,f,s<o:p></o:p></p>
<p class=MsoNormal>
service_notification_options w,u,c,r,f,s<o:p></o:p></p>
<p class=MsoNormal>
host_notification_commands notify-host-by-email<o:p></o:p></p>
<p class=MsoNormal> service_notification_commands
notify-service-by-email<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal> }<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>define contactgroup{<o:p></o:p></p>
<p class=MsoNormal>
contactgroup_name nyadmins<o:p></o:p></p>
<p class=MsoNormal>
alias
New York Administrators<o:p></o:p></p>
<p class=MsoNormal>
members
mdsouza_e, rwadkins_e<o:p></o:p></p>
<p class=MsoNormal>}<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><b>From Windows.cfg:<o:p></o:p></b></p>
<p class=MsoNormal><b><o:p> </o:p></b></p>
<p class=MsoNormal>define host{<o:p></o:p></p>
<p class=MsoNormal> use
windows-server ; Inherit default values from a template<o:p></o:p></p>
<p class=MsoNormal>
host_name quickbooks ; The name we're
giving to this host<o:p></o:p></p>
<p class=MsoNormal>
alias quickbooks ;
A longer name associated with the host<o:p></o:p></p>
<p class=MsoNormal>
address XXXXX
; IP address of the host<o:p></o:p></p>
<p class=MsoNormal>
hostgroups allhosts,windows-servers<o:p></o:p></p>
<p class=MsoNormal>
max_check_attempts 3<o:p></o:p></p>
<p class=MsoNormal>
check_period
workhours<o:p></o:p></p>
<p class=MsoNormal>
notification_options d,r,u<o:p></o:p></p>
<p class=MsoNormal>
notification_interval 1440<o:p></o:p></p>
<p class=MsoNormal>
notification_period workhours<o:p></o:p></p>
<p class=MsoNormal>
contact_groups
nyadmins<o:p></o:p></p>
<p class=MsoNormal> }<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>define service{<o:p></o:p></p>
<p class=MsoNormal>
use
generic-service<o:p></o:p></p>
<p class=MsoNormal>
host_name
quickbooks<o:p></o:p></p>
<p class=MsoNormal>
service_description QuickBooks Backup<o:p></o:p></p>
<p class=MsoNormal> check_command
check_event_log<o:p></o:p></p>
<p class=MsoNormal>
notification_options w,u,c,r<o:p></o:p></p>
<p class=MsoNormal>
notification_interval 1440<o:p></o:p></p>
<p class=MsoNormal>
notification_period workhours<o:p></o:p></p>
<p class=MsoNormal>
contact_groups
nyadmins<o:p></o:p></p>
<p class=MsoNormal> }<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><b>From timeperiods.cfg<o:p></o:p></b></p>
<p class=MsoNormal><b><o:p> </o:p></b></p>
<p class=MsoNormal>define timeperiod{<o:p></o:p></p>
<p class=MsoNormal> timeperiod_name workhours<o:p></o:p></p>
<p class=MsoNormal>
alias Normal Work
Hours<o:p></o:p></p>
<p class=MsoNormal>
monday 08:00-18:00<o:p></o:p></p>
<p class=MsoNormal>
tuesday 08:00-18:00<o:p></o:p></p>
<p class=MsoNormal>
wednesday 08:00-18:00<o:p></o:p></p>
<p class=MsoNormal>
thursday 08:00-18:00<o:p></o:p></p>
<p class=MsoNormal>
friday 08:00-18:00<o:p></o:p></p>
<p class=MsoNormal> }<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><b>From commands.cfg<o:p></o:p></b></p>
<p class=MsoNormal><b><o:p> </o:p></b></p>
<p class=MsoNormal>define command{<o:p></o:p></p>
<p class=MsoNormal>
command_name notify-service-by-email<o:p></o:p></p>
<p class=MsoNormal>
command_line /usr/bin/printf "%b" "*****
Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $<o:p></o:p></p>
<p class=MsoNormal>HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s
"** $NOTIFICATIONTYPE$ Service Alert: $HOS<o:p></o:p></p>
<p class=MsoNormal>TALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **"
$CONTACTEMAIL$<o:p></o:p></p>
<p class=MsoNormal> }<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><b>From templates.cfg:<o:p></o:p></b></p>
<p class=MsoNormal><b><o:p> </o:p></b></p>
<p class=MsoNormal>define contact{<o:p></o:p></p>
<p class=MsoNormal>
name
generic-contact ; The name of
this contact template<o:p></o:p></p>
<p class=MsoNormal>
service_notification_period
24x7
; service notifications can be sent anytime<o:p></o:p></p>
<p class=MsoNormal>
host_notification_period
24x7 ;
host notifications can be sent anytime<o:p></o:p></p>
<p class=MsoNormal>
service_notification_options
w,u,c,r,f,s
; send notifications for all service states, flapping events, and scheduled
downtime events<o:p></o:p></p>
<p class=MsoNormal>
host_notification_options d,u,r,f,s
; send notifications for all host states, flapping events, and scheduled
downtime events<o:p></o:p></p>
<p class=MsoNormal>
service_notification_commands notify-service-by-email ; send
service notifications via email<o:p></o:p></p>
<p class=MsoNormal>
host_notification_commands
notify-host-by-email ; send host notifications via email<o:p></o:p></p>
<p class=MsoNormal>
register
0
; DONT REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!<o:p></o:p></p>
<p class=MsoNormal> }<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>define host{<o:p></o:p></p>
<p class=MsoNormal>
name
windows-server ; The name of this host template<o:p></o:p></p>
<p class=MsoNormal>
use
generic-host ; Inherit default values from the generic-host
template<o:p></o:p></p>
<p class=MsoNormal>
check_period
24x7 ; By
default, Windows servers are monitored round the clock<o:p></o:p></p>
<p class=MsoNormal>
check_interval
5
; Actively check the server every 5 minutes<o:p></o:p></p>
<p class=MsoNormal>
retry_interval
1
; Schedule host check retries at 1 minute intervals<o:p></o:p></p>
<p class=MsoNormal> max_check_attempts
10
; Check each server 10 times (max)<o:p></o:p></p>
<p class=MsoNormal>
check_command
check-host-alive ; Default command to
check if servers are "alive"<o:p></o:p></p>
<p class=MsoNormal>
notification_period
24x7 ; Send
notification out at any time - day or night<o:p></o:p></p>
<p class=MsoNormal>
notification_interval
30
; Resend notifications every 30 minutes<o:p></o:p></p>
<p class=MsoNormal>
notification_options
d,r ;
Only send notifications for specific host states<o:p></o:p></p>
<p class=MsoNormal>
contact_groups
admins ; Notifications
get sent to the admins by default<o:p></o:p></p>
<p class=MsoNormal>
hostgroups
allhosts,windows-servers ; Host groups that Windows servers should be a member
of<o:p></o:p></p>
<p class=MsoNormal>
register
0
; DONT REGISTER THIS - ITS JUST A TEMPLATE<o:p></o:p></p>
<p class=MsoNormal> }<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>define host{<o:p></o:p></p>
<p class=MsoNormal>
name
generic-host ; The name of this host template<o:p></o:p></p>
<p class=MsoNormal>
notifications_enabled
1
; Host notifications are enabled<o:p></o:p></p>
<p class=MsoNormal>
event_handler_enabled
1
; Host event handler is enabled<o:p></o:p></p>
<p class=MsoNormal>
flap_detection_enabled
1
; Flap detection is enabled<o:p></o:p></p>
<p class=MsoNormal>
failure_prediction_enabled
1
; Failure prediction is enabled<o:p></o:p></p>
<p class=MsoNormal>
process_perf_data
1
; Process performance data<o:p></o:p></p>
<p class=MsoNormal>
retain_status_information
1
; Retain status information across program restarts<o:p></o:p></p>
<p class=MsoNormal>
retain_nonstatus_information
1
; Retain non-status information across program restarts<o:p></o:p></p>
<p class=MsoNormal> notification_period
24x7 ; Send
host notifications at any time<o:p></o:p></p>
<p class=MsoNormal>
register
0
; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!<o:p></o:p></p>
<p class=MsoNormal> }<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>define service{<o:p></o:p></p>
<p class=MsoNormal>
name
generic-service ; The 'name' of
this service template<o:p></o:p></p>
<p class=MsoNormal>
active_checks_enabled
1
; Active service checks are enabled<o:p></o:p></p>
<p class=MsoNormal>
passive_checks_enabled
1 ;
Passive service checks are enabled/accepted<o:p></o:p></p>
<p class=MsoNormal>
parallelize_check
1
; Active service checks should be parallelized (disabling this can lead to
major performance probl<o:p></o:p></p>
<p class=MsoNormal>ems)<o:p></o:p></p>
<p class=MsoNormal>
obsess_over_service 1
; We should obsess over this service (if necessary)<o:p></o:p></p>
<p class=MsoNormal>
check_freshness
0
; Default is to NOT check service 'freshness'<o:p></o:p></p>
<p class=MsoNormal>
notifications_enabled
1
; Service notifications are enabled<o:p></o:p></p>
<p class=MsoNormal>
event_handler_enabled
1
; Service event handler is enabled<o:p></o:p></p>
<p class=MsoNormal>
flap_detection_enabled
1
; Flap detection is enabled<o:p></o:p></p>
<p class=MsoNormal>
failure_prediction_enabled
1
; Failure prediction is enabled<o:p></o:p></p>
<p class=MsoNormal>
process_perf_data
1
; Process performance data<o:p></o:p></p>
<p class=MsoNormal>
retain_status_information
1
; Retain status information across program restarts<o:p></o:p></p>
<p class=MsoNormal>
retain_nonstatus_information
1
; Retain non-status information across program restarts<o:p></o:p></p>
<p class=MsoNormal>
is_volatile
0
; The service is not volatile<o:p></o:p></p>
<p class=MsoNormal>
check_period 24x7
; The service can be checked at any time of the day<o:p></o:p></p>
<p class=MsoNormal>
max_check_attempts
3
; Re-check the service up to 3 times in order to determine its final (hard)
state<o:p></o:p></p>
<p class=MsoNormal> normal_check_interval
10
; Check the service every 10 minutes under normal conditions<o:p></o:p></p>
<p class=MsoNormal>
retry_check_interval
2
; Re-check the service every two minutes until a hard state can be determined<o:p></o:p></p>
<p class=MsoNormal> contact_groups
admins
; Notifications get sent out to everyone in the 'admins' group<o:p></o:p></p>
<p class=MsoNormal>
notification_options
w,u,c,r
; Send notifications about warning, unknown, critical, and recovery events<o:p></o:p></p>
<p class=MsoNormal>
notification_interval
60
; Re-notify about service problems every hour<o:p></o:p></p>
<p class=MsoNormal>
notification_period
24x7
; Notifications can be sent out at any time<o:p></o:p></p>
<p class=MsoNormal>
register
0
; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!<o:p></o:p></p>
<p class=MsoNormal> }<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><b>From nagios.cfg<o:p></o:p></b></p>
<p class=MsoNormal><b><o:p> </o:p></b></p>
<p class=MsoNormal># NOTIFICATIONS OPTION<o:p></o:p></p>
<p class=MsoNormal># This determines whether or not Nagios will sent out any
host or<o:p></o:p></p>
<p class=MsoNormal># service notifications when it is initially (re)started.<o:p></o:p></p>
<p class=MsoNormal># Values: 1 = enable notifications, 0 = disable
notifications<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>enable_notifications=1<o:p></o:p></p>
</div>
</body>
</html>