0

In Icinga2 there is a script in nagios plugins folder called check_load which gives the result for host OS. When I call the script with -h it reports:

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

As it appears there is not parameter to pass as host address.

The question is how should I get the load average (1m, 5m, 15m) of remote servers?

Alireza
  • 6,497
  • 13
  • 59
  • 132
  • You have to run Icinga on remote servers and then let those icinga instances report to the master server. Alternatively you can use "passive checks" as a starting point for your search. The hostname which to report to is then specified in the main icinga config. – Sheppy Nov 01 '18 at 13:09

1 Answers1

0

you can use the nagios nrpe server/client to query the remote host

on server side (remote host): in /etc/nagios/nrpe.d/default.cfg

add a line like this

command[system_load]=/usr/lib/nagios/plugins/check_load -r -w 100,20,30 -c 100,40,50

the query from icinga is

/usr/lib/nagios/plugins/check_nrpe -H HOSTNAME -c system_load -t 30
Daniel Gohlke
  • 91
  • 1
  • 4