Ad Widget

Collapse

Create trigger: "less than 5gb of space on '/' directory"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • getstuk
    Junior Member
    • Oct 2013
    • 17

    #1

    Create trigger: "less than 5gb of space on '/' directory"

    I need to know how to create a trigger that tells me if a linux box dips below 5GB of space on the disk. I don't care about the "/boot" or "/tmp" directory, how can I use an "if statement" to exclude these from my trigger?
  • getstuk
    Junior Member
    • Oct 2013
    • 17

    #2
    anyone? The proper way to do if statements would be helpful.

    Comment

    • legoman
      Junior Member
      • Jan 2014
      • 4

      #3
      You could get an idea on how to do this by going to Configuration->Templates->Template OS Linux->Discovery Rules, then "Trigger prototypes" in the "Mounted filesystem discovery" row. In those prototypes you should see a "Free disk space is less than 20% on volume {#FSNAME}" prototype. Instead of creating a trigger prototype, just create a regular trigger, hardcoding the FS name where the "{#FSNAME}" is.

      Personally, I would opt to link the host to a template and disable the discovered filesystems I didn't want to monitor, but I'm not sure how that would affect your current monitoring.

      Good luck!

      Comment

      • aib
        Senior Member
        • Jan 2014
        • 1615

        #4
        Trigger:
        Code:
        Name - Less than 5 GB
        Expression - {SERVER1:vfs.fs.size[/,free].last(0)}<5368709120
        Sincerely yours,
        Aleksey

        Comment

        Working...