Ad Widget

Collapse

CPU load prediction

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cbyepez
    Junior Member
    • Feb 2024
    • 6

    #1

    CPU load prediction

    Hi , I have created the following item to predict CPU load for the next 30 days :
    Click image for larger version

Name:	dataurl939178.png
Views:	153
Size:	25.2 KB
ID:	479039

    It works fine but only provides real-time results and not in the “future”. I need it to display on a graph the value for 30 days ahead. I tried using a last function last(/TGPRDRCPP/CPU_USE_FORECAST_TEST,#1,30d) but I'm getting the following error:

    Click image for larger version

Name:	dataurl939180.png
Views:	191
Size:	3.2 KB
ID:	479038

    Any ideas on how to solve this will be appreciated.

  • rallybat
    Junior Member
    • Feb 2024
    • 1

    #2
    Hi,

    Have you tried this formula?
    last(/TGPRDRCPP/CPU_USE_FORECAST_TEST, 30d)

    Comment

    • cbyepez
      Junior Member
      • Feb 2024
      • 6

      #3
      Originally posted by rallybat
      Hi,

      Have you tried this formula?
      last(/TGPRDRCPP/CPU_USE_FORECAST_TEST, 30d)
      Yes , I tried but didn't work
      Click image for larger version

Name:	image.png
Views:	160
Size:	25.3 KB
ID:	479093
      Attached Files

      Comment

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

        #4
        last(/TGPRDRCPP/CPU_USE_FORECAST_TEST,#1,30d) is wrong as you can see in docs ..
        Code:
        [B]last[/B] (/host/key,<#num<:time shift>>)
        , you cannot add second parameter there.. you can have time shift... #1:30d, last value 30d ago...
        same story with last(/host/key, 30d) ... last accepts #num (optional) - the Nth most recent value​ and not the 30d as parameter.​

        Comment

        • cbyepez
          Junior Member
          • Feb 2024
          • 6

          #5
          Originally posted by cyber
          last(/TGPRDRCPP/CPU_USE_FORECAST_TEST,#1,30d) is wrong as you can see in docs ..
          Code:
          [B]last[/B] (/host/key,<#num<:time shift>>)
          , you cannot add second parameter there.. you can have time shift... #1:30d, last value 30d ago...
          same story with last(/host/key, 30d) ... last accepts #num (optional) - the Nth most recent value and not the 30d as parameter.​

          I appreciate your answer, how can I use the time shift argument in the last function, such as predicting on a graph the behavior that the CPU will have 30 minutes in the future?


          Something similar to this function Click image for larger version

Name:	image.png
Views:	190
Size:	4.1 KB
ID:	479221 ​used in version 4.0 but I still can't find its equivalent in version 6.4 so that it allows me to graph the future behavior​​​

          Comment

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

            #6
            in v4 last(anything, #1,30m) in v6.4 last(/host/item,#1:30m)

            Timeshifts are explained here... https://www.zabbix.com/documentation/current/en/manual/config/triggers/expression

            For forecast ... hmm .. forecast(/host/item,30d:now/d+1d,30d) maybe.. I have never needed to use forecast..

            Last is a bit different function as it deals with a single value from a row of values (last, second to last, last one 1 day ago etc..) It will not return whole range.

            Comment

            • cbyepez
              Junior Member
              • Feb 2024
              • 6

              #7
              Originally posted by cyber
              in v4 last(anything, #1,30m) in v6.4 last(/host/item,#1:30m)

              Timeshifts are explained here... https://www.zabbix.com/documentation/current/en/manual/config/triggers/expression

              For forecast ... hmm .. forecast(/host/item,30d:now/d+1d,30d) maybe.. I have never needed to use forecast..

              Last is a bit different function as it deals with a single value from a row of values (last, second to last, last one 1 day ago etc..) It will not return whole range.
              I appreciate your answer , last(/host/item,#1:30m) didn't work.


              Click image for larger version

Name:	image.png
Views:	129
Size:	29.9 KB
ID:	479299

              Comment

              Working...