Home » Categories » Multiple Categories

Nagios Core - Time Period Inheritance

Overview

This article describes how time period inheritance works in Nagios Core.

The name directive must be defined in the parent object for inheritance to work.

The parent object is being referenced by the use directive.

The name directive is not mandatory and hence it can be mistaken with the timeperiod_name directive.

 

Examples

Here is an example of a config that WILL NOT inherit the parent object 24x7 because the name directive does NOT exist.

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
    }

define timeperiod {
    timeperiod_name maintenance-periods
    alias Maintenance Periods
    sunday 01:00-02:00
    saturday 01:00-02:00
    }

define timeperiod {
    timeperiod_name 24x7-except-maintenance-periods
    alias 24x7 Except Maintenance Periods
    use 24x7
    exclude maintenance-periods
    }

 

 

Here is an example of a config that will inherit the parent object 24x7 because the name directive exists.

define timeperiod {
    timeperiod_name 24x7
    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
    }

define timeperiod {
    timeperiod_name maintenance-periods
    alias Maintenance Periods
    sunday 01:00-02:00
    saturday 01:00-02:00
    }

define timeperiod {
    timeperiod_name 24x7-except-maintenance-periods
    alias 24x7 Except Maintenance Periods
    use 24x7
    exclude maintenance-periods
    }

 

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/

0 (0)
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Nagios XI - Redundancy And Security Planning
Viewed 1426 times since Sun, Mar 25, 2018
Nagios XI - How To Monitor A Websensor EM08
Viewed 1518 times since Thu, Jan 28, 2016
Nagios Core - Predictive Dependency Checks
Viewed 1462 times since Mon, Feb 1, 2016
Nagios XI - How to Integrate SNMP Traps With Nagios XI
Viewed 7415 times since Thu, Jan 28, 2016
Nagios XI - How To Monitor Apache ActiveMQ With Nagios XI
Viewed 2480 times since Wed, Jan 27, 2016
Nagios XI - Modifying The Contents Of /usr/local/nagios/etc
Viewed 1868 times since Tue, Jan 26, 2016
Nagios Core - How To Monitor A Publicly Available Service (HTTP, FTP, SSH, etc.)
Viewed 2025 times since Sun, Jan 31, 2016
Nagios Core - Verifying Your Configuration
Viewed 1323 times since Sun, Jan 31, 2016
Nagios XI - Exporting the Config Database
Viewed 3100 times since Wed, Jan 27, 2016
Nagios XI - How to Monitor Apache Cassandra Distributed Databases
Viewed 2147 times since Thu, Jan 28, 2016