器量大者,福泽必厚
全部博文(587)
分类: LINUX
2014-03-08 07:13:18
假设我的zabbix agent安装在/usr/local/zabbix目录
Do the following two steps:
After a while, you'll see the iostat-data file in /zabbix-agent/var/.
To expose the iostat-data to Zabbix, do the following steps:
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
这是因为
[root@db5 tmp]# cat /etc/cron.d/iostat-cron.conf
* * * * * root /usr/local/zabbix-agent-ops/bin/iostat-cron.sh
解决方法:
cd /usr/local
ln -s zabbix 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/
chmod a+x *.sh
3:mkdir -p /usr/local/zabbix-agent-ops/var
chown -R zabbix: /usr/local/zabbix-agent-ops/var
否则iostat-data文件没法生成,就没法画图!
该文件里面是数据:
成功后在图形中看到类似如下: