Ad Widget

Collapse

Actions: Send email only if processor load is high for a long time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • heathz
    Junior Member
    • Mar 2012
    • 20

    #1

    Actions: Send email only if processor load is high for a long time

    hi people...
    i'm trying to create an action to send me and e-mail if the processor load of my servers became high for a certain period of time because when i created the action to send me e-mail when processor load is high the Zabbix sends me an e-mail when the load is greater than 5.0 and in one of my servers this happens quite often... it goes 6.0 and than back to 4 all the time...

    how to solve this?
    Last edited by heathz; 28-05-2012, 19:27. Reason: SOLVED!
  • JBo
    Senior Member
    • Jan 2011
    • 310

    #2
    Hi,

    Could you show the expression you are currently using for your trigger ?

    Regards,
    JBo

    Comment

    • heathz
      Junior Member
      • Mar 2012
      • 20

      #3
      the expression is:
      {Template_Windows:system.cpu.load[,avg1].last(0)}>95

      the default was 5 and i changed to 95...
      but i want the zabbix to email me only if the processor stay consuming 95% for more than 5min...

      Comment

      • HullZabbix
        Senior Member
        • Feb 2011
        • 104

        #4
        First off, for a windows system you really want to be using system.cpu.util rather than than system.cpu.load

        So the following trigger will turn true if the average cpu utilisation is over 95% for 300 seconds

        {Template_Windows:system.cpu.util[,,avg1].avg(300)}>95

        Comment

        • JBo
          Senior Member
          • Jan 2011
          • 310

          #5
          Hi,

          Originally posted by heathz
          the expression is:
          {Template_Windows:system.cpu.load[,avg1].last(0)}>95

          the default was 5 and i changed to 95...
          but i want the zabbix to email me only if the processor stay consuming 95% for more than 5min...
          The formula would be:
          {Template_Windows:system.cpu.load[,avg1].min(300)}>95

          However, I think that you misunderstand what CPU load is.
          It is defined in Zabbix documentation and points to Load (computing) in Wikipedia.

          A CPU load of 1 means that there is an average of one runnable process (it uses 1 CPU core at 100%).
          At 95, it means that you have 95 runnable processes; so, unless your system has at least 95 cores, it is heavily overloaded.

          You should probably use system.cpu.util[] instead.

          Hope this helps
          JBo

          Comment

          • heathz
            Junior Member
            • Mar 2012
            • 20

            #6
            JBo thanks for the explanation...

            AxidaZabbix
            got some errors like this:

            Incorrect item key "Template_Windows:system.cpu.util[,avg1]" provided for trigger expression.

            Comment

            • HullZabbix
              Senior Member
              • Feb 2011
              • 104

              #7
              In your template for windows machines, need an item which has a key like the following:

              system.cpu.util[,,avg1]

              Then you need to create a trigger which has the following expression:

              {Template_Windows:system.cpu.util[,,avg1].avg(600)}>90

              Comment

              • JBo
                Senior Member
                • Jan 2011
                • 310

                #8
                Originally posted by heathz
                JBo thanks for the explanation...

                AxidaZabbix
                got some errors like this:

                Incorrect item key "Template_Windows:system.cpu.util[,avg1]" provided for trigger expression.
                There are 2 commas before avg1: system.cpu.util[,,avg1]

                Time to read the doc ?

                Regards,
                JBo

                Comment

                • heathz
                  Junior Member
                  • Mar 2012
                  • 20

                  #9
                  sorry posted wrong code... but even with two commas the same error...
                  Code:
                  Incorrect item key "Template_Windows:system.cpu.util[,,avg1]" provided for trigger expression.
                  and, yes, i'm on the doc's page right now ^_^

                  Comment

                  • HullZabbix
                    Senior Member
                    • Feb 2011
                    • 104

                    #10
                    Can you screenshot you item and your trigger? Upload them to http://imgur.com/ and then paste the link here

                    Comment

                    • heathz
                      Junior Member
                      • Mar 2012
                      • 20

                      #11
                      here it is:

                      Comment

                      • JBo
                        Senior Member
                        • Jan 2011
                        • 310

                        #12
                        Originally posted by heathz
                        sorry posted wrong code... but even with two commas the same error...
                        Code:
                        Incorrect item key "Template_Windows:system.cpu.util[,,avg1]" provided for trigger expression.
                        and, yes, i'm on the doc's page right now ^_^
                        There is no system.cpu.util[,,avg1] item in Template_Windows.
                        Have you created an item with system.cpu.util[,,avg1] key before trying to change the trigger ?

                        Comment

                        • heathz
                          Junior Member
                          • Mar 2012
                          • 20

                          #13
                          just trying to change the trigger...

                          Comment

                          • HullZabbix
                            Senior Member
                            • Feb 2011
                            • 104

                            #14
                            As JBo says, make sure you have an item with the correct key.

                            As a note, you haven't taken a screen shot of your item :P you've done it of your triggers overview and individual trigger.

                            Comment

                            • heathz
                              Junior Member
                              • Mar 2012
                              • 20

                              #15
                              well... now i created an item and the trigger and still the same error...
                              I guess the shots are ok now:


                              Comment

                              Working...