Translations of this page:

For the impatient

  1. Download your version of check_multi.
  2. Untar the tarball and step into the check_multi directory.
  3. Run the usual 3-step thing (valid for the 'default' Nagios installation in /usr/local/nagios):
    # ./configure; make all; make install
  4. There are some examples in the sample-config directory, please have a look at them.
  5. If you're not running a Nagios version later than 3.0a4 please setup a playground with the newest nagios version. Follow the hints here.
  6. Copy check_multi into your libexec directory and integrate check_multi into your nagios configuration.
  7. Reload Nagios one time for check_multi (you will never have to do this again ;-)).
  8. Have a look into your Services or Extended Info screens.
  9. Enjoy! ;-)


Note: for background information concerning buffer sizes, different transports and the multiline feature, please read also this blog article.

Extend buffer size in Nagios

Please increase your buffer limits (MAX_PLUGIN_OUTPUT_LENGTH und MAX_INPUT_BUFFER).
It's no problem to increase both and compile a fresh nagios version (3.0a4 and above) following Ethans comment from the Nagios 3.x documentation:

Plugin Output Length Restrictions  
Nagios will only read the first 4 KB of data that a plugin returns. 
This is done in order to prevent runaway plugins from dumping megs 
or gigs of data back to Nagios. This 4 KB output limit is fairly 
easy to change if you need. Simply edit the value of the
MAX_PLUGIN_OUTPUT_LENGTH definition in the include/ file 
of the source code distribution and recompile Nagios. There's 
nothing else you need to change!


check_multi is just a normal plugin and can be called via NRPE like all other plugins.
One remark: you might have to change the buffer sizes in common.h MAX_INPUT_BUFFER and MAX_PACKETBUFFER_LENGTH.
For the guys with old NRPE releases (before May 8th 2007) out there: for multiline output NRPE v2.8 or higher is required.

Caveat: the PIPE buffer handling has been changed with the linux kernel 2.6.11. Before this kernel release linux kernels were only capable to transport 4096 bytes!

And: have a look onto Ton Voons blog at the opsera site: he provides a patch which allows NRPE to read subsequent blocks one after another. The charm in this solution lies in the fact, that you don't have to upgrade all NRPE daemons in the field at once.


check_by_ssh from the official Nagios Plugins 1.4.10 and above is multiline capable. For older versions please use this small patch.


Since July 1st 2009 ndomod.c supports long plugin output - please run a decent version of ndoutils.
NDO is not multiline capable at the moment, since the NEB module ndomod only passes the field output but not long_output to ndo2db. This small patch solves the problem.

The buffersize for ndomod is defined by NDOMOD_MAX_BUFLEN in ndomod.h and the default value is 4096. If your check_multi output is longer that 4K, please change this value and recompile NDO.

Detailed installation

The check_multi installation is now autoconf based, which means you have to use configure to define your settings and gather system information.

  1. Get your check_multi
    Step onto the download page. There are two methods getting the SW, either per 'svn' or per tarball: Download the Tarball and unpack it where you want:
    tar xpzf check_multi_[...].tar.gz
  2. A new directory with the version information in its name is created. Step into it.
  3. You will see some file like this:
    nagios@thinkpad:~/check_multi-SVN280> ls -l
    total 180
    -rw-r--r-- 1 nagios nagios   9374 2009-10-22 21:49 Changelog
    -rw-r--r-- 1 nagios nagios  17987 2009-10-22 21:49 LICENSE
    -rw-r--r-- 1 nagios nagios   2859 2009-10-22 21:49
    -rw-r--r-- 1 nagios nagios    993 2009-10-22 21:49 README
    -rw-r--r-- 1 nagios nagios    290 2009-10-22 21:49 THANKS
    -rwxr-xr-x 1 nagios nagios 102048 2009-10-22 21:49 configure
    -rw-r--r-- 1 nagios nagios  13061 2009-10-22 21:49
    drwxr-sr-x 5 nagios nagios   4096 2009-10-23 23:14 contrib
    drwxr-sr-x 4 nagios nagios   4096 2009-10-23 23:14 plugins
    drwxr-sr-x 9 nagios nagios   4096 2009-10-23 23:14 sample_config
    -rw-r--r-- 1 nagios nagios   3081 2009-10-22 21:49

    check_multi itself resides in the plugins directory:

    nagios@thinkpad:~/check_multi-SVN280> ls -l plugins
    total 108
    -rw-r--r-- 1 nagios nagios   478 2009-10-22 21:49
    -rwxr-xr-x 1 nagios nagios 95037 2009-10-22 22:07
    drwxr-sr-x 3 nagios nagios  4096 2009-10-23 23:14 t
  4. There are some .in files. These files will be converted during the installation.
  5. Now call the configure script. It is responsible for
    • customizing your copy of check_multi and setting defaults
    • gathering system information, e.g. the location of commands
  6. If you want to know which options to use with configure, run ./configure –help.
    There are two main sections of commands:
    • directories
    • options
  7. The most important directory setting is - -prefix. It determines the 'root' directory of your check_multi installation.
  8. There are numerous settings within the options section. Don't change options if you are unsure, most of the settings have reasonable defaults. For the standard installation under /usr/local/nagios you don't need any option.
  9. Run
    ./configure [--option1=value1 ...]

    Look for errors and correct them.

  10. Makefiles have been created. Run
    make all

    to create scripts and config files.

  11. Run tests with
    make test

    If these tests succeeded, you are ready for install. If not, it's most likely a configure problem. If you're sure that it's not having to do with configure issues, send me a mail with the output of the test.

  12. Install the plugin on this host with
    make install

    This places the plugin under <prefix>/libexec.

  13. If you want to install check_multi on a remote host, there are multiple ways to distribute it: rcp, scp, rsync…
  14. If you are interested in sample configuration and examples, run
    make install-config

    or for some contributions like a HTML aware notification script or a custom Nagios query CGI, run

    make install-contrib
  15. That's all, enjoy ;-)


An upgrade is just a new installation of your plugin with the same configure settings.
Note: If you want do not recall your configure settings, just run

$ check_multi -V
check_multi: v$Revision: 289 $ $Date: 2009-10-31 13:56:01 +0100 (Sat, 31 Oct 2009) $ $Author: flackem $
configure  '--prefix=/var/opt/nagios' '--with-config_dir=/etc/opt/nagios/check_multi'

As you see, this provides information for the version of check_multi and the configure command line. No need to save config.log after installation.

projects/check_multi/installation.txt · Last modified: 2010/06/11 21:49 by flackem = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0