Ad Widget

Collapse

How to use global regular expressions in trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tuxmartin
    Junior Member
    • Jan 2017
    • 12

    #1

    How to use global regular expressions in trigger

    Hello, how can I use global regular expressions in the template trigger?
    I have the template for Mikrotik switch and need to ignore triggers for some switch ports. I cannot ignore it in the template discovery filter, because I need to collect data, but I do not want any triggers for these ports.

    I have global regex "PORTS" with the list of network interface names "Any character string included" (port1,pc2,test). Now I need to modify the trigger in the template to ignore if the value of template discovery macro "{#IFNAME}" is found in the global regex. Something like "{#IFNAME}.regex(@PORTS) and ...".
    It is possible?

    Thanks,
    Martin​
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    I cannot ignore it in the template discovery filter, because I need to collect data, but I do not want any triggers for these ports.
    Sounds like a great case for LLD override: https://www.zabbix.com/documentation...overy#override

    Basically it allows you to prevent the triggers from being created for matching interfaces.

    Markku

    Comment


    • tuxmartin
      tuxmartin commented
      Editing a comment
      Thanks for the tip. I will try it.

    • tuxmartin
      tuxmartin commented
      Editing a comment
      If I use Filters, items and triggers are marked for deletion during the next discovery.

      But if I use Overrides, nothing changed. The trigger will always remain on. I have to remove the template from the host and add it again.

      How can I fix it?
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #3
    Please don't convey discussion using Comments, use proper posts to make it possible to quote and like your content.

    Just delete the extra triggers manually when changed the template, no need to remove all the items and triggers.

    Markku

    Comment

    Working...