sub custom_post_alert_to_opsgenie { my %opsgenie; my $message = "AKIPS Custom Site Script"; my $opsgenie_alias = "test custom alert"; $opsgenie{url} = "https://api.opsgenie.com/v2/alerts"; $opsgenie{headers} = ["Authorization: GenieKey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx" ]; $opsgenie{method} = "post"; $opsgenie{content_type} = "application/json"; # Uncomment the following line to use proxy # $opsgenie{proxy} = "http://xxxx:3128"; my $data = qq ({"message":" $message ","alias":"$opsgenie_alias","description":"$opsgenie_alias","priority":"P1"}); $opsgenie{data} = $data; http_result (\%opsgenie); }