summaryrefslogtreecommitdiff
path: root/monitoring
diff options
context:
space:
mode:
authorSam Chudnick <sam@chudnick.com>2022-05-21 14:34:30 -0400
committerSam Chudnick <sam@chudnick.com>2022-05-21 14:34:30 -0400
commit9a14ebe66f7c443ca24474a6242151b5f4fac06b (patch)
tree6ba528ea6d988fff8ead0d4eec53b720ca851e5e /monitoring
parent37a376466c6fdc42bd7b8b86241d1fc1ce15389b (diff)
Don't quit on non-zero return status from curl.
Diffstat (limited to 'monitoring')
-rwxr-xr-xmonitoring/icinga-agent6
1 files changed, 3 insertions, 3 deletions
diff --git a/monitoring/icinga-agent b/monitoring/icinga-agent
index e4690fe..6b8e853 100755
--- a/monitoring/icinga-agent
+++ b/monitoring/icinga-agent
@@ -58,10 +58,10 @@ proto="http"
58base="$proto://$master_fqdn/icingaweb2/director/self-service/register-host" 58base="$proto://$master_fqdn/icingaweb2/director/self-service/register-host"
59url="$base?name=$nodename&key=$apikey" 59url="$base?name=$nodename&key=$apikey"
60result=$(curl -m 30 -i $url -H "Accept: application/json" -X "POST" \ 60result=$(curl -m 30 -i $url -H "Accept: application/json" -X "POST" \
61-d "{\"display_name\":\"$displayname\",\"address\":\"$ipv4\",\"address6\":\"$ipv6\"}" \ 61 -d "{\"display_name\":\"$displayname\",\"address\":\"$ipv4\",\"address6\":\"$ipv6\"}")
62|| error "unable to register with master") 62#\|| error "unable to register with master")
63 63
64echo $result | grep -q "error" && error "unable to register with master" 64#echo $result | grep -q "error" && error "unable to register with master"
65 65
66 66
67# Initialize PKI with master 67# Initialize PKI with master