Ad Widget

Collapse

Calculating current hour/day/week

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Netbulae
    Junior Member
    • Jul 2009
    • 27

    #1

    Calculating current hour/day/week

    Hi,

    We've been using zabbix for a while now. Currently we are trying to use it for monitoring of an energy meter and are running into zabbix limitations.

    We have some calculated items that calculate the last hour/day/week of energy data. But now we want to add items that show the usage in the current hour/day/week and cannot figure out how to do this.

    For instance the current hour item would have the data from the start of the hour until now, updated every minute (the values come in every 5 seconds); but there appears no way to do this.
  • Pitons
    Member
    • Oct 2017
    • 49

    #2
    Hi,

    Information coming in is full number or delta?
    Could you share screenshot of an item that collects data?

    Comment

    • Netbulae
      Junior Member
      • Jul 2009
      • 27

      #3
      Originally posted by Pitons
      Hi,

      Information coming in is full number or delta?
      Could you share screenshot of an item that collects data?
      The information is a full number
      Attached Files

      Comment

      • Pitons
        Member
        • Oct 2017
        • 49

        #4
        Originally posted by Netbulae
        The information is a full number
        If it is a current counter reading which grows by usage you can:
        create calculated item using custom intervals with Scheduling to take reading @ exact time and then compare that value using function last() for another calculated item. The difference between those two should give you growing usage for some period.

        I hope my thoughts make sense, I will try to test it my self.

        Comment

        • Pitons
          Member
          • Oct 2017
          • 49

          #5
          Played around a bit and I think this might solve your task:

          Create calculated item:
          Name it as you wish
          Key (for example): Total.active.energy.hourly
          Formula:
          Code:
          last("<key from Total active energy>")
          Update interval: 0
          Custom interval: Scheduling: h0-23 (this is for every hour reading, use "h0" for every days 00:00 and "wd1h0" for every weeks Mondays 00:00)

          Then create another calculated item:
          Name it as you wish also key can be a subject of your imagination but it should be unique.
          Formula:
          Code:
          last("<key from Total active energy>")-last("Total.active.energy.hourly")
          Update interval: 15

          Note that calculations in zabbix are done every 30 seconds.

          Hope it helps

          Comment

          Working...