Ad Widget

Collapse

Action - Disk Space

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cm2000
    Junior Member
    • Mar 2009
    • 29

    #1

    Action - Disk Space

    Hello,

    I'm running v1.6.6 and 1.8.2.

    I would like to send an email when disk space reachs a certain percentage, which is fine - and i can do... but here is my question...

    Is it possible to include in that email the following information?

    Hostname:
    Total Size:
    Free Space:
    Percent Free:

    The problem i am having is that this is my trigger:
    ({server1:vfs.fs.size[d:,pfree].last(0)}<10)& ({server1:vfs.fs.size[d:,pfree].time(0)}>050000)& ({server1:vfs.fs.size[d:,pfree].time(0)}<230000)

    as the drive letter is hard coded within the trigger, how can i retrieve the total size, free space and percentage for that specific drive to include in the action email?

    TIA,

    Tom
  • cm2000
    Junior Member
    • Mar 2009
    • 29

    #2
    *bump*

    Any ideas guys??? I'm sure this can be done with the power of zabbix!

    Comment

    • tbogdan
      Junior Member
      • Sep 2010
      • 6

      #3
      First:
      http://www.zabbix.com/documentation/...config/actions
      Then:
      http://www.zabbix.com/documentation/.../config/macros
      Last edited by tbogdan; 10-09-2010, 11:53.

      Comment

      • cm2000
        Junior Member
        • Mar 2009
        • 29

        #4
        Thanks - I read that site, but i couldnt work out which key item\macro allows me to specifically point to a key name with a hard coded value in it.

        Comment

        • forlinuxsupport
          Member
          • Oct 2005
          • 39

          #5
          I would also like to know how to do this.. any help ?

          Comment

          • danrog
            Senior Member
            • Sep 2009
            • 164

            #6
            You can add this macro to either the action and trigger description (but it won't give you anything but that item's value, you'd have to do something a little bit more custom using the api to get more info):

            {ITEM.LASTVALUE}

            If you wanted to compare it to the Nth value (where N = 2-9), then you can add

            {ITEM.LASTVALUE<2-9>}

            OR if you wanted something even then that:
            {{HOSTNAME}:{TRIGGER.KEY}.last(#12)}


            Here is our action
            --------------------
            {TRIGGER.NAME}: {STATUS}
            {DATE} {TIME}
            Host: {HOSTNAME}
            Latest value: {ITEM.LASTVALUE}
            Previous value: {{HOSTNAME}:{TRIGGER.KEY}.last(#12)}
            Comment: {TRIGGER.COMMENT}
            Ack: http://zabbix.domain.com/zabbix/inde...w.php?triggers[]={TRIGGER.ID}
            Mob: http://revproxy.domain.com/mob/emob.php?triggerid={TRIGGER.ID}
            -------------------------------------------

            Here is our trigger description
            --------------------------------------
            Low free disk space on C:: ({ITEM.LASTVALUE}%)
            ----------------------------------------

            By the way, you can use this in all your trigger descriptions. I find it very useful.

            Comment

            • cm2000
              Junior Member
              • Mar 2009
              • 29

              #7
              Further alerting

              Hi,

              Thanks for the reply - that looks very useful indeed.

              Would you have an idea on how i can achieve it so i get an alert when it hits a certain percentage of disk space free, it then reports total disk space (in GB), free disk space in GB, along with the action percentage?

              TIA,

              Tom

              Comment

              • cm2000
                Junior Member
                • Mar 2009
                • 29

                #8
                Got it!

                Dur....

                got it...

                I have a trigger for each Drive letter of each server.

                So, now i've created an action per drive letter, and this is my message text in the action:

                Code:
                Hostname: {HOSTNAME}
                % Free: {ITEM.LASTVALUE}
                Total: {{HOSTNAME}:vfs.fs.size[c:,total].last(0)}
                Free: {{HOSTNAME}:vfs.fs.size[c:,free].last(0)}
                Works a treat!

                Comment

                Working...