It is possible to get supported macros from
put in variable bash script and send in json body?
Something like thath:
put in variable bash script and send in json body?
Something like thath:
Code:
#!/bin/bash
url="my_endpoint"
alert_subject="Severity:{EVENT.SEVERITY} Problem on:{HOST.HOST} - {EVENT.NAME}"
alert_message="There is a problem on {HOST.HOST} - {EVENT.NAME} with severity: {EVENT.SEVERITY} since {EVENT.DATE}"
bearertoken="my_token"
json_data='{
my_json_body
}'
response=$(curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $bearertoken" -d "$json_data" -k "$url")
echo "$response"
Comment