How to change host check time to every second ?

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
haseebraza
Posts: 8
Joined: Mon Apr 08, 2019 4:52 pm

How to change host check time to every second ?

Post by haseebraza »

Hi folks, as you always doing great by helping others once again i need help in tiny matter !!!
I have added switches and routers to nagios core 4.46 but i was able to reduce to host check time to every 15 second.
Can we change this to lower value in seconds like every second ?
is_kim
Posts: 9
Joined: Tue Feb 04, 2020 9:38 am

Re: How to change host check time to every second ?

Post by is_kim »

Hi,

As far I know Nagios was built to run checks every minute. I know some situations you'd like to reduce this time between checks, but I think the purpose of Nagios was not meant to be a real-time monitoring. Of course, you can use passive checks to deploy results with less than one minute (because Nagios is awaiting to receive this data), but I don't know if the log generation will work properly, specially when you want to generate Trends/Availability Reports.

I hope this helps you. If not, I suggest you take a look at the documentation ; )
https://assets.nagios.com/downloads/nag ... core/4/en/
User avatar
Rfferrao13
Posts: 12
Joined: Tue Aug 09, 2016 3:56 pm

Re: How to change host check time to every second ?

Post by Rfferrao13 »

Yes, you can -- although, as pointed by @is_kim, Nagios may not be able to handle it properly (and/or even keep up with it if there's a large amount of checks running at once). The interval_length option in nagios.cfg is used with the time interval specification for the object configuration files.

As per the Main Configuration File Options documentation (https://assets.nagios.com/downloads/nag ... gmain.html):
Timing Interval Length

Format: interval_length=<seconds>
Example: interval_length=60

This is the number of seconds per "unit interval" used for timing in the scheduling queue, re-notifications, etc. "Units intervals" are used in the object configuration file to determine how often to run a service check, how often to re-notify a contact, etc.

Important: The default value for this is set to 60, which means that a "unit value" of 1 in the object configuration file will mean 60 seconds (1 minute). I have not really tested other values for this variable, so proceed at your own risk if you decide to do so!
haseebraza
Posts: 8
Joined: Mon Apr 08, 2019 4:52 pm

Re: How to change host check time to every second ?

Post by haseebraza »

Really appreciated for your help, i am able to change the check_host and check_ping time to 15 sec.
if i go down then it produces some unknown issue like some times it gives duration of 7 second then 15 then 8 then 20+.
So i think 15 sec is enough.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to change host check time to every second ?

Post by scottwilkerson »

haseebraza wrote:Really appreciated for your help, i am able to change the check_host and check_ping time to 15 sec.
if i go down then it produces some unknown issue like some times it gives duration of 7 second then 15 then 8 then 20+.
So i think 15 sec is enough.
Glad to see it is solved

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked