Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It does not send mail if I only add contact_groups in host definition.
Code:
define host{
use generic-host ; Inherit default values from a template
host_name NAME1 ; The name we're giving to this switch
address XX.X.X.X ; IP address of the switch
hostgroups GROP1 ; Host groups this switch is associated with
contact_groups wadmins
}
But If in same host-config file I add contact_groups in service definition it works.
Code:
define service{
use generic-service ; Inherit values from a template
host_name NAME1 ; The name of the host the service is associated with
service_description PING ; The service description
check_command check_ping!200.0,20%!600.0,60% ; The command used to monitor the service
normal_check_interval 5 ; Check the service every 5 minutes under normal conditions
retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined
contact_groups wadmins
}
Any ideas ?
Last edited by knockout_artist; 06-03-2010 at 10:11 AM.
Where notification_interval is in minutes; notification_period is defined timeperiod; and notification_options are a comma separated list containing: w,u,c,r (w = Warning, u = Undefined, c = Critical, r = Recovery)
A timeperiod is defined like this:
Code:
# '24x7' timeperiod definition
define timeperiod{
timeperiod_name 24x7
alias 24 Hours A Day, 7 Days A Week
sunday 00:00-24:00
monday 00:00-24:00
tuesday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
friday 00:00-24:00
saturday 00:00-24:00
}
And you will only receive notifications within those time periods.
Well there may be a place to set a default value somewhere, but I have always set it for each host and service. I have over 100 hosts and over 500 services monitored by Nagios and I have something like 10 groups. Some get e-mails 24x7, some don't care if the copier goes down at 3 AM. I have never had a problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.