Skip to content

Commit

Permalink
Merge pull request #1 from Sam-H101/zabbix-6.2
Browse files Browse the repository at this point in the history
Zabbix 6.2
  • Loading branch information
leleobhz authored Jul 6, 2022
2 parents 1b02a1c + 6266137 commit 95d1e64
Showing 1 changed file with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ export class ZabbixAPIConnector {
return this.request('event.acknowledge', params);
}

getGroups() {
async getGroups() {
if (!this.version) {
await this.initVersion();
}
if (semver.gte(this.version, '6.2.0'))
{
const params = {
Expand Down Expand Up @@ -500,7 +503,10 @@ export class ZabbixAPIConnector {
return this.request('problem.get', params).then(utils.mustArray);
}

getTriggersByIds(triggerids: string[]) {
async getTriggersByIds(triggerids: string[]) {
if (!this.version) {
await this.initVersion();
}
if (semver.gte(this.version, '6.2.0'))
{
const params: any = {
Expand Down Expand Up @@ -542,8 +548,11 @@ export class ZabbixAPIConnector {
return this.request('trigger.get', params).then(utils.mustArray);
}

getTriggers(groupids, hostids, applicationids, options) {
async getTriggers(groupids, hostids, applicationids, options) {
const { showTriggers, maintenance, timeFrom, timeTo } = options;
if (!this.version) {
await this.initVersion();
}
if (semver.gte(this.version, '6.2.0'))
{
const params: any = {
Expand Down Expand Up @@ -733,8 +742,11 @@ export class ZabbixAPIConnector {
return this.request('trigger.get', params);
}

getHostAlerts(hostids, applicationids, options) {
async getHostAlerts(hostids, applicationids, options) {
const { minSeverity, acknowledged, count, timeFrom, timeTo } = options;
if (!this.version) {
await this.initVersion();
}
if (semver.gte(this.version, '6.2.0'))
{
const params: any = {
Expand Down

0 comments on commit 95d1e64

Please sign in to comment.