Ad Widget

Collapse

Displaying item quotients on graphs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zwar
    Junior Member
    • Apr 2010
    • 12

    #1

    Displaying item quotients on graphs

    Hi.

    I'm monitoring two items, for example: Memory Pages/sec and Disk Transfers/sec for all disks on the same server. Is it possible to display quotient of both items on a single graph? If yes, how?

    Thanks for help!
  • alixen
    Senior Member
    • Apr 2006
    • 474

    #2
    Hi,

    Originally posted by zwar
    I'm monitoring two items, for example: Memory Pages/sec and Disk Transfers/sec for all disks on the same server. Is it possible to display quotient of both items on a single graph? If yes, how?
    If you are using Zabbix v1.8.2, you can define a calculated item and add it to the graph.
    See http://www.zabbix.com/documentation/...lculated_items for details

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

    Comment

    • zwar
      Junior Member
      • Apr 2010
      • 12

      #3
      Thank you for the replay. I've read the documentation, but didn't manage to set up a working calculated item.
      Here's my code for the expression in the moment (and it's not working):

      Code:
      {SERVER1:perf_counter["\Memory\Pages/sec"].last(0)}/{SERVER1:perf_counter["\PhysicalDisk(_Total)\Disk Transfers/sec"].last(0)}
      Any suggestions on how to get this done?

      Comment

      • alixen
        Senior Member
        • Apr 2006
        • 474

        #4
        Originally posted by zwar
        Thank you for the replay. I've read the documentation, but didn't manage to set up a working calculated item.
        Here's my code for the expression in the moment (and it's not working):

        Code:
        {SERVER1:perf_counter["\Memory\Pages/sec"].last(0)}/
        {SERVER1:perf_counter["\PhysicalDisk(_Total)\Disk Transfers/sec"].last(0)}
        Any suggestions on how to get this done?
        I don't know why, but Zabbix developers have chosen to use a different syntax for calculated items and triggers.

        Your expression should be something like:
        Code:
        last("SERVER1:perf_counter[\Memory\Pages/sec]")/
        last("SERVER1:perf_counter[\PhysicalDisk(_Total)\Disk Transfers/sec]")
        Check the manual for details : http://www.zabbix.com/documentation/...lculated_items

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

        Comment

        • zwar
          Junior Member
          • Apr 2010
          • 12

          #5
          Yes, i tried that allready, then i read about calculated items using the same syntax as triggers and tried the other syntax.... Finaly I worked out a working expression:

          Code:
          last("perf_counter[\"\Memory\Pages/sec\"]")/
          last("perf_counter[\"\PhysicalDisk(_Total)\Disk Transfers/sec\"]")
          But what bothers me still, what is the function of the key in calculated expressions? I did not see anything about that in the docs. Why is a key needed since the calculated item return the value calculated in the expression field? Or am I missing something...?

          Comment

          • alixen
            Senior Member
            • Apr 2006
            • 474

            #6
            Originally posted by zwar
            But what bothers me still, what is the function of the key in calculated expressions? I did not see anything about that in the docs. Why is a key needed since the calculated item return the value calculated in the expression field? Or am I missing something...?
            You need the key in order to reference this item in other expressions (other calculated item, trigger,...).

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

            Comment

            • zwar
              Junior Member
              • Apr 2010
              • 12

              #7
              Hm ... It seems there's something wrong then ...

              I've created a calculated item shown on the screen shot below.

              The item always returns value 6.4Gbytes, what is the total memory size on the server. Or with other words the item discards the expression field and returns only that what's configured in the key field. So either I did something wrong or keys in calculated items are more than just possible references for other expressions ...
              Attached Files

              Comment

              • zwar
                Junior Member
                • Apr 2010
                • 12

                #8
                Finaly I made it work ... I created a separated stand-alone vm.memory.size[total] item, and changed the key of my calculated item to something else. Finaly it worked ... Another thing I realized it takes some time before calculated item is recognized by the agents, I guess it takes time before it collects enught data to be able to begin with calculations.

                Comment

                Working...