summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2012-12-06 03:04:16 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2012-12-06 03:04:16 +0100
commit2f29d57b8879baa185f0802788a91d4e1ef27b38 (patch)
treea00ff0de414463e0f3da5b067bbd439dd44d6c3a
parenteb285190a2d605502885c3d1a1dc9992955f7950 (diff)
downloadbcfg2-tools-2f29d57b8879baa185f0802788a91d4e1ef27b38.tar.gz
bcfg2-tools-2f29d57b8879baa185f0802788a91d4e1ef27b38.tar.bz2
bcfg2-tools-2f29d57b8879baa185f0802788a91d4e1ef27b38.zip
check-hosts: remove fqdn magic
-rwxr-xr-xcheck-hosts15
1 files changed, 7 insertions, 8 deletions
diff --git a/check-hosts b/check-hosts
index ecd66ab..9ef973c 100755
--- a/check-hosts
+++ b/check-hosts
@@ -53,25 +53,24 @@ get_nagios() {
echo "$status | clean=$clean; bad=$bad; extra=$extra; stale=$stale;"
exit $exit
else
- host="${1/%spline.de/spline.inf.fu-berlin.de}"
- if ! get_names -a | grep -q "^$host$"; then
- echo "CRITICAL $host not known to bcfg2"
+ if ! get_names -a | grep -q "^$1$"; then
+ echo "CRITICAL $1 not known to bcfg2"
exit 2
fi
- if get_names --stale | grep -q "^$host$"; then
- echo "CRITICAL $host is stale"
+ if get_names --stale | grep -q "^$1$"; then
+ echo "CRITICAL $1 is stale"
exit 2
fi
- bad=$(get_count -b "$host")
+ bad=$(get_count -b "$1")
if [ "$bad" != "0" ]; then
echo "CRITICAL $bad bad entries"
exit 2
fi
- extra=$(get_count -e "$host")
- total=$(bcfg2-reports -t "$host" | sed "s/good: [0-9]*)/extra: $extra)/")
+ extra=$(get_count -e "$1")
+ total=$(bcfg2-reports -t "$1" | sed "s/good: [0-9]*)/extra: $extra)/")
echo "OK $total"
fi
}