Ad Widget

Collapse

Zabbix 5.4.12

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Lada
    Junior Member
    • Oct 2021
    • 2

    #1

    Zabbix 5.4.12

    Hello,

    I have a question about the way the trigger methods are functionning.

    I want to trigger an alarm if the wearout of my SSDs is decreasing to fast.
    In the Trigger prototype of the template definition I wrote:
    avg(/Template_HDD_SMARTMONTOOLS_2_WITH_LLD/uSSD["{#DISKCMD}",SSD wearout],1d:now-30d) - avg(/Template_HDD_SMARTMONTOOLS_2_WITH_LLD/uSSD["{#DISKCMD}",SSD wearout],1d) >= 2

    It should trigger an alarm if the difference between the average (on one day) a month ago and the average on the current day is more than 2.

    My data history for that item is 7 days, trends is 2 years.

    The trigger is not functionning because I have an error in zabbix saying: not enough datas for avg(/Template_HDD_SMARTMONTOOLS_2_WITH_LLD/uSSD["{#DISKCMD}",SSD wearout],1d:now-30d)​.


    So, is it the normal behaviour that the avg function to use only the history values and not the trends (if it needs it) ?


    Thank you for clarifying it.

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

    #2
    If you think a bit, then it is pretty obvious, that you cannot calculate averages, if you do not have that data any more and only trends are left... But you can use functions like trendavg https://www.zabbix.com/documentation...ctions/history
    and yes it is said even in docs ..
    Most trigger functions are evaluated based on history data, while some trigger functions for long-term analytics, e.g. trendavg(), trendcount(), etc, use trend data.​

    Comment

    • Lada
      Junior Member
      • Oct 2021
      • 2

      #3
      Ok, thank you for the confirmation, I couldn't find it in the documentation.

      So when we make a trigger criteria we have to know where the information is stored precisly to use the appropriate function (avg or trendavg​ in my example). Unfortunatly, when we use graphs the 2 tables (history and trend) are merges in one view (that is good) which tend to think that zabbix knows where to find the right datas.

      Comment

      Working...