Ad Widget

Collapse

Number of connections to postgresql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • francisco07
    Junior Member
    • Mar 2007
    • 11

    #1

    Number of connections to postgresql

    Although I have not got the software to work yet (posted about that on the FreeBSD + postgresql thread), but so far noticed that zabbix opens about 11 connections to postgresql.

    Why so many?
    Where is this controlled?
  • James Wells
    Senior Member
    • Jun 2005
    • 664

    #2
    Greetings,
    Originally posted by francisco07
    Although I have not got the software to work yet (posted about that on the FreeBSD + postgresql thread), but so far noticed that zabbix opens about 11 connections to postgresql.
    The current versions of Zabbix opens connections for each poller and each trapper that you configure in the zabbix_server.conf file. The default value for this is 6 x pollers and 5 x trappers, or 11 total connections. Hope this helps.

    Before you ask the next question, pollers are the server asking for information, trappers are the server listening for information. At a minimum, you should have one 1 trapper, and a minimum of 1 poller, though the true values for each will depend on your network configuration and the number of nodes you plan to monitor and how you configure the monitoring.
    Unofficial Zabbix Developer

    Comment

    • francisco07
      Junior Member
      • Mar 2007
      • 11

      #3
      Originally posted by James Wells
      pollers are the server asking for information, trappers are the server listening for information.
      Are there any recommended values based on number of machines monitored?

      For example.. for every X machines monitored one should have Y servers and Z trappers.. Something along those lines to get new users started until we better understand the logistics of the numbers.

      Is there a diagram in the docs describing a global overview of the agents/server communication?

      Is it a two way communication or just the servers polling the agents?

      Comment

      • James Wells
        Senior Member
        • Jun 2005
        • 664

        #4
        Originally posted by francisco07
        Are there any recommended values based on number of machines monitored?
        Unfortunately, no. There are a couple of distinct variables that will truly be different for each site;
        1. Number Of Hosts -- This is the number of hosts you wish to monitor. Please note that as you will see below, the types of monitoring does have an affect as well.
        2. Number Of Items -- When you first load the items in to the DB, the server will set the next check for each item to 0, meaning check now. Over time the next check for these items will skew and alter. Because of this, your item checks will be a factor in the long run.
        3. Periodicity Of Item Checks -- This is one of the main factors in the equation. If you run 1000 checks ever 30 seconds, you will need to process approximately twice the data than you would if your periodicity was say 60 seconds. Additionally, depending on the types of Agent communication, the number and periodicity can double, or even triple the number of pollers you will need.
        4. Types Of Agent Communication -- This is the main one. If you are mostly polling, ie SNMP, Simple Checks, or Zabbix Agent, then you will need more pollers than trappers, however, if you are doing mostly trapping, ie. Zabbix Agent (Active), then you will need more trappers than pollers.
        5. Type of DB -- Each DB has it's own unique performance scales, which will , which will dictate the number of pollers / trappers you can support, but it can also dictate the number of each that is optimal.
        6. And many others...


        There is a bit more write up in the PDF for the unstable branch which gives some very rough guesstimates.

        Is there a diagram in the docs describing a global overview of the agents/server communication?
        I remember seeing one some where that showed a rough data flow diagram. I think it was in Linux Format or Linux Journal, years ago. It was back in the Zabbix 1.0 days and showed just the poller mode. This is probably something we should fully document.

        Is it a two way communication or just the servers polling the agents?
        This is actually controlled by the item types. The three main categories are Trapper mode, where the server listens for incoming data, Poller mode, where the server actively requests the data, and Internal mode. The item types fall into these two categories as follows;
        • Zabbix Agent -- Poller
        • Zabbix Agent (Active) -- Trapper
        • Simple Check -- Poller (See Below)
        • SNMP vN -- Poller
        • Zabbix Trapper -- Trapper
        • Zabbix Internal -- Server Only (See Below)
        • Zabbix Aggregate -- Server Internal (See Below)


        The Simple Checks are all performed by the server directly, either through FPing or through and internal socket connection.

        Zabbix Internal and Aggregate checks are actually calculated by the server. Zabbix Internal are items about the state of the Zabbix Server and Zabbix Aggregate are items about a group of hosts.
        Unofficial Zabbix Developer

        Comment

        • James Wells
          Senior Member
          • Jun 2005
          • 664

          #5
          I started writing up the data flow in the new Zabbix Wiki. You can find the write up HERE

          Please note that I am unable to upload the graphics to the server just yet. Will add them when able.
          Unofficial Zabbix Developer

          Comment

          • tronite
            Senior Member
            • Jun 2007
            • 147

            #6
            Originally posted by francisco07
            Although I have not got the software to work yet (posted about that on the FreeBSD + postgresql thread), but so far noticed that zabbix opens about 11 connections to postgresql.

            Why so many?
            Where is this controlled?
            I wonder if this is the same with mysql?

            Comment

            • tronite
              Senior Member
              • Jun 2007
              • 147

              #7
              Originally posted by James Wells
              Greetings,

              The current versions of Zabbix opens connections for each poller and each trapper that you configure in the zabbix_server.conf file. The default value for this is 6 x pollers and 5 x trappers, or 11 total connections. Hope this helps.

              Before you ask the next question, pollers are the server asking for information, trappers are the server listening for information. At a minimum, you should have one 1 trapper, and a minimum of 1 poller, though the true values for each will depend on your network configuration and the number of nodes you plan to monitor and how you configure the monitoring.
              This make a lot more sense now!

              Comment

              • tronite
                Senior Member
                • Jun 2007
                • 147

                #8
                Originally posted by James Wells
                I started writing up the data flow in the new Zabbix Wiki. You can find the write up HERE

                Please note that I am unable to upload the graphics to the server just yet. Will add them when able.
                Have you added them yet?

                Comment

                • tronite
                  Senior Member
                  • Jun 2007
                  • 147

                  #9
                  Originally posted by francisco07
                  Are there any recommended values based on number of machines monitored?

                  For example.. for every X machines monitored one should have Y servers and Z trappers.. Something along those lines to get new users started until we better understand the logistics of the numbers.

                  Is there a diagram in the docs describing a global overview of the agents/server communication?

                  Is it a two way communication or just the servers polling the agents?
                  That does not sound right.

                  Comment

                  • tronite
                    Senior Member
                    • Jun 2007
                    • 147

                    #10
                    Originally posted by tronite
                    That does not sound right.
                    Ahh, sorry I did not read what James said.

                    Comment

                    • tronite
                      Senior Member
                      • Jun 2007
                      • 147

                      #11
                      Now it make a lot more sense thanks to the explaination James gave.

                      Comment

                      Working...