zabbix iostat模板安装
安装它可以监控机器上的io。INSTALL
假设我的zabbix agent安装在/usr/local/zabbix目录
Install Cron Job
Do the following two steps:
[*]Copy iostat-cron.sh to /usr/local/zabbix/bin/;
[*]Copy iostat-cron.conf to /etc/cron.d/;
After a while, you'll see the iostat-data file in /zabbix-agent/var/.
Install User Parameters
To expose the iostat-data to Zabbix, do the following steps:
[*]Copy dev-discovery.sh and iostat-check.sh to /usr/local/zabbix/bin/, the former one is to enable disk device discovery capability.
[*]Copy iostat-params.conf to /usr/local/zabbix/etc/zabbix_agentd.conf.d/.
[*]在/usr/local/zabbix/etc/zabbix_agentd.conf 中Include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/iostat-params.conf 当然如果你在配置文件中Include 了/usr/local/zabbix/etc/zabbix_agentd.conf.d整个目录,就不需要在Include单个文件了
Import Template##这步需要在zabbix server 上导入
Import iostat-template.xml, and link it to a host.
重启zabbix agent ,发现有/var/zabbix_agentd.log中有报错:
1:
sh: /usr/local/zabbix-agent-ops/bin/dev-discovery.sh: No such file or directory
这是因为
# cat /etc/cron.d/iostat-cron.conf
* * * * * root /usr/local/zabbix-agent-ops/bin/iostat-cron.sh
解决方法:
cd /usr/local
ln-szabbix zabbix-agent-ops
2:
sh: /usr/local/zabbix-agent-ops/bin/dev-discovery.sh: Permission denied
sh: /usr/local/zabbix-agent-ops/bin/dev-discovery.sh: Permission denied
解决方法:
cd /usr/local/zabbix-agent-ops/bin/
chmoda+x*.sh
3:mkdir -p /usr/local/zabbix-agent-ops/var
chown -R zabbix:/usr/local/zabbix-agent-ops/var
否则iostat-data文件没法生成,就没法画图!
该文件里面是数据:
成功后在图形中看到类似如下:
页:
[1]