Page 1 of 1

Notification Check Timeperiod

Posted: Mon Feb 27, 2017 9:42 pm
by kwhogster
Nagios Core 4.1

Still get Alerts event tho I have check_period and notification_period set
Why does it still show on my Probles display

My services example

Code: Select all

define service{
        use                     generic-service
        host_name               TGKW007
        service_description     CPU Load
        servicegroups           CPULoad
        check_command           check_nrpe!alias_cpu
        check_period            backup_time
        notification_period     backup_time
        }
define service{
        use                     generic-service
        host_name               TGKW007
        service_description     Memory Usage
        check_command           check_nrpe!alias_mem
        servicegroups           MemUsage
        check_period            backup_time
        notification_period     backup_time
        }
My timeperiod

Code: Select all

define timeperiod{
        timeperiod_name                         backup_time
        alias                                   backup_time
        sunday                                  00:00-19:00,07:00-24:00
        monday                                  00:00-19:00,07:00-24:00
        tuesday                                 00:00-19:00,07:00-24:00
        wednesday                               00:00-19:00,07:00-24:00
        thursday                                00:00-19:00,07:00-24:00
        friday                                  00:00-19:00,07:00-24:00
        saturday                                00:00-19:00,07:00-24:00
        }
                        
So why does my services show up when I do not monitor them ? What am I missing here.

Thanks

Tom

Re: Notification Check Timeperiod

Posted: Tue Feb 28, 2017 12:58 am
by rkennedy
Post the full headers of the email.

Re: Notification Check Timeperiod

Posted: Tue Feb 28, 2017 7:37 pm
by kwhogster
Here is an example

It is like they are not even checking to see the timeperiod settings

Received: from TGCS017.our.network.tgcsnet.com (10.2.8.79) by
tgcs025.our.network.tgcsnet.com (10.2.8.36) with Microsoft SMTP Server id
14.3.319.2; Tue, 28 Feb 2017 19:28:12 -0500
Received: by TGCS017.our.network.tgcsnet.com (Postfix, from userid 1001) id
56AB11603F0; Tue, 28 Feb 2017 19:28:09 -0500 (EST)
Date: Tue, 28 Feb 2017 19:28:08 -0500
To: <[email protected]>
Subject: ** PROBLEM Service Alert: Windows 7 PRO/NRPE Status
TGKW008 is CRITICAL **
User-Agent: s-nail v14.8.6
Message-ID: <[email protected]>
From: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain
Return-Path: [email protected]
X-MS-Exchange-Organization-AuthSource: TGCS025.our.network.tgcsnet.com
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-Antispam-Report: IPOnAllowList
X-MS-Exchange-Organization-SCL: -1
X-Auto-Response-Suppress: DR, OOF, AutoReply



Received: from TGCS017.our.network.tgcsnet.com (10.2.8.79) by
tgcs025.our.network.tgcsnet.com (10.2.8.36) with Microsoft SMTP Server id
14.3.319.2; Tue, 28 Feb 2017 19:30:55 -0500
Received: by TGCS017.our.network.tgcsnet.com (Postfix, from userid 1001) id
34A12160444; Tue, 28 Feb 2017 19:30:55 -0500 (EST)
Date: Tue, 28 Feb 2017 19:30:55 -0500
To: <[email protected]>
Subject: ** RECOVERY Service Alert: Windows 7 PRO/NRPE Status
TGKW008 is OK **
User-Agent: s-nail v14.8.6
Message-ID: <[email protected]>
From: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain
Return-Path: [email protected]
X-MS-Exchange-Organization-AuthSource: TGCS025.our.network.tgcsnet.com
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-Antispam-Report: IPOnAllowList
X-MS-Exchange-Organization-SCL: -1
X-Auto-Response-Suppress: DR, OOF, AutoReply

Re: Notification Check Timeperiod

Posted: Wed Mar 01, 2017 12:33 pm
by mcapra
Your time period seems a bit off:

Code: Select all

define timeperiod{
        timeperiod_name                         backup_time
        alias                                   backup_time
        sunday                                  00:00-19:00,07:00-24:00
        monday                                  00:00-19:00,07:00-24:00
        tuesday                                 00:00-19:00,07:00-24:00
        wednesday                               00:00-19:00,07:00-24:00
        thursday                                00:00-19:00,07:00-24:00
        friday                                  00:00-19:00,07:00-24:00
        saturday                                00:00-19:00,07:00-24:00
        }
                 


This would effectively be from 12:00am to 07:00pm, then 07:00am to 11:59pm every day. Due to the overlap, this is effectively a 24 hour time period every day. Could you tell us what you'd like to accomplish with this time period?

Re: Notification Check Timeperiod

Posted: Wed Mar 01, 2017 9:23 pm
by kwhogster
Oh

My backup time starts at 7:00 PM and stop at 7:00 AM

Suggestions

Code: Select all

define timeperiod{
        timeperiod_name                         backup_time
        alias                                   backup_time
        sunday                                  19:00-07:00
        monday                                 19:00-07:00
        tuesday                                 19:00-07:00
        wednesday                            19:00-07:00
        thursday                                19:00-07:00
        friday                                    19:00-07:00
        saturday                                19:00-07:00
        }
                        

Is this correct?

Will I get notifications during this time? I do not want any notification during this time period


Thanks

Tom

Re: Notification Check Timeperiod

Posted: Thu Mar 02, 2017 1:31 pm
by mcapra
kwhogster wrote:My backup time starts at 7:00 PM and stop at 7:00 AM
In that case, since the backup runs overnight and spills into 2 distinct days, this time period might make more sense:

Code: Select all

define timeperiod{
        timeperiod_name						backup_time
        alias								backup_time
        sunday								00:00-07:00,19:00-24:00
        monday								00:00-07:00,19:00-24:00
        tuesday								00:00-07:00,19:00-24:00
        wednesday							00:00-07:00,19:00-24:00
        thursday							00:00-07:00,19:00-24:00
        friday								00:00-07:00,19:00-24:00
        saturday							00:00-07:00,19:00-24:00
        }
This says "midnight to 7am, and 7pm-midnight" for any given day. Due to each day having the same definition, this should effectively encompass a 7am-7pm time period each day.

Re: Notification Check Timeperiod

Posted: Thu Mar 02, 2017 8:30 pm
by kwhogster
Looks Good

Lets lock this one now

Thank you