mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@@ -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"
|
||||
);
|
||||
|
Reference in New Issue
Block a user