Powershell - 发送被动nagios检查
Powershell - Send passive nagios check
如何在 powershell 脚本中发送被动 nagios 检查?在批次中我做:
<host>\t<svc_description>\t<return_code>\t<plugin_output> | "C:\MyPrograms\send_nsca.exe" -H HOST -C "CONFIG-FILE"
我的解决方案:
cmd /c 'echo nagios.host nagios.service <STATUS-ID> ' $sNagiosTest ' | "C:\Program Files\nsca\send_nsca.exe" -H host_address -c "C:\Program Files\nsca\send_nsca.cfg"'
如何在 powershell 脚本中发送被动 nagios 检查?在批次中我做:
<host>\t<svc_description>\t<return_code>\t<plugin_output> | "C:\MyPrograms\send_nsca.exe" -H HOST -C "CONFIG-FILE"
我的解决方案:
cmd /c 'echo nagios.host nagios.service <STATUS-ID> ' $sNagiosTest ' | "C:\Program Files\nsca\send_nsca.exe" -H host_address -c "C:\Program Files\nsca\send_nsca.cfg"'