@cryptotaxi247 / netdata-1 / commits / 76f7e0bfe

fixed automatic correlation

Christian Pradelli committed Dec 20, 2017 at 16:37 UTC 76f7e0bfe50303c22b46591ab1522ce6ce20e657
1 file changed +4 -3
plugins.d/alarm-notify.sh
+4 -3
@@ -1294,15 +1294,16 @@ send_alerta() {
1294 for channel in ${channels}
1295 do
1296 content="{"
1297 - content="$content \"resource\": \"${chart}.${name}\","
1298 - content="$content \"event\": \"${alarm}\","
1297 content="$content \"environment\": \"${channel}\","
1298 content="$content \"service\": [\"${host}\"],"
1299 + content="$content \"resource\": \"${host}\","
1300 + content="$content \"event\": \"${chart}.${name}\","
1301 content="$content \"severity\": \"${severity}\","
1302 - content="$content \"value\": \"${status_message}\","
1302 + content="$content \"value\": \"${alarm}\","
1303 content="$content \"text\": \"${info}\""
1304 content="$content }"
1305
1306 +
1307 httpcode=$(docurl -X POST "${webhook}" -H "Content-Type: application/json" -H "Authorization: Key $ALERTA_API_KEY" -d "$content" )
1308
1309 if [[ "${httpcode}" = "200" || "${httpcode}" = "201" ]]