While I don't believe this to be built into Xymon (would be nice to have), I have written scripts that do this by putting a loop in the script with retry logic. Set Xymon to run the script every 30 minutes, if yellow or red is detected, sleep 1 minute check again... repeat 29 times or until green.
Michael Beatty
There's a xymonnet-again script that actually kind of does just this.
"xymonnetagain" picks up the tests that the normal network test consider
"failed", and re-does those
tests more often. This enables Xymon to pick up a recovered network
service faster than
if it were tested only by the "xymonnet" task (which only runs every 5
minutes). So if you have
servers with very high availability guarantees, running this task will
make your availability
reports look much better.
[xymonnetagain] ENVFILE /etc/xymon/xymonserver.cfg NEEDS xymond CMD /etc/xymon/ext/xymonnet-again.sh LOGFILE $XYMONSERVERLOGS/xymonnetagain.log INTERVAL 30s
Of course, that only covers xymonnet-run tests. If you have a custom script, the same logic would be possible. One that runs every so often, and one that runs much more frequently, taking a list of known-to-be-bad hosts.
Another way to do this is with a live query, but that depends on where you allow querying from. Something like: 'xymon $XYMSRV "xymondboard test=thetest color=yellow,red fields=hostname" | xargs -r /usr/bin/yourtestscript.sh
On 05/02/2013 03:07 AM, Andrey Chervonets wrote:
Is it possible to define different check interval for custom tests?
for example, we check tablespaces space usage in database. For some tests we do not to check once per 5 min just because of performance impact of some complex requests.
When status is green - we do check every 30 min. But if status is yellow and red - the DBA can make fix faster then in 30 min (or even situation can change faster) and it would nice to reflect correct status earlier then in 30 min.
Is i possible now or may be it can be implemented in next release?
Best regards,
Andrey Chervonets
Part of the issue here is that xymond (the central daemon) is not really in charge of scheduling. That's by design, as the core needs to first-and-foremost handle message passing traffic and current status records (and noting message expiration times). It's really up to the external programs (like xymonnet) to take their config, query the status (if needed), and schedule or perform their checks accordingly.
Regards,
-jc