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.
sinkak
Posts: 158 Joined: Thu Jul 30, 2015 1:30 pm
Post
by sinkak » Mon Oct 05, 2015 11:30 am
Code: Select all
define contact{
contact_name wsawarn
alias WSAWarn
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email [email protected]
}
Code: Select all
define contact{
contact_name root
alias ROOT
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_notification_commands notify-service-by-sms-only-once
host_notification_commands notify-host-by-sms-only-once
email [email protected]
}
Code: Select all
define contactgroup{
contactgroup_name DevNull
members wsawarn
}
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members wsawarn,root
}
only warnings are working not critical alerts.
Please explain where is the mistake in config?
hsmith
Agent Smith
Posts: 3539 Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:
Post
by hsmith » Mon Oct 05, 2015 11:38 am
Are you not getting critical notifications for either of these contacts, or just the admins?
Former Nagios Employee.
me.
hsmith
Agent Smith
Posts: 3539 Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:
Post
by hsmith » Mon Oct 05, 2015 12:23 pm
Let's try changing
Code: Select all
define contact{
contact_name root
alias ROOT
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_notification_commands notify-service-by-sms-only-once
host_notification_commands notify-host-by-sms-only-once
email [email protected]
}
to
Code: Select all
define contact{
contact_name root
alias ROOT
service_notification_period 24x7
host_notification_period 24x7
service_notification_options c
host_notification_options d
service_notification_commands notify-service-by-email, notify-service-by-sms-only-once
host_notification_commands notify-host-by-email, notify-host-by-sms-only-once
email [email protected]
}
Former Nagios Employee.
me.
sinkak
Posts: 158 Joined: Thu Jul 30, 2015 1:30 pm
Post
by sinkak » Mon Oct 05, 2015 12:39 pm
i did those changes.
am waiting for the alerts to come.
Code: Select all
define contact{
contact_name root
alias ROOT
should this be defined in config?
hsmith
Agent Smith
Posts: 3539 Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:
Post
by hsmith » Mon Oct 05, 2015 12:44 pm
As long as you have in defined in the contact group, it should be fine. I doubt using the name root will have any weird side effects, but it's probably best practice to use a different one.
Former Nagios Employee.
me.
sinkak
Posts: 158 Joined: Thu Jul 30, 2015 1:30 pm
Post
by sinkak » Mon Oct 05, 2015 1:05 pm
no alerts from 911 email address.
i changed from root
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, notify-service-by-sms-only-once
host_notification_commands notify-host-by-email, notify-host-by-sms-only-once
email [email protected]
}
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members wsawarn,wsacritical
}
Still no changes in 911 alerts.
hsmith
Agent Smith
Posts: 3539 Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:
Post
by hsmith » Mon Oct 05, 2015 1:07 pm
Did you restart Nagios after making those changes?
Former Nagios Employee.
me.
sinkak
Posts: 158 Joined: Thu Jul 30, 2015 1:30 pm
Post
by sinkak » Mon Oct 05, 2015 1:11 pm
yes.
i did
sudo service nagios reload
sudo service nagios restart
hsmith
Agent Smith
Posts: 3539 Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:
Post
by hsmith » Mon Oct 05, 2015 1:18 pm
Are these two contacts in the same configuration file?
Former Nagios Employee.
me.