Good afternoon,
I would like to be able to set the check_interval in generic-service in templates.cfg to 0.25 (that is 15 seconds) to match (refresh_rate=15) in /usr/local/nagios/etc/cgi.cfg
Although this doesn't result in any errors when I verify, I just wanted to check that this was a valid value to use.
Thanks in advance
Pete
check_interval minimum value
Re: check_interval minimum value
+1 for an update to this documentation pretty please
https://assets.nagios.com/downloads/nag ... uling.html
To my knowledge, as long as the interval is >= 0, you should be fine. Granted an interval of exactly 0 means the check is never executed, it's a totally valid configuration.
It's worth mentioning that, for the current tests written for Nagios Core, an interval between 0 and 1 is never actually used. Might be room for improvement there. Ref:
https://github.com/NagiosEnterprises/na ... t_events.c
https://github.com/NagiosEnterprises/na ... t_checks.c
Though in the code itself, the struct for both services and hosts type check_interval as a double:
https://github.com/NagiosEnterprises/na ... /objects.h
Which means there shouldn't ever be a configuration issue for values between 0 and 1.
A worker itself is allowed to be created (eg a check is allowed to be executed) when the last_check time plus the object's check_interval is greater than the current time:
https://github.com/NagiosEnterprises/na ... ers.c#L138
TL;DR Yeah that should work fine. Seems to work exactly how you'd expect it to on my 4.3.2 machine: Might be worth having a dev/tech chime in though because I haven't seen those parts of the code before today and can't find supporting documentation
https://assets.nagios.com/downloads/nag ... uling.html
To my knowledge, as long as the interval is >= 0, you should be fine. Granted an interval of exactly 0 means the check is never executed, it's a totally valid configuration.
It's worth mentioning that, for the current tests written for Nagios Core, an interval between 0 and 1 is never actually used. Might be room for improvement there. Ref:
https://github.com/NagiosEnterprises/na ... t_events.c
https://github.com/NagiosEnterprises/na ... t_checks.c
Though in the code itself, the struct for both services and hosts type check_interval as a double:
https://github.com/NagiosEnterprises/na ... /objects.h
Which means there shouldn't ever be a configuration issue for values between 0 and 1.
A worker itself is allowed to be created (eg a check is allowed to be executed) when the last_check time plus the object's check_interval is greater than the current time:
https://github.com/NagiosEnterprises/na ... ers.c#L138
TL;DR Yeah that should work fine. Seems to work exactly how you'd expect it to on my 4.3.2 machine: Might be worth having a dev/tech chime in though because I haven't seen those parts of the code before today and can't find supporting documentation
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
- Posts: 329
- Joined: Fri Jul 24, 2015 11:04 am
Re: check_interval minimum value
I've just come back to this and it answers my question, so the thread can be closed. Thank you!
Re: check_interval minimum value
Sounds good! I'll be closing this thread!
If you have any more questions, feel free to create another thread.
Thanks for using the Nagios Support Forum!
If you have any more questions, feel free to create another thread.
Thanks for using the Nagios Support Forum!