【问题标题】:ICINGA - passive checksICINGA - 被动检查
【发布时间】:2016-12-06 10:44:23
【问题描述】:

我一直在使用 Icinga 进行基础架构监控。我正在对大约 300 项服务使用主动检查,并且我现在对设置被动检查很感兴趣,因为我想从 Windows 机器上的事件查看器中获取所有关键事件并在 Icinga 中显示它们。我已经安装了 NSCA 服务器,并使用适当的时间表配置了 nsclient.ini 文件。但是,我从未收到被动检查的任何结果。我收到输出的唯一时间是达到新鲜度阈值并且 Icinga 主动从远程计算机中提取结果。我显然在这里遗漏了一些东西,所以任何建议都将不胜感激。

【问题讨论】:

    标签: icinga


    【解决方案1】:

    为什么要在 Windows 机器上使用被动检查而不是主动检查?您可以使用powershell查询事件日志并将其发送到icinga2而不会出现问题...

    类似:

    • 服务定义为模板:
    apply Service for ( eventname => eventlog in host.vars.eventlog)  {
        import "generic-service"
        check_command = "nsclient_windows"
        vars.nrpe_command = "check_eventlog"
        vars.nrpe_arguments = [ eventlog["eventid"], eventlog["msg"] ]
        import "service-instructions"
        assign where host.vars.hasEventLog == true
    }
    
    • checkcommand 定义为模板:
    object CheckCommand "nsclient_windows" {
        import "plugin-check-command"
        command = [ PluginDir + "/check_nrpe" ]
        arguments = {
             "-H" = "$nrpe_address$"
             "-p" = "$nrpe_port$"
             "-c" = "$nrpe_command$"
             "-n" = {
    }
    
    • host.conf
    vars.hasEventLog = true
    vars.eventlog ["EventLog_XXX"] = { eventid="XXX", msg="Added_user_to_local_group"}
    

    希望对你有帮助!

    【讨论】:

      【解决方案2】:

      Icinga 有自己的 Windows 客户端。您可以将其安装在您的 Windows 机器中并尝试被动。如果有帮助,请查看此链接

      https://monitoring-portal.org/woltlab/index.php?thread/41955-icinga2-passive-checks-send-by-icinga2-windows-agent/

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多