interval period

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

interval period

Postby DOkuwa » Thu Nov 09, 2017 11:08 am

I want to check the interval just for a particular service and increase the time
I can see the normal_check_interval is this the right one does it means 3secs time
Am I correct that the check_interval is in the service for a particular service and not the check_interval in the nagios.cfg
I also want to change the notification_period from 24/7 to some other value
Code: Select all
define service{
        name                            alcatel-network-ports
        service_description             Alcatel_Network_Ports
        use                             generic-service
        is_volatile                     0
        check_command                   check_alcatel_network_ports
        max_check_attempts                      3
        normal_check_interval           3
        retry_check_interval            1
        active_checks_enabled           1
        check_period                    24x7
        parallelize_check                       1
        obsess_over_service             0
        check_freshness                 0
        flap_detection_enabled          0
        process_perf_data                       0
        retain_status_information               1
        retain_nonstatus_information    0
        notification_interval           180
        notification_period             24x7
        notification_options            w,c,r
        notifications_enabled           1
        contact_groups                  Core_Team
        register                                0
}
DOkuwa
 
Posts: 87
Joined: Tue Aug 15, 2017 3:54 pm

Re: interval period

Postby dwasswa » Thu Nov 09, 2017 5:14 pm

Hi @DOkuwa,

In regards to the check_interval 3, it is a value that is multiplied by the interval_length directive in thenagios.cfg file, which typically is 60. interval_length is the number of seconds that other things like check_interval are multiplied by to get the effective interval.

Please follow this link for more information on that...Main Configuration File Options

Secondly, in regards to the directive notification_period, it is used to specify the short name of the time period during which notifications of events for this host can be sent out to contacts. If a host goes down, becomes unreachable, or recoveries during a time which is not covered by the time period, no notifications will be sent out.


Therefore, yes, you can change it to whatever you want. If you go to /usr/local/nagios/etc/objects and then open the timeperiods.cfg, you will see all the different options already defined for you. You have the liberty to define your own timeperiods just like any other objects in Nagios as long as you make sure you follow the right syntax.

Here is an example of what the timeperiods.cfg will look like:

Code: Select all
# This defines a timeperiod where all times are valid for checks,
# notifications, etc.  The classic "24x7" support nightmare. :-)
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
        }


# 'workhours' timeperiod definition
define timeperiod{
        timeperiod_name workhours
        alias           Normal Work Hours
        monday          09:00-17:00
        tuesday         09:00-17:00
        wednesday       09:00-17:00
        thursday        09:00-17:00
        friday          09:00-17:00
        }


For more information about timeperiods, please follow this link...time period

Please let me know if that answers your question.
dwasswa
 
Posts: 318
Joined: Tue Jul 25, 2017 3:32 pm

Re: interval period

Postby acefreakz » Mon Nov 13, 2017 11:24 pm

Hi @DOkuwa,

Am I correct that the check_interval is in the service for a particular service and not the check_interval in the nagios.cfg

I can't find check_interval setting in nagios.cfg of my installation (4.3.2), so is normal_check_interval (in service definition cfg). What's your Nagios version?
acefreakz
 
Posts: 9
Joined: Mon Dec 26, 2016 6:20 am

Re: interval period

Postby dwasswa » Tue Nov 14, 2017 12:28 pm

Thanks @acefreakz.

@DOkuwa, did the information I gave you answer your questions?
dwasswa
 
Posts: 318
Joined: Tue Jul 25, 2017 3:32 pm

Re: interval period

Postby DOkuwa » Wed Nov 15, 2017 4:13 am

Nagios core 3.2.3 and 4.3.4 both old and new versions on different boxes

There is this command_check_interval=5s in the Nagios.cfg in Nagios core 3.2.3
DOkuwa
 
Posts: 87
Joined: Tue Aug 15, 2017 3:54 pm

Re: interval period

Postby kyang » Wed Nov 15, 2017 5:53 pm

Could you tell us a use case for this?

What is your goal in using a check_interval in 5 seconds? This can't be done in Core as they are set in minutes.

Or can you show me where you are gathering this information?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
kyang
 
Posts: 660
Joined: Tue Jul 25, 2017 3:35 pm

Re: interval period

Postby DOkuwa » Wed Nov 15, 2017 6:11 pm

yes i think that some devices are not responding to ping because the check_interval is too small as the server uses a lot of CPU and memory when doing anything
DOkuwa
 
Posts: 87
Joined: Tue Aug 15, 2017 3:54 pm

Re: interval period

Postby npolovenko » Thu Nov 16, 2017 2:55 pm

@DOkuwa, Well, based on your command check_interval is 3 minutes. That looks normal. So it shouldn't affect the server a lot. What kind of error are you getting in the output from ping check? Are you able to ping the servers from the command line?
User avatar
npolovenko
 
Posts: 354
Joined: Mon May 15, 2017 5:00 pm


Return to Nagios Core

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 25 guests

cron