Zabbix Disk IO Monitoring

Source: Internet
Author: User
Tags memory usage

Recently, there is a file export deployment of the server always card machine, view Zabbix log, Cpu,tomcat, memory usage is normal.

So consider whether it is a disk bottleneck. An article was found on the Internet to deploy Zabbix disk IO monitoring. Find out how detailed this website is for Zabbix. There is a sense of brief encounter.

Original address

https://www.ttlsa.com/zabbix/zabbix-lld-monitor-disk-io-stats/

First download the compressed package, extract the first file to/etc/zabbix/sh/,discover_disk.pl

Executing in Perl will find that the script is used to discover the local disk. The approximate format is as follows.

{
"Data": [
{
"{#DISK}": "Ram0",
"{#DISKDEV}": "/dev/ram0",
"{#DMNAME}": "Ram0",
"{#VMNAME}": "",
"{#VMID}": ""
}
,
{
"{#DISK}": "Ram1",
"{#DISKDEV}": "/dev/ram1",
"{#DMNAME}": "Ram1",
"{#VMNAME}": "",
"{#VMID}": ""
}
,
{
"{#DISK}": "XVDB1",
"{#DISKDEV}": "/DEV/XVDB1",
"{#DMNAME}": "XVDB1",
"{#VMNAME}": "",
"{#VMID}": ""
}
]
}

Put in the second script, zbx_parse_iostat_values.sh, the purpose of this script is to use the Iostats command to get disk run information.

Then add the custom key in zabbix_agentd.conf.

userparameter=discovery.disks.iostats,/etc/zabbix/sh/discover_disk.pl
Userparameter=custom.vfs.dev.iostats.rrqm[*],/etc/zabbix/sh/zbx_parse_iostat_values.sh "rrqm/s"
Userparameter=custom.vfs.dev.iostats.wrqm[*],/etc/zabbix/sh/zbx_parse_iostat_values.sh "wrqm/s"
Userparameter=custom.vfs.dev.iostats.rps[*],/etc/zabbix/sh/zbx_parse_iostat_values.sh "R/S"
Userparameter=custom.vfs.dev.iostats.wps[*],/etc/zabbix/sh/zbx_parse_iostat_values.sh "W/S"
Userparameter=custom.vfs.dev.iostats.rsec[*],/etc/zabbix/sh/zbx_parse_iostat_values.sh "RSEC/S"
Userparameter=custom.vfs.dev.iostats.wsec[*],/etc/zabbix/sh/zbx_parse_iostat_values.sh "WSEC/S"
Userparameter=custom.vfs.dev.iostats.avgrq[*],/etc/zabbix/sh/zbx_parse_iostat_values.sh "Avgrq-sz"
Userparameter=custom.vfs.dev.iostats.avgqu[*],/etc/zabbix/sh/zbx_parse_iostat_values.sh "Avgqu-sz"
Userparameter=custom.vfs.dev.iostats.await[*],/etc/zabbix/sh/zbx_parse_iostat_values.sh "await"
Userparameter=custom.vfs.dev.iostats.svctm[*],/etc/zabbix/sh/zbx_parse_iostat_values.sh "SVCTM"
Userparameter=custom.vfs.dev.iostats.util[*],/etc/zabbix/sh/zbx_parse_iostat_values.sh "%util"

After you add it, you need to restart zabbix_agent.

After the restart is complete, you can use the command zabbix_get-s XXX. X.x.xxx-k custom.vfs.dev.iostats.rrqm[*] To test whether it takes effect.

Note-S is the IP address of the destination server. IP address There are multiple times (inside, outside the network card), to see Zabbix_agent.conf's server= settings to allow which address IP access.

Finally, you need to import the template file Zbx_export_templates.xml from the Zabbix admin page.

This will allow you to find a new template in Configure->templates template_linux_disk_io_stats

The server that needs to deploy disk monitoring is then associated with the template.

Because the disk on the Alibaba cloud Machine is more. We only care about the disks that are related to the business.

administration->general-> Right Down bar select "Regular expressions"->new Regular to filter irrelevant disks

It is important to note that the name of the filter is the same as the names of the Linux disks for AutoDiscovery and templates.

When this is done, the chart and the data will appear in the monitor in minutes.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.