I am trying to use hostescalation to limit the number of emails that I receive.
When I define hostescalation with the below, I get an email every min. If I comment the notification out
in the service-templete definition I get no emails.
I have a file called host_notification_escalation.cfg which contains
define hostescalation{
host_name hostname
first_notification 1
last_notification 2
notification_interval 1
contact_groups admin
}
Then I have the host defined in a conf file call windows.cfg
define host{
use template
host_name hostname
alias hostname
address ipaddress
parents a, b
icon_image
vrml_image
statusmap_image
}
define service{
use service-template
host_name hostname
service_description description
check_command check_wmi_mem!10%!20% ## Lowered these numbers to invoke nagios to send critical emails
}
define service{
name service-template ;
active_checks_enabled 1 ;
passive_checks_enabled 1 ;
parallelize_check 1 ;
obsess_over_service 1 ;
check_freshness 0 ;
notifications_enabled 1 ;
event_handler_enabled 1 ;
flap_detection_enabled 1 ;
failure_prediction_enabled 1 ;
process_perf_data 1 ;
retain_status_information 1 ;
retain_nonstatus_information 1 ;
is_volatile 0 ;
check_period 24x7 ;
max_check_attempts 4 ;
normal_check_interval 1 ;
retry_check_interval 1 ;
contact_groups admins ;
notification_options u,c,r ;
notification_period no-nights ;
register 0 ;
}
HostEscalation Issue
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: HostEscalation Issue
That is correct, are you trying to receive emails every one minute? Because that is how it is setup:
Code: Select all
notification_interval 1Re: HostEscalation Issue
The issues is that I don't want to receive emails every minutes. I want to receive two email one minutes apart from each other.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: HostEscalation Issue
The notification_interval 1 setting should cause emails to be sent every 1 minute, for each object that this is set for. If you are wanting to have two people receive emails, simply set them both as contacts. Otherwise as you mentioned in the first post, if you wish to limit the time between emails, you may want to set the interval to a larger number. If that is not what you are looking for, could you provide more detail as to how you wish this to work.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.