Initial alerting feature. This implementation doesn't use Grafana alerting,

instead it get triggers for particular metrics and sets panel's alert state.
This commit is contained in:
Alexander Zobnin
2017-03-05 13:12:11 +03:00
parent 5192e8648d
commit f805213b02
15 changed files with 349 additions and 22 deletions

View File

@@ -401,6 +401,29 @@ function ZabbixAPIServiceFactory(alertSrv, zabbixAPICoreService) {
});
}
getAlerts(itemids, timeFrom, timeTo) {
var params = {
output: 'extend',
itemids: itemids,
expandDescription: true,
expandData: true,
expandComment: true,
monitored: true,
skipDependent: true,
//only_true: true,
// filter: {
// value: 1
// },
selectLastEvent: 'extend'
};
if (timeFrom || timeTo) {
params.lastChangeSince = timeFrom;
params.lastChangeTill = timeTo;
}
return this.request('trigger.get', params);
}
}
return ZabbixAPI;