Ad Widget

Collapse

actions configured with templates

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hulting74
    Member
    • Nov 2008
    • 30

    #1

    actions configured with templates

    Hi

    Anyone got this working?

    I have configured a "action" against a template (Template_Windows) instead of a host, is this something that should work or not?

    Example:
    Trigger = "Low free disk space on Template_Windows volume c:"

    Thanks
  • jroberson
    Senior Member
    • May 2008
    • 124

    #2
    I think you need to rephrase your condition to use "Like" instead of "=". When you do so don't put the template name, ie "Template_Windows", in the definition. When Zabbix checks for triggers for actions, I beleve it looks at the whole text of the trigger, not by Template.

    For example:
    1. I have a host name "win_host" that is part of the "template_win" template.
    2. When the trigger fires is says "Low disk space on win_host drive c:"
    3. The action looks for a value like "Low disk space on".
    4. It finds it and does the action.


    I hope that works. I had to learn that one the hard way.

    Comment

    • richlv
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Oct 2005
      • 3112

      #3
      i think actions should work against templates - at least as claimed here

      so if they still do not work, that might be a bug
      Zabbix 3.0 Network Monitoring book

      Comment

      • hulting74
        Member
        • Nov 2008
        • 30

        #4
        Mr jroberson, sadly there is no way to select "LIKE" in actions when you have selected "Trigger" only "=" is available. :-)

        I did get it to work when using "Trigger Description" instead, where "LIKE" is available, but i think thats not a good solution. I would like to use Templates as much as possible.

        I have now upgraded to version 1.6.4, i will do another try and see if it was a previous version hickup...

        Regards

        Comment

        • jroberson
          Senior Member
          • May 2008
          • 124

          #5
          Originally posted by hulting74
          Mr jroberson, sadly there is no way to select "LIKE" in actions when you have selected "Trigger" only "=" is available. :-)

          I did get it to work when using "Trigger Description" instead, where "LIKE" is available, but i think thats not a good solution. I would like to use Templates as much as possible.

          I have now upgraded to version 1.6.4, i will do another try and see if it was a previous version hickup...

          Regards
          Oh, sorry, I didn't notice that. Yes you are right, "Trigger Description" is what I meant. If you use "Trigger =" you can look for specific hosts' triggers, but you have to use "Trigger Description like" for templates. I agree that is it a little counter intuitive, but that is just what I have found. There might be another way like richlv mentioned, but I haven't used that feature yet.

          Comment

          Working...