Icinga 2 check_logfiles 与 Windows 上的 Agent

Icinga 2 check_logfiles 与 Windows 上的 Agent

我想在 Windows 机器上添加 check_logfiles 命令。我必须使用 NSClient++ 吗?还是可以使用已安装的 Icinga 2 Client 来执行此操作?我在我的卫星上配置了服务和 check_command。但我收到此错误消息:

Command D:\icinga2\/sbin/check_logfiles-3.9/plugin-scripts/check_logfiles --criticalpattern ERROR --logfile D:\logdirectory\error.log --tag aplication-Log failed to execute: 2, "The system cannot find the file specified."

我尝试用“\”代替“/”来更改具有正确 Windows 路径的路径,但仍然收到相同的错误消息。

有什么想法吗?提前致谢!

答案1

你好,我可以解决我的问题。在检查命令中,您需要将 perl 与命令分开,如下所示:

check_command = "perl", "D:\icinga2\sbin\check_logfiles-3.9\plugin-scripts\check_logfiles" 

不知道。现在它工作正常。感谢@Diamant 的帮助

相关内容