zabbix trap 监控windows 服务器raid中个磁盘状态脚本

@echo off

e:
cd raid
for /f "usebackq" %%i in (`"@MegaCli64.exe -PDList -a0|find /C "Online""`) do set num=%%i
echo zabbix_sender.exe -z zabbix-server-ip -p 10051 -s "监控主机名"  -k pdnum -o %num% >> zabbix_sender.log
zabbix_sender.exe -z zabbix-server-ip -p 10051 -s "监控主机名"  -k pdnum -o %num% >> zabbix_sender.log
 
for /f "usebackq" %%j in (`"@MegaCli64.exe -LDInfo -Lall -aALL|find /C "Optimal""`) do set state=%%j
echo zabbix_sender.exe -z zabbix-server-ip -p 10051 -s "监控主机名"  -k vdstatus -o %state% >> zabbix_sender.log
zabbix_sender.exe -z zabbix-server-ip -p 10051 -s "监控主机名"  -k vdstatus -o %state% >> zabbix_sender.log
date /T >> zabbix_sender.log
time /T >> zabbix_sender.log
 
echo done
exit

 

    本文转自marbury 51CTO博客,原文链接:http://blog.51cto.com/magic3/1125286,如需转载请自行联系原作者


你可能感兴趣的:(zabbix trap 监控windows 服务器raid中个磁盘状态脚本)