Best way to distribute checks on different time_periods?

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.
Post Reply
WEBudo
Posts: 1
Joined: Thu Sep 29, 2022 6:01 pm

Best way to distribute checks on different time_periods?

Post by WEBudo »

I have some services that need to check twice a day during specific time periods all days of the week, so I defined a timeperiod that has 08:00-10:00,17:00-19:00 for each day of the week.
Other services need to be checked only once per day, on weekdays, from 08:00-14:00.

The services need to be monitored only once during each period, and checks must be spaced/spread evenly during those periods.
This is because each service queries different data on the same server, and each check can return results between 1 or 3 minutes.

So I changed the following value on nagios.conf:
max_service_check_spread=360 (So during the 08:00-14:00 timeperiod, all services get distributed evenly)

The problem I have is that the services that "fit" on the 08:00-10:00,17:00-19:00 window are not scheduled evenly, and most of the time outside the timeperiod.

I also understood from trial-failure that the "spreading of service checks" only happens when nagios starts (or reloads).

Is there any good way I can acomplish what I need? Any ideas will be appreciated.

Thanks!
Post Reply