I have configured a specific check/notification period for certain hosts (04:00-24:00 everyday) and nagios is sending notifications between 00:00 and 04:00 (services are down due to backup).
I have advanced services directly linked to the host, i've also tried linking advanced services through hostgroups. But i received tons of emails.
Is this some kind of bug?
Check/Notifications period
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Check/Notifications period
Can you attach us the following configuration files?
And your service's configuration file?
You may block out any information you wish not to share such as real names, passwords, or IP's.
Code: Select all
/usr/local/nagios/etc/timeperiods.cfgYou may block out any information you wish not to share such as real names, passwords, or IP's.
Re: Check/Notifications period
I just define these periods on the host, services are monitored 24x7.
Do i have to configure these timeperiods on the service too?
I thought that service periods were inherited by host periods.
Do i have to configure these timeperiods on the service too?
I thought that service periods were inherited by host periods.
Re: Check/Notifications period
Hi pep,
If it's the latter, as slansing requested, could you post your timeperiods.cfg and the related host configuration file?
Thank you,
Kind regards,
Gary Shergill
This depends on whether or not you have defined a check_period in your service configuration (template or otherwise). However, if I'm not mistaken, a service's check_period should be ignored if the host is down, as service notifications will no longer be sent out.I thought that service periods were inherited by host periods.
Are these emails about services or hosts being down? i.e. are you still receiving emails about services being down if the host is? Or are these emails just saying that the host is down between the times 00.00 and 04.00?But i received tons of emails.
If it's the latter, as slansing requested, could you post your timeperiods.cfg and the related host configuration file?
Thank you,
Kind regards,
Gary Shergill
Re: Check/Notifications period
I've made some changes let me wait and check what happens tonight.
Thanks for your help =)
Thanks for your help =)
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Check/Notifications period
If you get a chance, let us know how your notifications are looking tonight!
Re: Check/Notifications period
I still got notification emails for services that are down while backup is running:
Timeperiods definition:
Timeperiods definition:
Host definition:define timeperiod {
timeperiod_name machine
alias machine
sunday 04:00-24:00
monday 04:00-24:00
tuesday 04:00-24:00
wednesday 04:00-24:00
thursday 04:00-24:00
friday 04:00-24:00
saturday 04:00-24:00
}
Advanced Service example:define host {
host_name machine.domain.com
address machine.domain.com
max_check_attempts 4
check_interval 5
notification_interval 0
_SYSTEMID ppp
icon_image_alt Windows
icon_image base/win40.gif
statusmap_image base/win40.gd2
check_command check-host-alive
check_period 24x7
notification_period machine
use group1,group2
contact_groups +admins}
Is there anything wrong? What if i have 20 machines with 30 advanced services each and downtime hours? I'd have to configure it 600 times???define service {
service_description SAP - Oracle TS SYSAUX
check_command check_sap!tssysaux$_HOSTSYSTEMID$!bbb
check_period 24x7
notification_period 24x7
host_name machine.domain.com
use group1
contact_groups +admins
}
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Check/Notifications period
This is the reason you can configure templates, or host/service groups. Templates are used to make blanket changes over your hosts or services in groups. Where Host/Service groups allow you to push changes to all the configurations within.Is there anything wrong? What if i have 20 machines with 30 advanced services each and downtime hours? I'd have to configure it 600 times???
Back to the original issue, you need to define a notification period for the services as well. In addition, this is a good use for Scheduled Downtime, you can access this page through the following Menu link:
Home Page > System Section > Downtime.
You can set the downtime for hosts and services in this section, which effectively "turns them off" during the period you designate. Unfortunately Recurring Downtime scheduling is something reserved for, and built into Nagios XI, though I believe some admins have implemented it on their Core systems.
Re: Check/Notifications period
That makes me wonder...
I have all my services configured as advanced services, this way i don't have to create one service per host, only one advanced service works for each host.
These services notify only one person from department A through a service template.
Now i want to add some more hosts for people from department B, what would happen if i reuse those previously created advanced services and add another service template for departmentB???? Who would receive these notifications? Both departments?
I have all my services configured as advanced services, this way i don't have to create one service per host, only one advanced service works for each host.
These services notify only one person from department A through a service template.
Now i want to add some more hosts for people from department B, what would happen if i reuse those previously created advanced services and add another service template for departmentB???? Who would receive these notifications? Both departments?
Re: Check/Notifications period
Yes. As the service has 2 templates for notifications, one for dept. A and 1 for dept. B. You may want to move notifications to a contact template instead of a service/host template.pep wrote:Who would receive these notifications? Both departments?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.