summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"