skip to navigation
skip to content

Not Logged In

nagiosplugin 1.0.0a2

Class library for writing Nagios (Icinga) plugins

Package Documentation

Latest Version: 1.2.1

The nagiosplugin library


nagiosplugin is a Python class library which helps writing Nagios (or Icinga) compatible plugins easily in Python. It cares for much of the boilerplate code and default logic commonly found in Nagios checks, including:

  • Nagios 3 Plugin API compliant parameters and output formatting
  • Full Nagios range syntax support
  • Automatic threshold checking
  • Multiple independend measures
  • Custom status line to communicate the main point quickly
  • Long output and performance data
  • Timeout handling
  • Persistent "cookies" to retain state information between check runs
  • Resume log file processing at the point where the last run left
  • No dependencies beyond the Python standard library.

nagiosplugin runs on POSIX and Windows systems. It requires Python 3, but Python 2.7 compatibility is planned.

Feedback and Suggestions

nagiosplugin is primarily written and maintained by Christian Kauhaus <>. Feel free to contact the author for bugs, suggestions and patches.

A public issue tracker can be found at There is also a forum available at


The nagiosplugin package is released the Zope Public License (ZPL), a BSD-style Open Source license.


To get started writing Nagios plugins, see the examples in the examples subdirectory.

More documentation on using this package can be found in the doc directory of the source distribution. There is also an online copy of the docs available.

Release History

1.0.0a2 (2012-10-26)

  • API docs for the most important classes (#7939).
  • Added two tutorials (#9425).
  • Fix packaging issues.

1.0.0a1 (2012-10-25)

  • Completely reworked API. The new API is not compatible with the old 0.4 API so you must update your plugins.
  • Python 3 support.
  • The Cookie class is now basically a persistent dict and accepts key/value pairs. Cookie are stored as JSON files by default so they can be inspected by the system administrator (#9400).
  • New LogTail class which provides convenient access to constantly growing log files which are eventually rotated.

0.4.5 (2012-06-18)

  • Windows port. nagiosplugin code now runs under pywin32 (#10899).
  • Include examples in egg release (#9901).

0.4.4 (2011-07-18)

Bugfix release to fix issues reported by users.

  • Improve Mac OS X compatibility (#8755).
  • Include examples in distribution (#8555).

0.4.3 (2010-12-17)

  • Change __str__ representation of large numbers to avoid scientific notation.

0.4.2 (2010-10-11)

  • Packaging issues.

0.4.1 (2010-09-21)

  • Fix distribution to install correctly.
  • Documentation: tutorial and topic guides.

0.4 (2010-08-17)

  • Initial public release.

Development setup

Invoke directly

The nagiosplugin package follows the usual Python development practices. A build can be created with:

python3.2 build

Be sure to run all tests:

python3.2 test

Using zc.buildout

This package supports installation in a virtualenv using zc.buildout.

First, create a virtualenv if not already present:

virtualenv -p python3.2 .

Then launch the usual buildout three-step:


Build the documentation (buildout should have been running before to install Sphinx etc.):

make -C doc html

Run the supplied examples with the local interpreter:

bin/py src/examples/

Release HOWTO

To make a release, we prefer zest.releaser. To make a release, follow the standard procedure, which usually boils down to:


nagiosplugin tried to obey the semantic version numbering specification published on SemVer but adapts it a little bit to be PEP 386 compliant.

File Type Py Version Uploaded on Size
nagiosplugin-1.0.0a2.tar.gz (md5) Source 2012-10-26 36KB
  • Downloads (All Versions):
  • 1034 downloads in the last day
  • 3693 downloads in the last week
  • 15536 downloads in the last month