Canopsis transport (#9795)

* Change in the Canopsis transport to make it 3.9.0 compliant and link to
the new documentation

* Add missing php72 module on Centos

* Fixing documentation for AMQP based tranport outside of the main doc
This commit is contained in:
aylham
2019-02-11 16:46:09 +01:00
committed by Tony Murray
parent 7e18a07088
commit cf1701624f
2 changed files with 12 additions and 8 deletions

View File

@@ -23,7 +23,7 @@ class Canopsis extends Transport
$host = $opts["host"];
$port = $opts["port"];
$user = $opts["user"];
$pass = $opts["passwd"];
$pass = $opts["pass"];
$vhost = $opts["vhost"];
$exchange = "canopsis.events";
@@ -41,13 +41,13 @@ class Canopsis extends Transport
$state = 0;
break;
case "warning":
$state = 1;
break;
case "critical":
$state = 2;
break;
default:
case "critical":
$state = 3;
break;
default:
$state = 0;
}
$msg_body = array(
"timestamp" => time(),
@@ -56,9 +56,8 @@ class Canopsis extends Transport
"event_type" => "check",
"source_type" => "resource",
"component" => $obj['hostname'],
"resource" => $obj['faults'][1]['storage_descr'],
"resource" => $obj['name'],
"state" => $state,
"state_type" => 1,
"output" => $obj['msg'],
"display_name" => "librenms"
);