diff --git a/LibreNMS/Alert/Transport/Api.php b/LibreNMS/Alert/Transport/Api.php index 178c95741e..5f1f100344 100644 --- a/LibreNMS/Alert/Transport/Api.php +++ b/LibreNMS/Alert/Transport/Api.php @@ -85,6 +85,10 @@ class Api extends Transport $res = $client->request('PUT', $host, $request_opts); } else { //Method POST $request_opts['form_params'] = $query; + foreach ($query as $metric => $value) { // replace all variables defined in Options and found in Body for their values + $body = str_replace('{{ $' . $metric . ' }}', $value, $body); + } + $request_opts['body'] = $body; $res = $client->request('POST', $host, $request_opts); }