Ad Widget

Collapse

How can override trigger for some items ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bab
    Senior Member
    • Aug 2020
    • 176

    #16
    Originally posted by cyber
    If you have a macro in template, then you don't need to add it on host level. You should do that only if you want to override a value set in a template macro.. If you have a macro already in host level it will take precedence over the template level macro...




    Its all there in docs..
    Actually as I said before that my previous issue solved I added just {$SIZE} with value 1 to my template and override some of them on host such as {$SIZE:"TBSSPOT"} with value 20 but now it is showing another with event name the free space of table [TBSSPOT] is less than 1G although it should shows less that 20G

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #17
      Anywhere you need special value for any of those tablespaces you need to have macro with context. If they are same for all hosts, just add everything to template. If they vary between the hosts, then you may need host level ones...

      As you have {$SIZE} in template, then only way for it to influence trigger name anywhere is the missing context macro... If you added it in one host, then probably you need to add it to others also. Or move them all to template.

      Comment

      • bab
        Senior Member
        • Aug 2020
        • 176

        #18
        Originally posted by cyber
        Anywhere you need special value for any of those tablespaces you need to have macro with context. If they are same for all hosts, just add everything to template. If they vary between the hosts, then you may need host level ones...

        As you have {$SIZE} in template, then only way for it to influence trigger name anywhere is the missing context macro... If you added it in one host, then probably you need to add it to others also. Or move them all to template.
        As I said before that I added {$SIZE} with value 1 to template . Now I have an item that is resides on host2 so I added to macro on host2 {$SIZE:"TBSSPOT"} with value 6 . Also my event name on the template is : FreeSpace of Table [{#TABLESPACE_NAME}] is less than {$SIZE:"{#TABLESPACE_NAME}"}G . So trigger on host2 fire excellent without issue when it is less that 6 but I want trigger event also shows FreeSpace of Table [TBSSPOT] is less than 1G but want it shows FreeSpace of Table [TBSSPOT] is less than 6G. What is he issue ?

        Comment

        • cyber
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Dec 2006
          • 4807

          #19
          ok .. so you say, event name is still wrong even it all macros are in place... Now that, I cannot comment much .. We have here textbook example https://blog.zabbix.com/context-macr...n-zabbix/7764/ and seems you have everything, as it should be..

          Need some testing... I don't know, if I find time for that..

          Comment

          Working...