This page last changed on Oct 25, 2013 by mbabik.


This document describes the policy to accept and integrate new probes into the SAM infrastructure.


Please refer to the official Nagios documentation for probe development

Probes can be developed in any of these languages:

  • Python (2.4)
  • Perl (5.8) - in case of Perl usage of module Nagios::Plugin is highly recommended.
  • C
  • shell scripting (Bash, Bourne)

Some other Nagios conditions:

  • Each probe must provide the following arguments:
    -h help (--help)
    -t timeout (--timeout)

    The following arguments should be used if applicable:

    -H hostname (--hostname)
    -p port (--port)
    -u url (--url)
    -v verbose (--verbose)
    -w warning threshold (--warning)
    -c critical threshold (--critical)
  • Maximum output size for test/plugin output is 16KB. Above that limit the output will be truncated.


Please refer to the official EPEL documentation for packaging:

Some considerations about naming:

  • Each probe package should have a unique namespace. Currently there is no strict definition of the namespace and the existing packages loosely follow revers DNS scheme (e.g. org.sam, hr.srce).
  • Each probe package name should use "" where 'xxx' is the name of the service to test (e.g. nagios-plugins-emi.bdii). This makes the name consistent with other nagios plugins.
  • Each metric that the probe implements must have a unique name, we suggest to use the package namespace and a short description of the test (e.g. nagios-plugins-emi.bdii.freshness)

Some considerations about structure:

  • Probes should be stored in directory:
  • If probes creates temporary files, package should create directory:

    With ownership nagios:nagios and permissions 750.

  • If probes package contains configuration files, they should be stored in directory:

Some considerations about dependencies management:

  • Each probe is responsible for handling its dependencies.
  • The environment needed to execute each probe must be defined by the probe. This will replace the need to configure middleware user interface (UI) from the SAM framework side.
  • The libraries used by the current probes (python-gridmon, perl TOM::Nagios, perl GridMon::sgutils) will be provided by the SAM team and released either in EPEL or in the EMI external repository.

Integration and Testing

The integration and testing of probes foresees the following phases (for probes provided by EMI):

  1. Each PT develops and tests its own probes in their development environments.
  2. EMI builds a common meta-package including all available probes.
  3. EMI tests the execution of probes using a dedicated SAM-nagios instances (with the support of the SAM team).
  4. SAM validates and distributes a new SAM-Nagios release updating the dependency on EMI probes meta-package to the latest version.

For custom probes developed by third parties or regions:

  1. Add the mapping between service flavour and new test in your local POEM instance
  2. Create a JSON metric config file (in /etc/ncg-metric-config.d/something.conf; example
  3. Install/upload your probe to the SAM/Nagios box

Document generated by Confluence on Feb 27, 2014 10:19