Ad Widget

Collapse

LLD with multiple macros and regexprs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cscott
    Junior Member
    • Jul 2012
    • 16

    #1

    LLD with multiple macros and regexprs

    I want to get auto discovery to check both the fs type and name via a regexp

    The systems in question are zfs and have many fs, and I want to exclude part of the tree and the psuedo fs

    My regexps work individually but when I try to combine them they fail, or rather the macros arent generating the string I think they are.


    eg
    regexpr is

    FS_discovery
    1 » (btrfs|ext2|ext3|ext4|jfs|reiser|xfs|ffs|ufs|jfs|j fs2|vxfs|hfs|ntfs|fat32|zfs) [Result is TRUE]
    2 » .(el-)*archive-[0-9]+.* [Result is FALSE]

    when I use the macro {$FSTYPE} on its own i get just zfs fs but all of them as expected.

    If i use {$FSNAME} as the macro i get all pseudo fs as well as zfs except ones under the path matching line 2 (in this case /archive-1/)

    this proves both bits of the regexpr works.

    However when I try to use both the macros in the filer box i dont get anything working on the 2nd macro

    eg if i have the following in the LLD filter macro field i only get part 1 of the regexpr kicking in, and vice versa if I swap them around

    {#FSTYPE},{#FSNAME}

    I am pretty sure the problem lies with the string im trying to generate with the macros isnt working like i think it supposed to (not done many macros yet, so its probably my cluelessness)

    I am expecting to to generate a string like the following

    zfs,/rpool
    zfs,/
    zfs,/archive-1/
    etc

    what am i missing here?
Working...