diff --git a/zabbix/datasource.js b/zabbix/datasource.js index cd5c0a1..a6cfcbd 100644 --- a/zabbix/datasource.js +++ b/zabbix/datasource.js @@ -309,11 +309,17 @@ function (angular, _, kbn) { var params = { output: ['triggerid', 'description'], search: { - 'description': annotation.query + 'description': annotation.trigger }, searchWildcardsEnabled: true, expandDescription: true }; + if (annotation.host) { + params.host = templateSrv.replace(annotation.host); + } + else if (annotation.group) { + params.group = templateSrv.replace(annotation.group); + } return this.zabbixAPI.performZabbixAPIRequest('trigger.get', params) .then(function (result) { diff --git a/zabbix/partials/annotations.editor.html b/zabbix/partials/annotations.editor.html index 1e9caba..1a95b36 100644 --- a/zabbix/partials/annotations.editor.html +++ b/zabbix/partials/annotations.editor.html @@ -1,13 +1,25 @@
Zabbix trigger - Example: Lack of free swap space
-
- -
+
+
+ +
+
+ + +
+
+ + +
+
+ +