Ad Widget

Collapse

Filesystem Discovery String

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ericw
    Junior Member
    • Jun 2012
    • 11

    #1

    Filesystem Discovery String

    I can see how to alter the filesystem discovery with the regular expression... how can I see what the actual string is that it's being compared to? I'm trying to filter out some specific things, not having a lot of luck. Thanks!
  • mbsit
    Senior Member
    • Sep 2012
    • 130

    #2
    Hi
    Ok, yes, you can create a standard Agent Item with key: vfs.fs.discovery and Type of information set to "Text".
    Then you will see what strings returned.

    Bests,
    Grzegorz

    --
    Wdrożenia, usługi IT - Warszawa
    Pozdrawiam
    Grzegorz Grabowski
    ____
    Wdrożenia, szkolenia, umowy serwisowe
    Warszawa - Polska

    Comment

    • ericw
      Junior Member
      • Jun 2012
      • 11

      #3
      Thanks for the tip... that worked, but it's still not clear what the regular expression is actually comparing to:

      { "data":[ { "{#FSNAME}":"A:", "{#FSTYPE}":"UNKNOWN"}, { "{#FSNAME}":"C:", "{#FSTYPE}":"NTFS"}, { "{#FSNAME}":"E:", "{#FSTYPE}":"NTFS"}, { "{#FSNAME}":"F:", "{#FSTYPE}":"NTFS"}, { "{#FSNAME}":"M:", "{#FSTYPE}":"NTFS"}, { "{#FSNAME}":"Z:", "{#FSTYPE}":"UNKNOWN"}]}

      The existing one makes me believe it's just the string following "{#FSTYPE}", does anyone know if it does a similar comparison to the {#FSNAME} data item?

      Comment

      • xpehbam
        Junior Member
        • Jul 2012
        • 17

        #4
        All of the item and trigger prototypes rely on macro {#FSNAME} which is returned by the actual discovery item. This is further filtered by @File systems for discovery REGEXP. This can be found under Administration -> General -> Regular expressions.

        Comment

        • ericw
          Junior Member
          • Jun 2012
          • 11

          #5
          Originally posted by xpehbam
          All of the item and trigger prototypes rely on macro {#FSNAME} which is returned by the actual discovery item. This is further filtered by @File systems for discovery REGEXP. This can be found under Administration -> General -> Regular expressions.
          Yes, but does @File systems for discovery REGEXP filter both the FSTYPE and FSNAME strings?

          Comment

          • xpehbam
            Junior Member
            • Jul 2012
            • 17

            #6
            No, as you can see from the mounted discovery rule page, there is only one thing it's filtering for:

            Filter Macro {#FSTYPE} Regexp @File systems for discovery

            Comment

            • ericw
              Junior Member
              • Jun 2012
              • 11

              #7
              Aha! Yes I see that now, thanks that helps. But how can I filter them by name? It does not appear that I can add a second filter to that discovery rule.

              Comment

              • mbsit
                Senior Member
                • Sep 2012
                • 130

                #8
                Only One filter allowed, but xpehbam is wrong.
                You can use one of the: FSTYPE or FSNAME.

                But not both
                Pozdrawiam
                Grzegorz Grabowski
                ____
                Wdrożenia, szkolenia, umowy serwisowe
                Warszawa - Polska

                Comment

                • ericw
                  Junior Member
                  • Jun 2012
                  • 11

                  #9
                  Right.. I can change the one that's there but I can only use one. Thanks, that answers my question but doesn't solve my problem exactly, I'll have to figure it out.

                  Comment

                  • xpehbam
                    Junior Member
                    • Jul 2012
                    • 17

                    #10
                    The discovery item is a UserParameter on the machine. You can add a parameter to the script that greps on something.

                    Good luck.

                    Comment

                    • mbsit
                      Senior Member
                      • Sep 2012
                      • 130

                      #11
                      The filter can be used to only generate real items, triggers, and graphs for certain file systems. It expects POSIX Extended Regular Expression. For instance, if you are only interested in C:, D:, and E: file systems, you could put {#FSNAME} into “Macro” and "^C|^D|^E" regular expression into “Regexp” text fields. Filtering is also possible by file system types using {#FSTYPE} macro (e. g. "^ext|^reiserfs").
                      You can enter a regular expression or reference a global regular expression in “Regexp” field.
                      In order to test the regular expression you can use “grep -E”, for example:
                      http://www.zabbix.com/documentation/...evel_discovery
                      Pozdrawiam
                      Grzegorz Grabowski
                      ____
                      Wdrożenia, szkolenia, umowy serwisowe
                      Warszawa - Polska

                      Comment

                      • darklord1990
                        Junior Member
                        • Jul 2018
                        • 7

                        #12
                        Originally posted by xpehbam
                        No, as you can see from the mounted discovery rule page, there is only one thing it's filtering for:

                        Filter Macro {#FSTYPE} Regexp @File systems for discovery
                        So where is the FSNAME defined ?

                        Comment

                        • darklord1990
                          Junior Member
                          • Jul 2018
                          • 7

                          #13
                          Please ignore it. I found that.

                          Comment

                          Working...