contacts.cfg is not working properly

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: contacts.cfg is not working properly

Post 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?
Former Nagios Employee
sinkak
Posts: 158
Joined: Thu Jul 30, 2015 1:30 pm

Re: contacts.cfg is not working properly

Post 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
}
sinkak
Posts: 158
Joined: Thu Jul 30, 2015 1:30 pm

Re: contacts.cfg is not working properly

Post 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.

Last edited by sinkak on Tue Nov 03, 2015 12:11 pm, edited 1 time in total.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: contacts.cfg is not working properly

Post 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.
Former Nagios Employee.
me.
sinkak
Posts: 158
Joined: Thu Jul 30, 2015 1:30 pm

Re: contacts.cfg is not working properly

Post 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]
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: contacts.cfg is not working properly

Post by hsmith »

Looks good to me.
Former Nagios Employee.
me.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: contacts.cfg is not working properly

Post by eloyd »

I'm coming in at the end here, but is it possible that the contact itself is not accepting critical notifications?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: contacts.cfg is not working properly

Post by hsmith »

Can you expand on that a bit, Eric?
Former Nagios Employee.
me.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: contacts.cfg is not working properly

Post by eloyd »

service_notification_options and host_notification_options set to w,c,r,u for instance?
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
sinkak
Posts: 158
Joined: Thu Jul 30, 2015 1:30 pm

Re: contacts.cfg is not working properly

Post 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
Locked