View Full Version : Number of connections to postgresql
francisco07
17-03-2007, 17:39
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
17-03-2007, 18:42
Greetings,
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.
francisco07
20-03-2007, 17:59
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?
James Wells
20-03-2007, 18:30
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;
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.
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.
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.
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.
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.
And many others...
There is a bit more write up in the PDF (http://www.zabbix.com/downloads/ZABBIX%20Manual%20v1.4.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.
James Wells
20-03-2007, 22:31
I started writing up the data flow in the new Zabbix Wiki. You can find the write up HERE (http://www.zabbix.com/wiki/doku.php?id=pollervstrapper:index)
Please note that I am unable to upload the graphics to the server just yet. Will add them when able.
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?
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!
I started writing up the data flow in the new Zabbix Wiki. You can find the write up HERE (http://www.zabbix.com/wiki/doku.php?id=pollervstrapper:index)
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?
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.
That does not sound right.
Ahh, sorry I did not read what James said. :o
Now it make a lot more sense thanks to the explaination James gave.