Nagios restart mucks with service check schedule
nagios at mm.quex.org
nagios at mm.quex.org
Tue Nov 2 02:23:24 CET 2004
On Mon, Nov 01, 2004 at 02:19:11PM -0500, Robert Nelson wrote:
> I'm using Nagios v1.2 and running into a bit of a problem with
> scheduling. My template specifies 5 minutes for normal checks, and in
> select definitions I've been setting it to 1 minute. Doesn't seem to be
> taking that into account on a reload/reschedule, however.
>
> After restarting nagios (service nagios reload), Nagios reschedules
> service checks. For someone reason, this check (and others like it)
> get scheduled for up to 5 minutes later, depending on where they fall
> in the semi-random scheduling. After that first check is processed,
> the next check is scheduled for 1 minute later. Normally I wouldn't
> worry about it, but I'm processing performance data on this service
> too.
>
> Is there any known issue with service check scheduling I should be
> aware of, or a way around it?
If it's only a few services that you need to make sure are re-scheduled
properly straight away, you could perhaps work around it by having your
Nagios reload/restart script send a command to Nagios to force a
reschedule of the services each time you reload it. Nasty ugly hack,
yes, but it should do the trick and having it in the config file means
you won't forget to do it.
Something along the lines of this should do it (bash script):
####
NAGIOSCMD=/var/log/nagios/rw/nagios.cmd;
timestamp=$(/bin/date +%s);
for service in 'somehost:Some Service' \
'anotherhost:Another Service';
do
host=${service%:*};
svc=${service#*:};
echo "[$timestamp] SCHEDULE_FORCED_SVC_CHECK;$host;$svc;$timestamp" \
> "$NAGIOSCMD";
done
####
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list