Ad Widget

Collapse

Aggregate value graphs for multiple hosts?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • astyanax
    Junior Member
    • Nov 2004
    • 8

    #1

    Aggregate value graphs for multiple hosts?

    Hello,

    I am trying to see whether Zabbix can easily create aggregate graphs for multiple hosts. I.e. I have several hosts host1 host2 host3 in group Unix Hosts, and I want to graph the total free memory for all of the hosts in the Unix Hosts group on a graph, not plot the indivual host values for free memory. Is this possible? Thanks much.
  • morgolis
    Member
    • Oct 2004
    • 33

    #2
    While i'm not a Zabbix guru, i believe what you're asking is an average of all three servers and then graph just the average free memory?

    If that is not the case, then having them in a group just means that the one item list for that group gets run on all 3 servers at the same time. I know you could easilly put all 3 machines on a single graph using different color codes and such.

    Comment

    • majekw
      Junior Member
      • Dec 2004
      • 5

      #3
      It is also usefull if you have multiple uplinks and you want to graph total bandwitch. Ideal solution for this could be item which allow to define calculations from other items, so you can graph this, make triggers etc.

      Comment

      • astyanax
        Junior Member
        • Nov 2004
        • 8

        #4
        Originally posted by morgolis
        While i'm not a Zabbix guru, i believe what you're asking is an average of all three servers and then graph just the average free memory?

        If that is not the case, then having them in a group just means that the one item list for that group gets run on all 3 servers at the same time. I know you could easilly put all 3 machines on a single graph using different color codes and such.
        Well, I'm actually looking for total memory free for example: a graph of the sum of (free memory on host 1 + free memory on host 2 + free memory on host 3). I didn't see a way to do this, so I created a new UserParameter for the zabbix agentd which queries the items table for the most recent values for the metric I'm looking for, for all hosts in the group.

        My query looks like this: UserParameter=cluster[memfree],mysql -s zabbix -e 'select SUM(lastvalue) from items where key_="memory[free]" and hostid>=10053 and hostid<=10083' | tail -1.

        I'm sure I could do a query on hosts as well as items, something like "select SUM(items.lastvalue) from items,hosts where key_="memory[free]" and items.hostid = hosts.hostid and hostid like "clustermachine%"", but the hosts were all added sequentially, so I could refer to them fairly easily using their numeric id.

        It would be much easier to have some way to ask for a sum of multiple items as a new item, or something similar. So there is no better way to do this?
        Last edited by astyanax; 08-12-2004, 21:34.

        Comment

        • morgolis
          Member
          • Oct 2004
          • 33

          #5
          Originally posted by astyanax
          My query looks like this: UserParameter=cluster[memfree],mysql -s zabbix -e 'select SUM(lastvalue) from items where key_="memory[free]" and hostid>=10053 and hostid<=10083' | tail -1.
          It seems to me that if you have that running on your local servers zabbix_agentd daemon, it should throw all the values you're looking for in to the parameter "cluster"

          Try setting up an item to be polled such as: host.cluster against your localhost zabbix agent.

          Then create a graph for said item. If it's giving you the right information, it should graph it nicely.

          I did the same thing for the mail queue on a Solaris mail server using the parameter called mailq. Still having problems with it, but the logs show it's on the solaris zabbix agent. Haven't had the time to bang out what the problem is.

          Comment

          • jalfrey
            Junior Member
            • Mar 2012
            • 28

            #6
            you can calculate aggregates read this article
            http://www.zabbix.com/documentation/...ypes/aggregate

            Comment

            Working...