Ad Widget

Collapse

trigger for system.cpu.load

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ggs_admin
    Member
    • Oct 2021
    • 44

    #1

    trigger for system.cpu.load

    Hello everyone,

    I have 3 items for checking load on the server:

    Click image for larger version

Name:	load.png
Views:	4752
Size:	24.9 KB
ID:	437665

    Any of these items is working properly,
    I have configured the 2 triggers:

    Click image for larger version

Name:	Zabbix-Server-Configuration-of-items.png
Views:	4660
Size:	22.3 KB
ID:	437666


    but sometimes I'm receiving the warning / high types of the issue where seeing the UNKNOWN values

    Click image for larger version

Name:	Zabbix-Server-Event-details.png
Views:	4688
Size:	15.0 KB
ID:	437667

    Any ideas why it is getting the "UNKNOWN" values?
    I think that it's a bug of Zabbix since it has triggered when a load was 7.13 (it's value avg1) but it should be triggered once it bigger than 16
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    What is there on "Operational data" field in trigger config? Something like {ITEM.LASTVALUE2} and {ITEM.LASTVALUE3} etc? As you are using just one item for trigger, there is no values for other macros but {ITEM.LASTVALUE1}.

    Operational data shows you current value there... not the "at the time of event" value. as per documentation
    Operational data Operational data allow to define arbitrary strings along with macros. The macros will resolve dynamically to real time data in MonitoringProblems. While macros in the trigger name (see above) will resolve to their values at the moment of a problem happening and will become the basis of a static problem name, the macros in the operational data maintain the ability to display the very latest information dynamically.
    The same set of macros is supported as in the trigger name.

    Comment

    • ggs_admin
      Member
      • Oct 2021
      • 44

      #3
      Hello,

      Are you are absolutely right. It has the following:

      Load averages: ({ITEM.LASTVALUE1} {ITEM.LASTVALUE3} {ITEM.LASTVALUE4}), # of CPUs: {ITEM.LASTVALUE2}

      Click image for larger version

Name:	Zabbix-Server-Configuration-of-triggers.png
Views:	4608
Size:	29.0 KB
ID:	438009

      So how can I get it working with other LASTVALUE3 and LASTVALUE4?

      should simply change this template from "system.cpu.load[all,avg1].avg(1m)}>20 " to something like "system.cpu.load[all,avg1,avg5,avg15].avg(1m)}>20" is it right?
      Exactly, I have tried to use system.cpu.load[all,avg1,avg5,avg15] or system.cpu.load[avg1,avg5,avg15] but it doesn't work in Zabbix 5.0
      Or should I create separate triggers for avg5, and avg15 ?

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        What are you trying to achieve? Listing of 4 latest values of the item? It does not work like that....
        If you are using only one item in your trigger, then you can use only {ITEM.LASTVALUE} or {ITEM.LASTVALUE1}. If you use 2 items in your trigger expression, you can use {ITEM.LASTVALUE1} and {ITEM.LASTVALUE2}...

        Comment

        • ggs_admin
          Member
          • Oct 2021
          • 44

          #5
          Thanks for clarifying.
          ideally, I want to get the alert something like that
          load averages: 20.58, 18.50, 17.48 where the 20.58 it's value of the avg1, 18.50 it's value of the avg5, and 17.48 it's value of the avg15.

          So in that case, I should add to the expression other checks for avg5 and avg15, is it right?

          Comment

          • ggs_admin
            Member
            • Oct 2021
            • 44

            #6
            So I have changed my trigger to the following

            Click image for larger version

Name:	Zabbix-Server-Configuration-of-triggers.png
Views:	4737
Size:	43.4 KB
ID:	438074

            Let's see if it solves this issue

            Comment

            • ggs_admin
              Member
              • Oct 2021
              • 44

              #7
              Hello,

              I can confirm that it is working as expected. Thanks cyber

              Comment

              • cyber
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Dec 2006
                • 4807

                #8
                Well, lets say it is almost working. Or mostly working. Don't forget, you introduced 2 other conditions to expression with OR statement, so it can trigger, when any of 3 is true. If you want this to work only, when avg1 is over limits, but to show out also avg5 and avg15, you should probably use "avg1>20 and avg5 >=0 and avg15>=0". In such case, 2nd and 3rd part of expression are anyway true and don't really affect end result. But as they are present in expression, you can use their values in trigger name, opdata etc.

                Comment

                • ggs_admin
                  Member
                  • Oct 2021
                  • 44

                  #9
                  Thanks for that point, but I really need to get it alerting when any of these values is more than 20

                  Comment

                  Working...