如何在linux中从命令行执行nagios命令
发布时间:2020-12-14 01:18:43 所属栏目:Linux 来源:网络整理
导读:我正在使用nagios o centos服务器,我只想监视本地主机. 我已经定义了这样的服务 define service{ host_name localhost service_description Site1Service check_command check_http-site1 use generic-service notification_interval 1440} 和 在commands.cf
我正在使用nagios o centos服务器,我只想监视本地主机.
我已经定义了这样的服务 define service{ host_name localhost service_description Site1Service check_command check_http-site1 use generic-service notification_interval 1440 } 和 在commands.cfg中命令如下 define command{ command_name check_http-site1 command_line /usr/lib/nagios/plugins/check_http -H site1.dreaddomain.com } 我在那里遇到了严重的错误.所以我想从命令行检查该服务是否正在运行 解决方法
你的配置实际上有答案 – 只需在shell中执行:
/usr/lib/nagios/plugins/check_http -H site1.dreaddomain.com 您可以为详细输出添加-v. Nagios只是一个调度程序,并按指定的时间间隔执行命令.然后根据响应报告状态. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |