Ad Widget

Collapse

monitor disk usage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ulises
    Junior Member
    • Oct 2008
    • 13

    #1

    monitor disk usage

    Hi

    I have a question. I need to set up a hard drive monitor in some servers and I cant figure it out how to do it

    what I need is that we will get an alert if any partition is over 80% used

    how can I create a trigger like that?

    thanks in advance
  • simonuk1
    Member
    • Mar 2009
    • 66

    #2
    If you have a look at the triggers in the Template_Tomcat there are examples for 70% threshold.

    Hope that helps

    Simon

    Comment

    • ulises
      Junior Member
      • Oct 2008
      • 13

      #3
      thx for the reply; however, seems like the other admin deleted the tomcat template

      Comment

      • tchjts1
        Senior Member
        • May 2008
        • 1605

        #4
        Templates are here:

        http://www.zabbix.com/wiki/doku.php?...trib:templates

        Comment

        • Kai-Kai
          Senior Member
          • Apr 2009
          • 142

          #5
          If I right understand what you want to do, you have to :

          1. create an item to measure the free space in the partition :
          - description : Free disk space on $1 in %
          - type : agent ZABBIX
          - key : vfs.fs.size[/partition,pfree] (change /partition to the mount point)
          - infos type : Numérique (float)
          - %
          You can customize others fields...

          2. create a trigger to make an alert...
          - name : Low free disk space on {HOSTNAME} volume /partition
          - expression : {the_name_of_the_host:vfs.fs.size[/partition,pfree].last(0)}<20
          Customize the reste of the options (dependencies etc)...

          Now, you have an alert if the free space on /partition is less than 20% (so if the partition is 80% full).

          Is it ok for you ?

          Comment

          • Calimero
            Senior Member
            • Nov 2006
            • 481

            #6
            3. Create an action (we use a single generic Action for all triggers here) if you wan't zabbix_server to act when trigger is ON: send notifications, run commands ...

            Comment

            • Kai-Kai
              Senior Member
              • Apr 2009
              • 142

              #7
              He just asked to create an alert... ^^ that's why I haven't mentionned actions creation, but you're right, it's possible to define automated actions such as mail or remote command...

              Comment

              • MrKen
                Senior Member
                • Oct 2008
                • 652

                #8
                Originally posted by fcge

                Now, you have an alert ...
                No you don't! Now you have a Trigger.

                Calimero is correct. If you want an alert, you must create an action based on the trigger.

                MrKen
                Disclaimer: All of the above is pure speculation.

                Comment

                • sbarnett
                  Member
                  • Mar 2009
                  • 35

                  #9
                  Try this also

                  Comment

                  • Kai-Kai
                    Senior Member
                    • Apr 2009
                    • 142

                    #10
                    No you don't! Now you have a Trigger.
                    Calimero is correct. If you want an alert, you must create an action based on the trigger.
                    It depends of what you call alert...

                    According to me : alert = displaying on the dashboard. A trigger is the test, the trigger can be on "problem" or on "ok". When the trigger is on "problem", it's displayed on the dashboard : it's an alert.
                    So, you have an alert...
                    Sending email is an action following the alert.

                    So, I don't agree with you, but It's a question of point of view.
                    But what is sure is that ulises should find what he was loocking for, in this thread.

                    Comment

                    • MrKen
                      Senior Member
                      • Oct 2008
                      • 652

                      #11
                      Originally posted by fcge

                      So, I don't agree with you, but It's a question of point of view.
                      And, I don't agree with you!

                      Cheers, have a good day.
                      Disclaimer: All of the above is pure speculation.

                      Comment

                      • ulises
                        Junior Member
                        • Oct 2008
                        • 13

                        #12
                        thank you guys for all your replies... it help me alot to understand zabbix

                        however; I still cant get it to work

                        I added some items and triggers to an existing template but i got many false positives

                        the trigger i used was

                        {Template_test1:vfs.fs.size[/home,used]. last( 0 ) }>80

                        which should only generate the alert when /home has used 80% of the space right?

                        well, that did not work; I got many alerts from this trigger even though /home was using less than 50%

                        then, I changed the trigger to

                        {Template_test1:vfs.fs.size[/home,free]. last( 0 ) }<63

                        which should generate the template if /home has used over 37% right?

                        well, i got some OK alerts but not PROBLEM -- and i made sure 2 servers were using 40% of /home space

                        so i'm lost again

                        any help would be really appreciated

                        thx again

                        Comment

                        • MrKen
                          Senior Member
                          • Oct 2008
                          • 652

                          #13
                          If you want a trigger for %, you need to use 'pfree' (percentage free) and 'pused' (percentage used).

                          e.g {Template_test1:vfs.fs.size[/home,pused]. last( 0 ) }>80

                          MrKen
                          Disclaimer: All of the above is pure speculation.

                          Comment

                          • Kai-Kai
                            Senior Member
                            • Apr 2009
                            • 142

                            #14
                            And, I don't agree with you!
                            Cheers, have a good day.
                            If we were always the same opinion, it would become boring.
                            Have a nice day too MrKen.

                            so i'm lost again
                            As MrKen said, you have to be carefull. There's a difference between "used" and "pused". The first one gives you the value in bytes (if I well remember - if you put B in the 5th field and custom multiplication by 1024). The second one gives you the values in percentage (pfree, pused).
                            If you see my example on the first page, I used pfree.

                            So in this case, you have to make an item using pfree, and then the associated trigger should work better.

                            Comment

                            • ulises
                              Junior Member
                              • Oct 2008
                              • 13

                              #15
                              oh ok thx guys; however, when i go to create a new ITEM it does not show the key i need to use (pfree nor puse)... anyway to get it again?

                              Comment

                              Working...