added zabbix integration for statistics
This commit is contained in:
@@ -9,7 +9,7 @@ class Zabbix {
|
||||
$this->apiKey = $apiKey;
|
||||
}
|
||||
|
||||
public function zabbixRequest($method, $params) {
|
||||
public function zabbixRequest($method, $params, $die = false) {
|
||||
$data = array(
|
||||
'jsonrpc' => '2.0',
|
||||
'method' => $method,
|
||||
@@ -26,6 +26,13 @@ class Zabbix {
|
||||
)
|
||||
);
|
||||
|
||||
// var dump options and data and die
|
||||
if ($die) {
|
||||
var_dump($options);
|
||||
echo json_encode($data);
|
||||
die();
|
||||
}
|
||||
|
||||
$context = stream_context_create($options);
|
||||
$result = file_get_contents($this->url, false, $context);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user