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"
);

View File

@ -24,6 +24,11 @@ To include users that have `Global-Read`, `Administrator` or `Normal-User` permi
## Using a Proxy?
[Proxy Configuration](../Support/Configuration.md#proxy-support)
## Using a AMQP based Transport?
You need to install an additional php module : `bcmath` (eg `php72w-bcmath` for
Centos 7)
## Alertmanager
Alertmanager is an alert handling software, initially developed for alert processing sent by Prometheus.
@ -74,7 +79,7 @@ Copy your access token from the Boxcar app or from the Boxcar.io website and set
## Canopsis
Canopsis is a hypervision tool. LibreNMS can send alerts to Canopsis which are then converted to canopsis events.
[Canopsis Docs](http://www.canopsis.org/wp-content/themes/canopsis/doc/sakura/user-guide/event-spec.html)
[Canopsis Docs](https://doc.canopsis.net/guide-developpement/struct-event/)
**Example:**