Ad Widget

Collapse

Multiple triggers for free diskpace with % and minimum free gigabyte

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • T-One
    Junior Member
    • Jan 2011
    • 12

    #1

    Multiple triggers for free diskpace with % and minimum free gigabyte

    Hello,

    i've added Multiple Trigger Prototypes to the filesytem discovery to check if the free disk size is under 5% and under 5 GB disksize, we have very large disks in some setups and 5 % could be easily more then 100 GB of free diskpace.

    I've also added another one with 2 % and 1 GB.

    They look like this:

    Code:
    {Template OS Windows:vfs.fs.size[{#FSNAME},pfree].last(0)}<5 and {Template OS Windows:vfs.fs.size[{#FSNAME},free].last()}<5368709120
    and

    Code:
    {Template OS Windows:vfs.fs.size[{#FSNAME},pfree].last(0)}<2 and {Template OS Windows:vfs.fs.size[{#FSNAME},free].last()}<1073741824
    I've done this quite similiar with older Zabix versions but don't know the exact expression, but i'm sure i did it a bit different.

    Anyhow, if the free size drops under 2 % i get both messages, one for 2 % and one for 5 %, this can be quite annoying, is there a way to handle it so i just get the message for 2 %?

    kind regards

    anton
  • inhayn
    Junior Member
    • Sep 2004
    • 13

    #2
    Try
    Code:
    {Template OS Windows:vfs.fs.size[{#FSNAME},pfree].last(0)}<5 and {Template OS Windows:vfs.fs.size[{#FSNAME},free].last()}<5368709120 and
    {Template OS Windows:vfs.fs.size[{#FSNAME},pfree].last(0)}>2 and
    {Template OS Windows:vfs.fs.size[{#FSNAME},free].last(0)}>1073741824

    Comment

    • T-One
      Junior Member
      • Jan 2011
      • 12

      #3
      You mean i should compine both triggers into one?
      This way i can't have different severitys and notifications:

      Comment

      • aib
        Senior Member
        • Jan 2014
        • 1615

        #4
        try Dependencies.

        10% trigger dependent on 5% trigger and 2% trigger
        5% trigger dependent on 2% trigger
        2% trigger - independent.

        When lowest trigger fired up - it hides highest triggers
        Sincerely yours,
        Aleksey

        Comment

        • T-One
          Junior Member
          • Jan 2011
          • 12

          #5
          Trigger dependencies are obviously not possible with Trigger Prototypes within discovery rules, at least the "dependencies" tab is missing there.

          Comment

          • johansen
            Member
            • Oct 2009
            • 38

            #6
            Have you tried something like this:

            sev: warning
            ({Template_OS_Windows:vfs.fs.size[{#FSNAME},pfree].last(300)}<10 and {Template_OS_Windows:vfs.fs.size[{#FSNAME},free].last(300)}<20G and {Template_OS_Windows:vfs.fs.size[{#FSNAME},pfree].last(300)}>5)

            sev: high
            {Template_OS_Windows:vfs.fs.size[{#FSNAME},pfree].last(300)}<5

            Comment

            • inhayn
              Junior Member
              • Sep 2004
              • 13

              #7
              Hello T-One, sorry for not reply soon.

              My 'code' suggestion was not a single trigger combine. It's a solution for the case in disk space percent is between 5% and 2% and disk size is between 5GB and 2GB.
              [pfree<5 AND free<5GB AND pfree>2 and free>1GB].
              You should add another trigger for a critical status, i.e:
              Code:
              {Template OS Windows:vfs.fs.size[{#FSNAME},pfree].last(0)}<2 and {Template OS Windows:vfs.fs.size[{#FSNAME},free].last()}<1073741824
              Best regards.

              Comment

              Working...