Ad Widget

Collapse

How can you eliminate some discovered filesystems?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • slydog
    Junior Member
    • Oct 2014
    • 16

    #1

    How can you eliminate some discovered filesystems?

    We are running Zabbix 2.2.6 on RHEL 6 host. I added ^nfs$ to the @File systems for discovery regex because we need to monitor some NFS mounts but not all NFS mounts.

    In particular we are picking up /mnt/<foo> and <bar>/.snapshot filesystems. These are not application filesystems, given the structuring of our environment. Is there a was to eliminate these from being detected at the LLD level while still detecting other ^nfs$ mounts?
  • jan.garaj
    Senior Member
    Zabbix Certified Specialist
    • Jan 2010
    • 506

    #2
    @File systems for discovery - is the best way. Just add another expressions with Result is FALSE (negative matching). POC:
    Code:
    ^nfs$ Result is TRUE 
    ^.*<foo>.*$ Result it FALSE
    ^.*<bar>.*$ Result it FALSE
    Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
    My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

    Comment

    • slydog
      Junior Member
      • Oct 2014
      • 16

      #3
      Originally posted by jan.garaj
      @File systems for discovery - is the best way. Just add another expressions with Result is FALSE (negative matching). POC:
      Code:
      ^nfs$ Result is TRUE 
      ^.*<foo>.*$ Result it FALSE
      ^.*<bar>.*$ Result it FALSE
      Adding another expresion this way is not working. LLD for Filesystem discovery uses #FSTYPE to discover the filesystems; while I am wanting to exclude certain filesystems based on their names (#FSNAME ??). As best I can tell one cannot mix #FSTYPE and #FSNAME in the same Discovery rule.

      Comment

      • jan.garaj
        Senior Member
        Zabbix Certified Specialist
        • Jan 2010
        • 506

        #4
        Yes, good point about #FSTYPE. You need to create new regexp to exclude (Result is FALSE) unwanted #FSNAMEs. See filters in Discovery rule config. I have had similar problem with chroot filesystems - my solution:
        Attached Files
        Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
        My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

        Comment

        • slydog
          Junior Member
          • Oct 2014
          • 16

          #5
          jan.garaj

          Thanks for your help. We will try this out.

          Comment

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

            #6
            Just to note, I believe you need to upgrade to 2.4.X to get the multiple filter options.

            Comment

            • jan.garaj
              Senior Member
              Zabbix Certified Specialist
              • Jan 2010
              • 506

              #7
              Corey is right :-), you will need Zabbix 2.4.
              Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
              My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

              Comment

              • waardd
                Member
                • Aug 2014
                • 82

                #8
                I'm trying to put together a filter for filesystems i dont want discoverd.

                Is this the regexp i can use?


                1 » (/var|/opt|/home|/boot) [Result is FALSE]

                Comment

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

                  #9
                  Originally posted by waardd
                  I'm trying to put together a filter for filesystems i dont want discoverd.

                  Is this the regexp i can use?


                  1 » (/var|/opt|/home|/boot) [Result is FALSE]
                  That looks pretty close to what I have.

                  ^/(home/.*|work.*|p03|p02.*|p01.*)$

                  Comment

                  • waardd
                    Member
                    • Aug 2014
                    • 82

                    #10
                    Looks like it is worki g indeed 😊

                    Maybe i can make it more flexible like you with ^ and $

                    Comment

                    Working...