Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How much hard disk is needed for the zabbix database monitored by Zabbix?

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

After talking about "zabbix installation", I found that I missed the explanation of how to calculate the hard disk capacity of zabbix database. I think after reading this section, you can know how big your zabbix hard drive is.

This case: 100 servers, each server has 30 monitoring items, each monitoring item is refreshed every 60 seconds, how much hard disk do you need?

As we all know, zabbix is basically configured through web, and these configuration data are also stored in the database, but its requirements for hard disk capacity are basically negligible. There are four decisive factors for hard disk in zabbix, as follows:

1. Amount of data processed per second

If we don't talk about this question, we all understand. Each second here is just an average. For example, if I have 3000 monitoring items that are refreshed every 60 seconds, there is an average of 50 data per second to be processed. That means there are 50 pieces of data to be inserted into MySQL every second.

two。 Preservation time of historical records

Zabbix records the value of each monitoring item, which is usually kept for weeks to months, depending on your configuration. Each value requires temporary hard disk space. If you want to keep a data for 30 days and have 50 values per second, then we have a total of 129600000 (30 days * 24 hours * 3600 seconds) * 50 values. The size of a record is determined by your database engine and the type of data you store (floating point, × ×, character type, etc.). Generally speaking, a record needs to occupy 50 bytes (an approximate value). In this case, 129600000 records require about 6.5G of hard disk space (129600000 "50 bytes).

3. Trend data save time

What is trend data? When you look at a chart for a week or a month, the MAX/MIN/AVG/COUNT you see on the chart is taken from trend data, and trend data is obtained once an hour. In general, a record of trend data takes about 128bytes. If we want to keep 5-year trend data, 3000 monitoring lines require 2.4GB (3000 * 24 hours * 356 days * 128bytes) per year, a total of 16.8GB for 5 years.

4. Event record save time

Alarm, warning, recovery and other things, an event takes about 130 bytes, usually not too much, unless the operation and maintenance is too bad, or the operation and maintenance requirements are too strict, set the threshold very low. If this year of operation and maintenance does not worship Buddha or burn incense, let alone affixed to the server, so an event occurs every second of this year, then the data space occupied by the event in this year is: 1 year * 365 days * 24 hours * 3600 seconds * 130 bytes is about 4.1g of space.

5. Database space calculation formula

Zabbix configuration: fixed size, general

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report