Ad Widget

Collapse

Creating a trigger based upon FSNAME macro?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tim_0200
    Junior Member
    • Jan 2014
    • 13

    #1

    Creating a trigger based upon FSNAME macro?

    If there is a better solution to my problem than what I am trying to do, please let me know.

    We are going to start using LLD for our file systems. The template we had previously been using had triggers set differently for '/' partitions than every other partition. Since the LLD discovers all of the partitions now, is there a way to distinguish between the discovered file systems?

    The best example that I can think of is something like this...

    Code:
    {Template_OS_Linux_v2:vfs.fs.size[{#FSNAME},pfree].last(0)}<10 & {#FSNAME}="/"
    ...and this for everything else...

    Code:
    {Template_OS_Linux_v2:vfs.fs.size[{#FSNAME},pfree].last(0)}<6 & NOT{#FSNAME}="/"
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #2
    When I had the request to check the free space that is not only >20% but also >10gb, I created this template trigger expression.

    Code:
    {Template OS Windows:vfs.fs.size[{#FSNAME},pfree].last()}<20 & {Template OS Windows:vfs.fs.size[{#FSNAME},free].last()}<10737418240
    In your case it will looks like
    {Template_OS_Linux_v2:vfs.fs.size[{#FSNAME},pfree].last(0)}<10 & {Template_OS_Linux_v2:{#FSNAME}.last(0)}="/"

    I didn't check it!
    Sincerely yours,
    Aleksey

    Comment

    • Tim_0200
      Junior Member
      • Jan 2014
      • 13

      #3
      What I want to do is to test what the {#FSNAME} macro is actually set to. For example, I want to know if the {#FSNAME} value is "/var" or "/boot" or "/".

      Comment

      Working...