diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2022-08-18 15:02:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 15:02:17 +0300 |
commit | 3838e0a6ceda1f637acb0dd3373b2256af9315cc (patch) | |
tree | 14c46e1d7da5f1e192d939f9754318343cf13bc0 /health | |
parent | f37f43c237bb6957c34d810b3abc51d8a5ae686e (diff) |
fix(health): set default curl connection timeout if not set (#13529)
Diffstat (limited to 'health')
-rwxr-xr-x | health/notifications/alarm-notify.sh.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/health/notifications/alarm-notify.sh.in b/health/notifications/alarm-notify.sh.in index 0dfecade5b..d26f84130e 100755 --- a/health/notifications/alarm-notify.sh.in +++ b/health/notifications/alarm-notify.sh.in @@ -428,6 +428,10 @@ else done fi +if [[ ! $curl_options =~ .*\--connect-timeout ]]; then + curl_options+=" --connect-timeout 5" +fi + OPSGENIE_API_URL=${OPSGENIE_API_URL:-"https://api.opsgenie.com"} # If we didn't autodetect the character set for e-mail and it wasn't |