diff --git a/src/datasource-zabbix/query.controller.js b/src/datasource-zabbix/query.controller.js index 921da2f..c2c2bd5 100644 --- a/src/datasource-zabbix/query.controller.js +++ b/src/datasource-zabbix/query.controller.js @@ -113,7 +113,7 @@ export class ZabbixQueryController extends QueryCtrl { .then(groups => { var groupids = _.map(groups, 'groupid'); return self.zabbix - .getHostsByGroups(groupids) + .getHosts(groupids) .then(hosts => { self.metric.hostList = hosts; return hosts; diff --git a/src/datasource-zabbix/zabbixAPI.service.js b/src/datasource-zabbix/zabbixAPI.service.js index 9ce52d7..5c3181c 100644 --- a/src/datasource-zabbix/zabbixAPI.service.js +++ b/src/datasource-zabbix/zabbixAPI.service.js @@ -136,15 +136,6 @@ function ZabbixAPIService($q, alertSrv, zabbixAPICoreService) { return this.request('host.get', params); } - getHostsByGroups(groupids) { - var params = { - output: ['name', 'host'], - groupids: groupids - }; - - return this.request('host.get', params); - } - getApps(hostids) { var params = { output: ['applicationid', 'name'], @@ -154,19 +145,6 @@ function ZabbixAPIService($q, alertSrv, zabbixAPICoreService) { return this.request('application.get', params); } - getApplications() { - var params = { - output: ['applicationid', 'name'], - - // Hack for supporting different apis (2.2 vs 2.4 vs 3.0) - selectHost: ['hostid'], - selectHosts: ['hostid'], - selectItems: ['itemid'] - }; - - return this.request('application.get', params); - } - getItems(hostids, appids) { var params = { output: [ @@ -195,30 +173,6 @@ function ZabbixAPIService($q, alertSrv, zabbixAPICoreService) { }); } - /** - * Get Hosts list with host's items. - * @return {[type]} [description] - */ - getHostsExtend() { - var params = { - output: ['name', 'host'], - sortfield: 'name', - selectGroups: ['groupid'], - selectApplications: ['applicationid'], - selectItems: [ - 'itemid', - 'name', - 'key_', - 'value_type', - 'hostid', - 'status', - 'state' - ] - }; - - return this.request('host.get', params); - } - getLastValue(itemid) { var params = { output: ['lastvalue'],