Ad Widget

Collapse

How to ignore specific item during rule discovery ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ProJugati
    Junior Member
    • Jun 2023
    • 3

    #1

    How to ignore specific item during rule discovery ?

    Hi all,

    I have an discovery rule about NFS volume on my zabbix he return to me somes metrics, the name of items after discovery rules looks like :
    • /nfs/volume/strat/vol1
    • /nfs/Exivolume/strat/vol2
    • /nfs/Exivolume/strat/vol3
    • /nfs/volume/strat/vol4
    I want to make a rule for ignoring if name match with specific characters : Exivolume

    the final result of the inventory should look like​
    • /nfs/volume/strat/vol1
    • /nfs/volume/strat/vol4
    do you have any idea how to do this?​

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

    #2
    Discovery uses filters. Filters use macros. Edit those (template) macros and get your needed result...

    Comment

    • ProJugati
      Junior Member
      • Jun 2023
      • 3

      #3
      i have try :

      In the discovery rules -> Volumes Discovery -> Filters

      Filter Macro :

      PHP Code:
      {#VOLUMENAME} -> DO NOT CORRESPONDING - > /.*?Exivolume.*?$/mg 
      it doesn't seem to work​ because i have deleted the old nfs and this night i got all "Exivolume" volume again, any idea how can i solve this ?​

      Comment

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

        #4
        "/.*?Exivolume.*?$/mg "
        try with just ".*?Exivolume.*?$" all these regex options won't work there ...

        Comment

        • ProJugati
          Junior Member
          • Jun 2023
          • 3

          #5
          Originally posted by cyber
          "/.*?Exivolume.*?$/mg "
          try with just ".*?Exivolume.*?$" all these regex options won't work there ...
          Thanks im gonna try this night

          Comment

          Working...