如何在powershell脚本中发送被动nagios检查?在批处理中我做:
<host>\t<svc_description>\t<return_code>\t<plugin_output> | "C:\MyPrograms\send_nsca.exe" -H HOST -C "CONFIG-FILE"
答案 0 :(得分:0)
我的解决方案:
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"'