zabbix database require much hard disk? I tell you (6)

The finished article " zabbix installation ", they were missing to explain the calculation method of the database zabbix hard disk capacity, I would like to read this section we can know their zabbix in the end to how much hard drive. The Case: 100 servers, each server has 30 monitoring items, each monitoring item 60 seconds to refresh, how much hard drive it? As we all know, zabbix basically through the web configuration, configuration data is stored in the database, but it requires hard disk capacity can be basically negligible, zabbix have decisive factor hard disk 4, as follows: 1. processed per second the amount of data this problem is not to say, we all understand. Only an average, for example, I have a 3000 entry side of the monitor every second, every 60 seconds refresh, then an average of 50 per second (3000/60) data to be processed. That is 50 per second data to be inserted into the MySQL 2. History save time zabbix be recorded for each monitored items, these records are generally retained a few weeks to a few months, specifically to see you configured. Each value required for temporary use of hard disk space. If a data you want to keep for 30 days, and 50 values per second to be retained, then we are a total of 129,600,000 (30 days * 24 * 3600 seconds) * 50 value, a record much by your database engine and your stored data to determine the type (float, plastic, character, etc.), in general, a record needs to occupy 50 bytes (a rough value), approximately 129,600,000 record in this case ( 129 600 000 * 50 bytes) 6.5G disk space 3. trend data retention time What are the trends in the data it? When you see a week or month chart, you can see on the chart MAX / MIN / AVG / COUNT data are taken from the trend, trend data acquisition time one hour, under normal circumstances, probably a record trend data occupies 128 bytes, If we want to save the 5-year trend data, 3000 to monitor lines need to 2.4GB (3000 * 24 hours * 356 days * 128 bytes) every year, five-year total of 16.8 g 4. event Log duration alarm, warning, recovery etc. thing, an event taking up about 130 bytes, not too much under normal circumstances, unless doing too bad operation and maintenance, or operation and maintenance requirements are too strict, the threshold is very low tone. If this operation and maintenance animal year this year, neither did burn incense and pray there, let alone to the server with the magic stick, so every second year an event occurs, the event this year for the space occupied by the data: 1 year 365 * days * 24 * 130 * 3600 seconds was about 4.1G bytes of space. The database space calculated zabbix configuration: a fixed size, typically <10MB historical data: Days * (Total / monitored item refresh rate) * 24 * 3600 seconds * 50 bytes Trend data: number of days * (Total number of monitoring items / 3600) * 24 * 3600 seconds * 128 bytes of event data: the number of days * number of events (approximate value) * 24 * 130 * 3600 seconds byte 6. Finally see here, we all have in mind the data, the database disk space = profile size + history + + trend recorded event record. Although the hard disk will not stop growth, but will one day stop growing, the space has remained the same, why? Read through this also ask why, you see it again from scratch. I hope you continue to support the operation and maintenance of survival time, the students hope zabbix tutorials, stay tuned, next we talk about how to upgrade existing zabbix .

Reproduced in: https: //my.oschina.net/766/blog/211408

Guess you like

Origin blog.csdn.net/weixin_33889245/article/details/91546785