summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-07-25 15:57:09 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-07-25 15:57:09 +0200
commitbb45317437337c526531c21cf63fbe750e93dc10 (patch)
treed2a655a25837f73c31d9c58b4430a2bd46f513e9
parent4b9b8e7de2e127b179bcae3599f52c503bd20023 (diff)
downloaditzks-systems-bb45317437337c526531c21cf63fbe750e93dc10.tar.gz
itzks-systems-bb45317437337c526531c21cf63fbe750e93dc10.tar.bz2
itzks-systems-bb45317437337c526531c21cf63fbe750e93dc10.zip
usr-lib-nagios-plugins/check_puppetmaster.sh: Silence grep output.
-rwxr-xr-xusr-lib-nagios-plugins/check_puppetmaster.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr-lib-nagios-plugins/check_puppetmaster.sh b/usr-lib-nagios-plugins/check_puppetmaster.sh
index 67bd249..0708a34 100755
--- a/usr-lib-nagios-plugins/check_puppetmaster.sh
+++ b/usr-lib-nagios-plugins/check_puppetmaster.sh
@@ -115,7 +115,7 @@ PERF_TIME=$( perl -e "printf('%1.3f', $T2 - $T1);" )
if [ "$CURL_RESULT" != 0 ]; then
EXIT=2
MESSAGE="${URL} $CURL_NODE"
-elif echo $CURL_NODE | grep '"environment":'; then
+elif echo $CURL_NODE | grep -q '"environment":'; then
FOUND=$( echo "$CURL_NODE" | sed -r -e 's/.*"environment":"([^"]+)".*/\1/' )
EXIT=0
MESSAGE="found '${FOUND}' in https://${PUPPETMASTER}:${PORT}/puppet/v3/node/${HOST}?environment=production"