This article omits the installation of zabbix server and client. For the zabbix server and client installation, you can check my previous article. Here, the centos system is used as an example to monitor the disk usage. The zabbix version is 3.2. For other versions, please test it yourself.
Currently, the zabbix server and client can communicate normally. To monitor the disk usage, you only need to configure it on the zabbix server.
1, login zabbix server
Configuration – Template – Create Template – Set Template Name
2, parameter description
The vfs.fs.size[fs,<mode>] key value is required to monitor disk usage.
Fs: file system
Total default all, free idle, used, pfree free percentage, used percentage
3, create a monitoring item
Just set a name and key value, and the rest are default.
The name I set here is disk-space-total
Key value vfs.fs.size[/data,total], my disk is mounted under /data, modify it according to the situation
PS: My data update interval is 30 seconds. In the actual production environment, the data update time can be set longer, depending on individual circumstances.
Next continue to create free, used, create methods and total the same as total
|1 2||名称disk – space – free 键值vfs . fs . size [ / data , free ] 名称disk – space – used 键值vfs . fs . size [ / data , used ]|
Add pfree, pused, note that these two information types need to choose floating point number, unit %
|1 2||名称disk – space – pfree 键值vfs . fs . size [ / data , pfree ] 名称disk – space – pused 键值vfs . fs . size [ / data , pused ]|
4, create a graphic
5, link template
The template has been added, and finally it will be linked to the host.