ctdb-scripts: Support periodic printing of warnings
In the case where a failcount only produces warnings (not
errors/unhealthy), the warnings could continue forever. A constant
stream of warnings could dominate the logs, possibly obscuring other
useful messages.
To avoid this, add interval-based printing of warnings. It can be set
to "hourly", "daily", any number of seconds (up to 4 digits) or
"none" (no periodic warning, use current behaviour). The default is
"hourly".
Generally, the same interval will apply to all failcounts in a script.
However, multiple carefully placed calls to
failcount_set_warning_interval() can cause different intervals to be
used for different counters.
Add an extra unit test for vsftp monitoring to test this.
Signed-off-by: Martin Schwenke <mschwenke@ddn.com> Reviewed-by: Amitay Isaacs <amitay@gmail.com>