add method for querying list of proxies
This commit is contained in:
@@ -346,7 +346,7 @@ export class ZabbixAPIConnector {
|
||||
value: 1
|
||||
},
|
||||
selectGroups: ['name'],
|
||||
selectHosts: ['name', 'host', 'maintenance_status'],
|
||||
selectHosts: ['name', 'host', 'maintenance_status', 'proxy_hostid'],
|
||||
selectItems: ['name', 'key_', 'lastvalue'],
|
||||
selectLastEvent: 'extend',
|
||||
selectTags: 'extend'
|
||||
@@ -463,6 +463,14 @@ export class ZabbixAPIConnector {
|
||||
return triggers;
|
||||
});
|
||||
}
|
||||
|
||||
getProxies() {
|
||||
var params = {
|
||||
output: ['proxyid', 'host'],
|
||||
};
|
||||
|
||||
return this.request('proxy.get', params);
|
||||
}
|
||||
}
|
||||
|
||||
function filterTriggersByAcknowledge(triggers, acknowledged) {
|
||||
|
||||
@@ -8,16 +8,16 @@ import { ZabbixNotImplemented } from './connectors/dbConnector';
|
||||
|
||||
const REQUESTS_TO_PROXYFY = [
|
||||
'getHistory', 'getTrend', 'getGroups', 'getHosts', 'getApps', 'getItems', 'getMacros', 'getItemsByIDs',
|
||||
'getEvents', 'getAlerts', 'getHostAlerts', 'getAcknowledges', 'getITService', 'getSLA', 'getVersion'
|
||||
'getEvents', 'getAlerts', 'getHostAlerts', 'getAcknowledges', 'getITService', 'getSLA', 'getVersion', 'getProxies'
|
||||
];
|
||||
|
||||
const REQUESTS_TO_CACHE = [
|
||||
'getGroups', 'getHosts', 'getApps', 'getItems', 'getMacros', 'getItemsByIDs', 'getITService'
|
||||
'getGroups', 'getHosts', 'getApps', 'getItems', 'getMacros', 'getItemsByIDs', 'getITService', 'getProxies'
|
||||
];
|
||||
|
||||
const REQUESTS_TO_BIND = [
|
||||
'getHistory', 'getTrend', 'getMacros', 'getItemsByIDs', 'getEvents', 'getAlerts', 'getHostAlerts',
|
||||
'getAcknowledges', 'getITService', 'getVersion', 'login', 'acknowledgeEvent'
|
||||
'getAcknowledges', 'getITService', 'getVersion', 'login', 'acknowledgeEvent', 'getProxies'
|
||||
];
|
||||
|
||||
export class Zabbix {
|
||||
|
||||
Reference in New Issue
Block a user