interval period

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

interval period

Post by DOkuwa »

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
}
dwasswa

Re: interval period

Post by dwasswa »

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.
acefreakz
Posts: 9
Joined: Mon Dec 26, 2016 6:20 am

Re: interval period

Post by acefreakz »

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?
dwasswa

Re: interval period

Post by dwasswa »

Thanks @acefreakz.

@DOkuwa, did the information I gave you answer your questions?
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: interval period

Post by DOkuwa »

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
kyang

Re: interval period

Post by kyang »

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?
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: interval period

Post by DOkuwa »

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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: interval period

Post by npolovenko »

@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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
DOkuwa
Posts: 114
Joined: Tue Aug 15, 2017 3:54 pm

Re: interval period

Post by DOkuwa »

Please close this case as matter has been resolved
Locked