【发布时间】:2018-10-17 14:01:17
【问题描述】:
在Icinga2 中,nagios plugins 文件夹中有一个名为check_load 的脚本,它给出了主机操作系统的结果。当我使用-h 调用脚本时,它会报告:
check_load v2.1.1 (monitoring-plugins 2.1.1)
Copyright (c) 1999 Felipe Gustavo de Almeida <galmeida@linux.ime.usp.br>
Copyright (c) 1999-2007 Monitoring Plugins Development Team
<devel@monitoring-plugins.org>
This plugin tests the current system load average.
Usage:
check_load [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15
Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
--extra-opts=[section][@file]
Read options from an ini file. See
https://www.monitoring-plugins.org/doc/extra-opts.html
for usage and examples.
-w, --warning=WLOAD1,WLOAD5,WLOAD15
Exit with WARNING status if load average exceeds WLOADn
-c, --critical=CLOAD1,CLOAD5,CLOAD15
Exit with CRITICAL status if load average exceed CLOADn
the load average format is the same used by "uptime" and "w"
-r, --percpu
Divide the load averages by the number of CPUs (when possible)
Send email to help@monitoring-plugins.org if you have questions regarding
use of this software. To submit patches or suggest improvements, send email
to devel@monitoring-plugins.org
看起来没有参数可以作为主机地址传递。
问题是我应该如何获得远程服务器的平均负载(1m、5m、15m)?
【问题讨论】:
-
您必须在远程服务器上运行 Icinga,然后让这些 icinga 实例向主服务器报告。或者,您可以使用“被动检查”作为搜索的起点。然后在主 icinga 配置中指定要报告的主机名。