Skip to content
Snippets Groups Projects
Commit 6c3e98d9 authored by Mark Harrison's avatar Mark Harrison
Browse files

Make the timelimit configurable for WALCHECK

git-svn-id: https://labs.omniti.com/resmon/trunk@417 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55
parent 90d9cced
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,7 @@ sub splittime {
sub handler {
my $arg = shift;
my $logdir = $arg->{'logdir'};
my $limit = $arg->{'limit'} || 3600;
opendir(D, $logdir);
my @files = sort grep /^postgresql-[\d-]+_?\d*\.log$/, readdir(D);
closedir(D);
......@@ -55,7 +56,7 @@ sub handler {
my $diff = $lnow - $proc;
my @tsplit = splittime((0 - $diff),60,60,24,7);
if ($diff > 3600)
if ($diff > $limit)
{
return "BAD($diff seconds behind)";
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment