From ef80db4bc1a4967722bdb34ebfb9fd34b33bdee3 Mon Sep 17 00:00:00 2001 From: Olivier Mehani Date: Tue, 25 Oct 2016 21:21:24 +1100 Subject: [PATCH] [systemd] Remove half-baked suggest Signed-off-by: Olivier Mehani --- plugins/system/systemd | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/plugins/system/systemd b/plugins/system/systemd index 40f388d5..cb0f183d 100755 --- a/plugins/system/systemd +++ b/plugins/system/systemd @@ -17,7 +17,7 @@ None needed. =head1 AUTHOR -Olivier Mehani +Olivier Mehani =head1 LICENSE @@ -26,7 +26,7 @@ GPLv2 =head1 MAGIC MARKERS #%# family=auto - #%# capabilities=autoconf suggest + #%# capabilities=autoconf =cut @@ -41,33 +41,22 @@ autoconf() { systemctl --state=failed --no-pager --no-legend >/dev/null 2>&1 && echo yes || echo "no (No systemctl or error running it)" } -suggest() { - echo "units" -} - config () { - case $1 in - "units") - cat << EOF + cat << EOF graph_title Systemd units state graph_args -l 0 graph_category system graph_scale no graph_vlabel units EOF -for state in $states; do - echo "$state.label $state" - echo "$state.draw AREASTACK" - if [ $state = failed ]; then - echo "$state.warning 0" - echo "$state.critical 10" - fi -done - ;; - "*") - echo "$0: unknown mode '$1'" >&2 - exit 1 - esac + for state in $states; do + echo "$state.label $state" + echo "$state.draw AREASTACK" + if [ $state = failed ]; then + echo "$state.warning 0" + echo "$state.critical 10" + fi + done } fetch () { @@ -99,9 +88,6 @@ case $1 in "autoconf") autoconf ;; - "suggest") - suggest - ;; "config") config $mode ;;