getScripts method

This commit is contained in:
Alexander Zobnin
2020-05-27 11:09:37 +03:00
parent 6a0c5e0dd0
commit fd775aa9d7
3 changed files with 28 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ import * as utils from '../../../utils';
import { ZabbixAPICore } from './zabbixAPICore';
import { ZBX_ACK_ACTION_NONE, ZBX_ACK_ACTION_ACK, ZBX_ACK_ACTION_ADD_MESSAGE, MIN_SLA_INTERVAL } from '../../../constants';
import { ShowProblemTypes, ZBXProblem } from '../../../types';
import { JSONRPCRequestParams } from './types';
import { JSONRPCRequestParams, APIScriptGetResponse } from './types';
const DEFAULT_ZABBIX_VERSION = '3.0.0';
@@ -664,6 +664,15 @@ export class ZabbixAPIConnector {
return this.request('proxy.get', params);
}
getScripts(hostids: string[], options?: any): APIScriptGetResponse {
const params: any = {
output: 'extend',
hostids,
};
return this.request('script.get', params);
}
}
function filterTriggersByAcknowledge(triggers, acknowledged) {