Ad Widget

Collapse

Excluding mount-points

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • uxbod
    Junior Member
    • Nov 2013
    • 6

    #1

    Excluding mount-points

    Hello,

    am testing Zabbix 2.2.0 and how it handles file system discovery. we are using ZFS and at first those mount-points were not being found until I changed the regular expression to include it. That works great but it is also identifying all the snap shots eg.
    Code:
           "{#FSNAME}":"\/mnt\/storage-pools\/qs-8cea6be2-71ed-a436-f4aa-974abbcac083\/test-data_snaps\/@GMT-2013.11.05-16.00.41",
                            "{#FSTYPE}":"zfs"},
    Thanks.
  • uxbod
    Junior Member
    • Nov 2013
    • 6

    #2
    I did find this post where somebody wished to do something similar https://www.zabbix.com/forum/showthread.php?t=42625

    Could I change the filter on the LLD rule to say {#FSTYPE}|{#FSNAME} and then create a new regex that excludes say ^zfs|.*_snaps

    Comment

    • uxbod
      Junior Member
      • Nov 2013
      • 6

      #3
      Struggling with this as cannot see how when can combine Macros and then execute a multi-step regex against it. Any help appreciated please.

      Comment

      • steveboyson
        Senior Member
        • Jul 2013
        • 582

        #4
        Just define a separate regexp rule with "result = FALSE" which finds the snapshots for the same macro.

        You might need to place it at the very beginning of your regexps - I don't know if the sequence matters at all.

        Comment

        • uxbod
          Junior Member
          • Nov 2013
          • 6

          #5
          But the macro is different. The standard file system discovery looks at FSTYPE and to know whether its a snap one needs to look at FSNAME. So appears that its not possible to exclude as cannot regex across the two macros. Is that correct ?

          Comment

          • steveboyson
            Senior Member
            • Jul 2013
            • 582

            #6
            Originally posted by uxbod
            But the macro is different. The standard file system discovery looks at FSTYPE and to know whether its a snap one needs to look at FSNAME. So appears that its not possible to exclude as cannot regex across the two macros. Is that correct ?
            Yes, that is correct. You cannot bind more than one LLD regexp macros to one LLD.

            Then you have to create our own macro and filter out the values you need/bon't need (e.g. use #FSNAME in your regexp).

            Comment

            • uxbod
              Junior Member
              • Nov 2013
              • 6

              #7
              Ah, so I could create a global macro called {$FSFULLNAME} with a value of {#FSTYPE}--{#FSNAME} and then use {$FSFULLNAME} within a new regex ?

              Comment

              • steveboyson
                Senior Member
                • Jul 2013
                • 582

                #8
                Ahm - no. I'm afraid that is not possible.
                I meant you should use macro {#FSNAME} rather than {#FSTYPE} and filter there.

                Comment

                • uxbod
                  Junior Member
                  • Nov 2013
                  • 6

                  #9
                  Darn, that is going to be a real pain then Okay, thanks and appreciate the help.

                  Comment

                  • johansen
                    Member
                    • Oct 2009
                    • 38

                    #10
                    has anybody found a solution?
                    very interested in this.

                    Comment

                    • coreychristian
                      Senior Member
                      Zabbix Certified Specialist
                      • Jun 2012
                      • 159

                      #11
                      Originally posted by johansen
                      has anybody found a solution?
                      very interested in this.
                      Right now you have to do either or. I thought I read somewhere that they were going to give the option for multiple macro's on discovery in a future release, not sure if that will be 2.4 or not though.

                      The only other option really right now, that I am aware of, would be to write a custom disk discovery script and have the filters in the script.

                      Comment

                      Working...