Ad Widget

Collapse

Multiple servers in a single graph

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • orenm
    Junior Member
    • Dec 2009
    • 3

    #1

    Multiple servers in a single graph

    Hello all.
    I want to create a aggregated graph for a certain item from servers all members in the same group. i cannot add items manually each time i remove or add a server from the group because i have many graphs (network, cpu, disk usage etc..) and servers.
    the purpose is to be able to compare servers in the group. (for example located in the same server farm)
    i tried using dynamic items but i get only one server per cut and i need the aggregated graph.
    can this be done in zabbix 1.8?
    thanks..
  • chinamusic
    Junior Member
    • Dec 2009
    • 6

    #2
    I have been trying to figure this out too. In my case, I've got a small farm of loadbalanced hosts and I'd like to have a graph showing (for example) cpu load for all of the machines on the same graph (with each machine using a different color). Then it becomes easier for people in ties who like to stare at graphs to visually see that the servers are all sharing the load more or less equally.

    Best,

    Comment

    • yam
      Junior Member
      • Feb 2010
      • 5

      #3
      Is this possible?

      Comment

      • ngit
        Junior Member
        • Nov 2011
        • 4

        #4
        Yes it is possible. In Zabbix 1.8.8 graphis are assigned to servers and only items belongning to the same server can be added to the graph.

        So what you need to do is create items which reference data coming from other servers. To do this you need to use calculated item type.

        Here's a little example:

        In this example we are going create a single graph which will show CPU load of few different servers.

        STEP 1 - Creating host
        I created a new host called "aggregated host", which isn't connected to any real host (the host's IP address is left at default value "0.0.0.0"). This new host was created just to pack aggregated graphs and items together - nice and tidy.

        STEP 2 - Creating items
        After creating a new host, we need to create items which will be added to the graph. This is an important step. These items will just reference values coming from other servers. Here are values you need to input:
        • Description = SQL Server CPU Load
        • Type = Calculated
        • Key = sql_server_cpu (here you enter a unique string ... any value will do)
        • Formula = last("SQL Server:system.cpu.load[,avg1]")
        • Type of information = Numeric (float)
        • Use custom multiplier = 100
        • Update interval (in sec) = 5


        The important bit here is the Formula (marked red). It consists of the following parts:
        • last - a function which will give us the last value of a parameter (have a look HERE)
        • SQL Server - the name of a host from the host list - here you define the server which you wand to monitor in the graph
        • system.cpu.load[,avg1] - this value is copied from host's original item - here you define which information you want to get


        You repeat this step for each of the servers you wish to add to the graph (just change the server name). When you finish you should have one item defined for each server.

        STEP 3 - Creating graph
        In this step you create a graphs in which you use items defined in the 2nd step. This procedure is no different from creating a regular graph, so I don't need to go into details.

        CONCLUSION
        And that's it - we just created a single graph, which shows CPU loads of multiple servers. In this example we used only one type of value - the CPU load, however you can use put also other types of values in the chart.
        Last edited by ngit; 11-11-2011, 13:26.

        Comment

        • richlv
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Oct 2005
          • 3112

          #5
          Originally posted by orenm
          I want to create a aggregated graph for a certain item from servers all members in the same group. i cannot add items manually each time i remove or add a server from the group because i have many graphs (network, cpu, disk usage etc..) and servers.
          ...
          can this be done in zabbix 1.8?
          not really. what you want is probably https://support.zabbix.com/browse/ZBXNEXT-570
          Zabbix 3.0 Network Monitoring book

          Comment

          • orenm
            Junior Member
            • Dec 2009
            • 3

            #6
            first of all, thank you for your reply.
            what you suggested will work but not exactly what i had in mind.
            what i meant is to be able to compare server's data on a single graph but represent each server with a different line. this would allow to see abnormal behavior of server which are part of the same group (and therefore in my case should behave the same)

            currently, to do that, i need to manually create a graph and add items to it. if the group changes, i need to do it all over again. the best way i found so far is to autogenerate a xml representation of the graphs with python script fetching from the db and import that to zabbix. this is however not very comfortable...
            the whole point is not to be forced to create items manually but mark a graph for a group and all servers with the appropriate items on that group will be added automatically. that would be a nice feature.

            Comment

            • richlv
              Senior Member
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • Oct 2005
              • 3112

              #7
              hmm. the feature request i linked asks for exactly that - ability to show an item from all hosts in a group in a graph automatically, and always be correct as hosts are added to the group or removed from it
              Zabbix 3.0 Network Monitoring book

              Comment

              • orenm
                Junior Member
                • Dec 2009
                • 3

                #8
                richlv, you are correct, that is what i wanted.
                i saw your update in the feature request, there is no such feature planned in 2.0. do you have a more recent update on this feature implementation?

                thanks.

                Comment

                • richlv
                  Senior Member
                  Zabbix Certified Trainer
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Oct 2005
                  • 3112

                  #9
                  it's still not on the short term roadmap
                  Zabbix 3.0 Network Monitoring book

                  Comment

                  • SupportGuy
                    Member
                    • Mar 2012
                    • 30

                    #10
                    When ?

                    I've just created an improvment request on this subject ZBXNEXT-1522 before seeing the already existing ZBXNEXT-570.

                    We are making preventive maintenance on farms of dozens servers used by more than one million users.

                    Following up the same parameter on the same graph (not stacked) is important, as, depending on the usage model, we can detect a behaviour difference of one of the servers before the server reach an abnormal status.

                    Comment

                    • mpasha06
                      Junior Member
                      • Jan 2014
                      • 15

                      #11
                      Running multiple nodes data in a single screen

                      1. Select node and go to the Graph
                      2. Create Graph
                      3. In 'Items' select multiple nodes items to monitor.
                      4. Click save.

                      Comment

                      Working...