Implemented minor changes as suggested by maintainer
This commit is contained in:
parent
e4e5d3631c
commit
eda5c9b4b4
|
@ -21,6 +21,9 @@ reloading, inactive, failed, activating, deactivating) like so:
|
||||||
env.failed_critical 5
|
env.failed_critical 5
|
||||||
env.inactive_warning 10
|
env.inactive_warning 10
|
||||||
env.inactive_critical 20
|
env.inactive_critical 20
|
||||||
|
|
||||||
|
Note that for failed units, default warning and critical values are set to 0 and 10, respectively. No other
|
||||||
|
states have default levels set.
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHOR
|
||||||
|
|
||||||
|
@ -39,6 +42,9 @@ GPLv2
|
||||||
|
|
||||||
. "$MUNIN_LIBDIR/plugins/plugin.sh"
|
. "$MUNIN_LIBDIR/plugins/plugin.sh"
|
||||||
|
|
||||||
|
failed_warning="${failed_warning:-0}"
|
||||||
|
failed_critical="${failed_critical:-10}"
|
||||||
|
|
||||||
states="active \
|
states="active \
|
||||||
reloading \
|
reloading \
|
||||||
inactive \
|
inactive \
|
||||||
|
@ -61,14 +67,8 @@ EOF
|
||||||
for state in $states; do
|
for state in $states; do
|
||||||
echo "$state.label $state"
|
echo "$state.label $state"
|
||||||
echo "$state.draw AREASTACK"
|
echo "$state.draw AREASTACK"
|
||||||
# Set default alert levels for failed units
|
print_warning $state
|
||||||
if [ "$state" = "failed" ]; then
|
print_critical $state
|
||||||
failed_warning="${failed_warning:-0}" print_warning $state
|
|
||||||
failed_critical="${failed_critical:-10}" print_critical $state
|
|
||||||
else
|
|
||||||
print_warning $state
|
|
||||||
print_critical $state
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue