Edit the file at:
1 |
/opt/zimbra/libexec/zmdisklog |
Look for these lines:
1 2 |
my $DISK_CRIT_THRESHOLD = 90; my $DISK_WARN_THRESHOLD = 80; |
Change them as desired to give different warning/critical levels.
In one case that we worked on, the server had multiple partitions. We wanted different thresholds on each partition which was accomplished with the following patch:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
--- zmdisklog.orig 2009-03-08 15:10:26.000000000 -0400 +++ zmdisklog 2009-03-08 15:13:21.000000000 -0400 @@ -77,8 +77,12 @@ my (undef, $total, $used, $avail) = split(/\s+/, $df[0]); my $pct=int(($used/$total)*100) if ($total > 0); my $lvl = "info"; +if ($dev eq "/dev/sdb1") { + $lvl = "err" if ($pct > 95); +} else { $lvl = "err" if ($pct > $DISK_WARN_THRESHOLD); $lvl = "crit" if ($pct > $DISK_CRIT_THRESHOLD); +}; if ($lvl eq "info") { Zimbra::Mon::Logger::Log( "$lvl", "$dt, DISK: ${hostname}: dev: $dev, mp: $mp, tot: $total, avail: $avail" ); } else { |