Templates are applied to hosts, and basically parameterise them; i.e., apply common functionality to the hosts. Is there any way parameterise items?
The circumstance which prompts the question is that we have a server which runs a number of jobs at various (scheduled) times. We would like Zabbix to check that the jobs are running as they should, so I created a host (for the purposes of this discussion it could be called Our Server Jobs) and I want to add one (trapper) item to the host for each job. When our server finishes running a job, it sends a code (0 = finished OK, 1 = finished but with problems etc.) to Zabbix. The design requires four triggers for each item, and one item for each job. There are currently 12 jobs and that could increase to 20 or so as our server is developed. So I don't really want to replicate the logic of those four triggers over each item. But so far as I can tell, templates, which would solve the problem, can be applied only to hosts. What I really want is an item-level template, that is applied to items. Is there any way of achieving such functionality?
Obviously I could just create a host in Zabbix for each job, but it doesn't feel like the right solution; we have one server, and it runs multiple jobs. I've resorted to cloning, but it's ugly.
The circumstance which prompts the question is that we have a server which runs a number of jobs at various (scheduled) times. We would like Zabbix to check that the jobs are running as they should, so I created a host (for the purposes of this discussion it could be called Our Server Jobs) and I want to add one (trapper) item to the host for each job. When our server finishes running a job, it sends a code (0 = finished OK, 1 = finished but with problems etc.) to Zabbix. The design requires four triggers for each item, and one item for each job. There are currently 12 jobs and that could increase to 20 or so as our server is developed. So I don't really want to replicate the logic of those four triggers over each item. But so far as I can tell, templates, which would solve the problem, can be applied only to hosts. What I really want is an item-level template, that is applied to items. Is there any way of achieving such functionality?
Obviously I could just create a host in Zabbix for each job, but it doesn't feel like the right solution; we have one server, and it runs multiple jobs. I've resorted to cloning, but it's ugly.
You can ease the creation with discovery a little bit.. like, keep job list on server and retrieve it time to time and create items/triggers based on newly found stuff.. but otherwise its still 12 items and then 4 trigger for each of them...
Comment