Ad Widget

Collapse

sum function doesn't work with month or year

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bruno42
    Junior Member
    • Jul 2022
    • 4

    #1

    sum function doesn't work with month or year

    Hello,

    sum(//hostkey,1w:now/w+1w) and sum(//hostkey,1d:now/d+1d) to sum up items of this week or day up to now are working without a problem, but
    sum(//hostkey,1M:now/M+1M) and sum(//hostkey,1y:now/y+1y) to sum up a month or year do not work.
    sum(//hostkey,1M:now) and sum(//hostkey,1y:now) don't work either.

    The error message is always like this one:
    • Cannot evaluate function: invalid second parameter at "sum(//hostkey,1M:now/M+1M)".
    Any idea why this is so? A hint for a more detailed documentation on time shift than this one https://www.zabbix.com/documentation...ion#time-shift would be highly appreciated.
    Version of Zabbix is 6.0.6.

    Thanks for your assistance!
    Bruno42
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    In the page you linked there is a link to time suffixes that says:

    Time suffixes

    For time you can use:
    • s - seconds (when used, works the same as the raw value)
    • m - minutes
    • h - hours
    • d - days
    • w - weeks
    So there is no time suffix for month or year. If you like you can check https://support.zabbix.com if there is already an enhancement request available (vote for it if already found), or open a new request there.

    Markku

    Comment

    Working...