Page 9 of 13

Re: contacts.cfg is not working properly

Posted: Wed Oct 28, 2015 2:45 pm
by rkennedy
The fact that it is working through gmail, and for your warnings (but, not critical) tells me that some sort of filter on your mail server at 'msoutlookonline.net' is blocking it OR something is not configured properly with your critical alerts.

To test, can you try using the same email that you do for warnings, as you do for critical?

Re: contacts.cfg is not working properly

Posted: Tue Nov 03, 2015 11:38 am
by sinkak
this is how my current contacts file is looking
cfg
###############################################################################
# contacts.cfg
###############################################################################



###############################################################################
###############################################################################
#
# CONTACTS
#
###############################################################################
###############################################################################

# In this simple config file, a single contact will receive all alerts.


define contact{
contact_name wsawarn
alias WSAWarn
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,f
host_notification_options u,f
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email [email protected]
}


define contact{
contact_name wsacritical
alias WSACRITICAL
service_notification_period 24x7
host_notification_period 24x7
service_notification_options c
host_notification_options d
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
# email [email protected]
email [email protected]
}


###############################################################################
###############################################################################
#
# 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 DevNull
members wsawarn
}

define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members wsawarn,wsacritical
}

define contactgroup{
contactgroup_name Dustin-admins
alias Dustin
members wsawarn
}

define contactgroup{
contactgroup_name sms-admins
alias SMS
members wsawarn
}

define contactgroup{
contactgroup_name SmsOnlyOnce
members wsawarn
}

define contactgroup{
contactgroup_name Nagiosadmins
alias Administrators
members wsacritical
}

Re: contacts.cfg is not working properly

Posted: Tue Nov 03, 2015 11:42 am
by sinkak
I am still getting only warning and recovering emails to [email protected] no critical emails.
May be some problem with contact groups?
i am getting alerts from amazon monitoring services to critical email. its not working from nagios alone. i checked with admin there are no filters on email account.


Re: contacts.cfg is not working properly

Posted: Tue Nov 03, 2015 12:06 pm
by hsmith
Can you add service_notifications_enabled 1 and host_notifications_enabled 1to your wascritical contact? Restart the Nagios and Apache2 services after making this change.

Re: contacts.cfg is not working properly

Posted: Tue Nov 03, 2015 12:13 pm
by sinkak
do you mean like this ?

Code: Select all

define contact{
contact_name wsacritical
alias WSACRITICAL
service_notification_period 24x7
host_notification_period 24x7
service_notification_options c
host_notification_options d
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
service_notifications_enabled 1
host_notifications_enabled 1
# email [email protected]
email [email protected]

Re: contacts.cfg is not working properly

Posted: Tue Nov 03, 2015 12:15 pm
by hsmith
Looks good to me.

Re: contacts.cfg is not working properly

Posted: Tue Nov 03, 2015 1:40 pm
by eloyd
I'm coming in at the end here, but is it possible that the contact itself is not accepting critical notifications?

Re: contacts.cfg is not working properly

Posted: Tue Nov 03, 2015 1:45 pm
by hsmith
Can you expand on that a bit, Eric?

Re: contacts.cfg is not working properly

Posted: Tue Nov 03, 2015 1:59 pm
by eloyd
service_notification_options and host_notification_options set to w,c,r,u for instance?

Re: contacts.cfg is not working properly

Posted: Tue Nov 03, 2015 2:01 pm
by sinkak
i got critical email alert

Code: Select all

[email protected]
12:54 PM (8 minutes ago)

to alerts-warning email
***** Nagios *****

Notification Type: PROBLEM

Service: Requests Wait Time
Host: webserver09
Address: 10.0.1.248
State: CRITICAL

Date/Time: Tue Nov 3 12:54:33 CST 2015

Additional Info:

CRITICAL: ReqWaitTime: 890  critical