Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ Default setting is 20 seconds.

Changelog
---------
* version 2.1.1:
* Bugfix for maintenance checks
* version 2.1:
* Support Zabbix maintenance time. Author: Author: [Lorenzo Milesi](https://github.com/maxxer)
* version 2.0:
Expand Down
3 changes: 2 additions & 1 deletion js/zabbix-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ function getAllTrigger(url, token, ckecktime, https_flag) {
params.sortfield = "lastchange";
params.sortorder = "DESC";
params.filter = filter;
params.selectHosts = ['maintenance_status'];
var dataRequest = new Object();
dataRequest.params = params;
dataRequest.auth = token;
Expand Down Expand Up @@ -527,7 +528,7 @@ function notificationCheck(trigger_data){
var last_checktime = now - background_rate;
var msg = "";
// Check if the users wants to be notified for hosts in maintenance
if (maintenance_notification == "Off" && trigger_data["hosts"][0]['host_maintenance'] == "1")
if (maintenance_notification == "Off" && (typeof trigger_data["hosts"] != 'undefined') && trigger_data["hosts"][0]['maintenance_status'] == "1")
return;
if(last_checktime < trigger_data["lastchange"] ){
msg += trigger_data["host"];
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name":"Chromix",
"version":"2.1.0",
"version":"2.1.1",
"manifest_version":2,
"background":{"page":"background.html"},
"description":"Zabbix Alert Check Extension",
Expand Down