summaryrefslogtreecommitdiff
path: root/etc/functions
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2010-09-11 16:31:24 +0200
committerDaniel Friesel <derf@finalrewind.org>2010-09-11 16:31:24 +0200
commit2639906d8c0f95050cd7038387514f416abbf95f (patch)
tree824604034d73f777c377dee0e6773d19ce1394d7 /etc/functions
parent5e3c16484071bf924501d4f28e9b464771c6e246 (diff)
Remove icinga-status function. I'm using icinga-cli anyways.
Diffstat (limited to 'etc/functions')
-rw-r--r--etc/functions/icinga-status33
1 files changed, 0 insertions, 33 deletions
diff --git a/etc/functions/icinga-status b/etc/functions/icinga-status
deleted file mode 100644
index dcb6c7f..0000000
--- a/etc/functions/icinga-status
+++ /dev/null
@@ -1,33 +0,0 @@
-typeset output
-typeset sv_ok sv_warn sv_crit sv_unknown
-typeset host_up host_down host_unreachable
-
-output=($(ssh aneurysm \
-'/usr/sbin/icingastats -md NUMSVCOK,NUMSVCWARN,NUMSVCUNKN,NUMSVCCRIT,'\
-'NUMHSTUP,NUMHSTDOWN,NUMHSTUNR'))
-
-function _icinga_format {
- typeset format
-
- case ${1} in
- yellow) format='%F{black}%K{yellow}' ;;
- red) format='%K{red}' ;;
- blue) format='%K{blue}' ;;
- esac
-
- (( ${3} == 0 )) && format=
-
- print -Pn ${format}
-
- printf "%-16s %s%s" ${2} $(print -P '%F{default}%K{default}') ${3}
- echo
-}
-
-_icinga_format green 'Service OK' ${output[1]}
-_icinga_format yellow 'Sercice WARN' ${output[2]}
-_icinga_format blue 'Service UNKNOWN' ${output[3]}
-_icinga_format red 'Service CRIT' ${output[4]}
-echo
-_icinga_format green 'Host UP' ${output[5]}
-_icinga_format red 'Host DOWN' ${output[6]}
-_icinga_format blue 'Host UNREACHABLE' ${output[7]}