Ad Widget

Collapse

Item which is a sum of Other Item

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ricamz
    Junior Member
    • May 2010
    • 15

    #1

    Item which is a sum of Other Item

    Hi there.

    I have two questions.

    1) I have an item A which count the number of transactions that were made in a given database every minute. And this item works fine.

    What I want now is to have another item B which is the daily sum of item A.

    I have tried grpsum and even having an sql sum of the database. But both give me errors at some point.

    2) I want to have a user that can only have access to one host and not a group of hosts. How can I do that?

    Regards,

    Ricardo
  • alixen
    Senior Member
    • Apr 2006
    • 474

    #2
    Hi,

    Originally posted by ricamz
    1) I have an item A which count the number of transactions that were made in a given database every minute. And this item works fine.

    What I want now is to have another item B which is the daily sum of item A.

    I have tried grpsum and even having an sql sum of the database. But both give me errors at some point.
    You should use a calculated item: http://www.zabbix.com/documentation/...lculated_items

    Basically, you will define it as:
    sum("host:A",86400)

    Originally posted by ricamz
    2) I want to have a user that can only have access to one host and not a group of hosts. How can I do that?
    Access rights are defined on a whole group, not on a specific host.
    As a workaround, I'd suggest to create a new host group with only the host you want and change user rights accordingly.

    Regards,
    Alixen
    http://www.alixen.fr/zabbix.html

    Comment

    • ricamz
      Junior Member
      • May 2010
      • 15

      #3
      Thanks alixen.

      But if we sum 86400 seconds back from now it will sum transactions that happened yesterday (if we are in the beginning of the day).

      Comment

      • alixen
        Senior Member
        • Apr 2006
        • 474

        #4
        Originally posted by ricamz
        Thanks alixen.

        But if we sum 86400 seconds back from now it will sum transactions that happened yesterday (if we are in the beginning of the day).
        Sorry, I think that I misunderstood your question.
        Do you want:
        1. an item that is computed once a day, preferably at the end of the day and give you the sum for all day
        2. an item that will repeatedly compute the sum for current day, basically it will start at 0 at 00:00 and increase all day until 23:59

        My solution could be adapted in first case by playing with flexible intervals. For second case, I don't think there is an easy solution with Zabbix formulas.

        Regards,
        Alixen
        http://www.alixen.fr/zabbix.html

        Comment

        • ricamz
          Junior Member
          • May 2010
          • 15

          #5
          It is the second one.

          I have done something like making a query in sql (in zabbix db) that sums all the values in that day for the item.

          But for some reason one day it stopped working. I think it's more an hack than a solution, but for few weeks it worked out well.

          Comment

          • waardd
            Member
            • Aug 2014
            • 82

            #6
            Originally posted by alixen
            • an item that is computed once a day, preferably at the end of the day and give you the sum for all day
            I'm looking for a way tot calcultae items at a daily basis at the beginning of the day the previous day, or at the end of the day that day.

            Is there a way i can use grpsum or something to calculate a daily sum?

            Comment

            Working...