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"];
|
$host = $opts["host"];
|
||||||
$port = $opts["port"];
|
$port = $opts["port"];
|
||||||
$user = $opts["user"];
|
$user = $opts["user"];
|
||||||
$pass = $opts["passwd"];
|
$pass = $opts["pass"];
|
||||||
$vhost = $opts["vhost"];
|
$vhost = $opts["vhost"];
|
||||||
$exchange = "canopsis.events";
|
$exchange = "canopsis.events";
|
||||||
|
|
||||||
@@ -41,13 +41,13 @@ class Canopsis extends Transport
|
|||||||
$state = 0;
|
$state = 0;
|
||||||
break;
|
break;
|
||||||
case "warning":
|
case "warning":
|
||||||
$state = 1;
|
|
||||||
break;
|
|
||||||
case "critical":
|
|
||||||
$state = 2;
|
$state = 2;
|
||||||
break;
|
break;
|
||||||
default:
|
case "critical":
|
||||||
$state = 3;
|
$state = 3;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$state = 0;
|
||||||
}
|
}
|
||||||
$msg_body = array(
|
$msg_body = array(
|
||||||
"timestamp" => time(),
|
"timestamp" => time(),
|
||||||
@@ -56,9 +56,8 @@ class Canopsis extends Transport
|
|||||||
"event_type" => "check",
|
"event_type" => "check",
|
||||||
"source_type" => "resource",
|
"source_type" => "resource",
|
||||||
"component" => $obj['hostname'],
|
"component" => $obj['hostname'],
|
||||||
"resource" => $obj['faults'][1]['storage_descr'],
|
"resource" => $obj['name'],
|
||||||
"state" => $state,
|
"state" => $state,
|
||||||
"state_type" => 1,
|
|
||||||
"output" => $obj['msg'],
|
"output" => $obj['msg'],
|
||||||
"display_name" => "librenms"
|
"display_name" => "librenms"
|
||||||
);
|
);
|
||||||
|
@@ -24,6 +24,11 @@ To include users that have `Global-Read`, `Administrator` or `Normal-User` permi
|
|||||||
## Using a Proxy?
|
## Using a Proxy?
|
||||||
[Proxy Configuration](../Support/Configuration.md#proxy-support)
|
[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
|
||||||
Alertmanager is an alert handling software, initially developed for alert processing sent by Prometheus.
|
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
|
||||||
Canopsis is a hypervision tool. LibreNMS can send alerts to Canopsis which are then converted to canopsis events.
|
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:**
|
**Example:**
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user