1.通过shell命令获取指定文件下的文件数量https://www.cndba.cn/hbhe0316/article/106569https://www.cndba.cn/hbhe0316/article/106569https://www.cndba.cn/hbhe0316/article/106569
[root@agent ~]# find /home/test -type f -print | wc -l
4
2.修改/etc/zabbix/zabbix_agentd.conf文件https://www.cndba.cn/hbhe0316/article/106569
https://www.cndba.cn/hbhe0316/article/106569
https://www.cndba.cn/hbhe0316/article/106569
[root@agent zabbix]# cat zabbix_agentd.conf | grep Server | grep -v "#"
Server=192.168.56.110
ServerActive=192.168.56.110
[root@agent zabbix]# cat zabbix_agentd.conf | grep UnsafeUserParameters | grep -v "#"
UnsafeUserParameters=1
[root@agent zabbix]# cat zabbix_agentd.conf | grep -w UserParameter | grep -v "#"
UserParameter=FileCount,find /home/test -type f -print | wc -l
3.服务器端添加监控https://www.cndba.cn/hbhe0316/article/106569https://www.cndba.cn/hbhe0316/article/106569https://www.cndba.cn/hbhe0316/article/106569https://www.cndba.cn/hbhe0316/article/106569
版权声明:本文为博主原创文章,未经博主允许不得转载。
zabbix