changed how zabbix syncs
This commit is contained in:
@@ -32,13 +32,6 @@ class Zabbix {
|
||||
return json_decode($result, true);
|
||||
}
|
||||
|
||||
public function getAllCongestionInterfaces() {
|
||||
$response = $this->zabbixRequest('item.get', array(
|
||||
'search' => array('name' => array("Congestion")),
|
||||
));
|
||||
return $response['result'];
|
||||
}
|
||||
|
||||
public function getHostById($hostId) {
|
||||
$response = $this->zabbixRequest('host.get', array(
|
||||
'hostids' => $hostId
|
||||
@@ -57,11 +50,19 @@ class Zabbix {
|
||||
return $response['result'];
|
||||
}
|
||||
|
||||
public function getHosts($hostname) {
|
||||
$response = $this->zabbixRequest('host.get', array(
|
||||
'search' => array('name' => array($hostname))
|
||||
));
|
||||
return $response['result'];
|
||||
public function getHosts($hostname = null, $ip = null) {
|
||||
if ($hostname) {
|
||||
$response = $this->zabbixRequest('host.get', array(
|
||||
'search' => array('name' => array($hostname))
|
||||
));
|
||||
return $response['result'];
|
||||
} elseif ($ip) {
|
||||
$response = $this->zabbixRequest('host.get', array(
|
||||
'search' => array('ip' => array($ip))
|
||||
));
|
||||
return $response['result'];
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
public function getHostInterfaceItems($hostId) {
|
||||
|
||||
Reference in New Issue
Block a user