-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
7.0.16
It is not possible to create a trigger prototype in a discovery rule that uses only non-prototype items, even if they are in the same template. The frontend reports that "Trigger prototype ... must contain at least one item prototype". I would really like it if this worked.
I am trying to configure log monitoring of repetitive tasks (i.e. cron jobs or scheduled tasks on Windows). For that I have two items in a template that find entries reporting success and failure respectively. Each of these log entries refers to a particular task by name. There are two failure modes that I am concerned with:
- The task is reported as failed.
- The task is not reported as successful within a certain time period.
The first condition is easy to achieve; all it needs is a regular trigger on the "failure" item. The second is more difficult; because Zabbix does not know what it does not know, it needs a separate trigger per task that looks for the particular task name in the "successful" item, combined with a nodata() function.
Creating these triggers through discovery should be simple; all I need is a list of possible task names and intervals somewhere. However, right now I need to create a dummy item prototype as well because Zabbix refuses to create a trigger prototype that references only non-prototype items. This is possible, of course, and a calculated item with a very long update interval probably doesn't add a lot of load to server or database, but these dummy items spam my host configurations.{}
From some experimentation with patching the condition out of the frontend, which resulted in my trigger prototypes simply disappearing, it looks like the item references in the trigger expression are used to link the prototype to the discovery rule, or template, or something, so this is probably not easy to fix.