spelling: errlevel
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
parent
cad1215501
commit
c37f412797
8
sanoid
8
sanoid
|
@ -130,7 +130,7 @@ sub monitor_snapshots {
|
|||
|
||||
my ($config, $snaps, $snapsbytype, $snapsbypath) = @_;
|
||||
my %datestamp = get_date();
|
||||
my $errorlevel = 0;
|
||||
my $errlevel = 0;
|
||||
my $msg;
|
||||
my @msgs;
|
||||
my @paths;
|
||||
|
@ -169,7 +169,7 @@ sub monitor_snapshots {
|
|||
my $dispcrit = displaytime($crit);
|
||||
if ( $elapsed > $crit || $elapsed == -1) {
|
||||
if ($crit > 0) {
|
||||
if (! $config{$section}{'monitor_dont_crit'}) { $errorlevel = 2; }
|
||||
if (! $config{$section}{'monitor_dont_crit'}) { $errlevel = 2; }
|
||||
if ($elapsed == -1) {
|
||||
push @msgs, "CRIT: $path has no $type snapshots at all!";
|
||||
} else {
|
||||
|
@ -178,7 +178,7 @@ sub monitor_snapshots {
|
|||
}
|
||||
} elsif ($elapsed > $warn) {
|
||||
if ($warn > 0) {
|
||||
if (! $config{$section}{'monitor_dont_warn'} && ($errorlevel < 2) ) { $errorlevel = 1; }
|
||||
if (! $config{$section}{'monitor_dont_warn'} && ($errlevel < 2) ) { $errlevel = 1; }
|
||||
push @msgs, "WARN: $path newest $type snapshot is $dispelapsed old (should be < $dispwarn)";
|
||||
}
|
||||
} else {
|
||||
|
@ -196,7 +196,7 @@ sub monitor_snapshots {
|
|||
if ($msg eq '') { $msg = "OK: all monitored datasets \($paths\) have fresh snapshots"; }
|
||||
|
||||
print "$msg\n";
|
||||
exit $errorlevel;
|
||||
exit $errlevel;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue