Ad Widget

Collapse

Modifying templated items and triggers

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bladealslayer
    Junior Member
    • Jul 2011
    • 2

    #1

    Modifying templated items and triggers

    Hi,

    While I was setting up my Zabbix server (1.8.5) I came to the following problem: When a host inherits some items and triggers from a template, it is quite restricted what you can customise for that item/trigger in the host level (or in an intermediate template in the inheritance chain). I was wondering why this might be the case and started looking at how items/triggers are stored in the database.

    It seems to me that items and triggers are stored in such a way (all fields being copied and id of parent item/triggers stored) that it should be technically possible to overwrite any parameter of an item/trigger and still keep the information where it was inherited from.

    For example: there is a templated trigger "too many processes on host" that has a condition "number of processes > 300". This is great in the template but for some specific host, I'd like to increase the threshold. Currently I have to disable the templated trigger and create a new one, specific to the host. But if I was able to edit the inherited trigger expression and customise it, it would be by far more intuitive and easy to set up.

    An example for items could be, checking if syslog is running: on some hosts it is syslogd , on others syslog-ng, on others rsyslogd.

    My question is: is there something I am missing? Why are such edits not allowed?

    Thanks in advance!

    Edit: I tried manually modifying the expression for a templated trigger at the host level in the database and it seems to be working properly
    Last edited by bladealslayer; 28-07-2011, 12:46.
  • ghoz
    Senior Member
    • May 2011
    • 204

    #2
    not answering your question directly but for the specific case you mention, you can use macros :
    you create a macro {$MAX_PROC} at the template level with the default value that you use in your trigger.

    you can then create the same macro at the sub template or host level that will override the values.

    same for syslog : create a {$SYSLOG_NAME} macro with items and triggers using it...

    Comment

    • bladealslayer
      Junior Member
      • Jul 2011
      • 2

      #3
      Thanks for the suggestion! This sounds like a good way to go!

      Comment

      Working...