Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install nagiosplugin

How to install nagiosplugin

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install nagiosplugin
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.4.5
1.1Never BuiltWhy not?
0.4.5 Available View build log
0.4.4 Available View build log
0.4.3 Available View build log
0.4.2 Available View build log
0.4.1 Failed View build log
0.4 Failed View build log
Windows (64-bit)
0.4.5
1.1Never BuiltWhy not?
0.4.5 Available View build log
0.4.4 Available View build log
0.4.3 Available View build log
0.4.2 Available View build log
0.4.1 Failed View build log
0.4 Failed View build log
Mac OS X (10.5+)
0.4.5
1.1Never BuiltWhy not?
0.4.5 Available View build log
0.4.4 Available View build log
0.4.3 Available View build log
0.4.2 Available View build log
0.4.1 Failed View build log
0.4 Failed View build log
1.0.0b1
1.1Never BuiltWhy not?
1.0.0b1 Available View build log
1.0.0a2 Failed View build log
Linux (32-bit)
1.1 Available View build log
1.0.0b1 Available View build log
1.0.0a2 Available View build log
0.4.5 Available View build log
0.4.4 Available View build log
0.4.3 Available View build log
0.4.2 Available View build log
0.4.1 Failed View build log
0.4 Failed View build log
1.0.0b1
1.1Never BuiltWhy not?
1.0.0b1 Available View build log
1.0.0a2 Failed View build log
Linux (64-bit)
1.1 Available View build log
1.0.0b1 Available View build log
1.0.0a2 Available View build log
0.4.5 Available View build log
0.4.4 Available View build log
0.4.3 Available View build log
0.4.2 Available View build log
0.4.1 Failed View build log
0.4 Failed View build log
1.0.0b1
1.1Never BuiltWhy not?
1.0.0b1 Available View build log
1.0.0a2 Failed View build log
1.1 Available View build log
 
License
ZPL-2.1
Lastest release
version 1.1 on Jun 24th, 2013

The nagiosplugin library

About

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 (except for Python 2.6).

nagiosplugin runs on POSIX and Windows systems. It is compatible with Python 3.3, Python 3.2, Python 2.7, and Python 2.6.

Feedback and Suggestions

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

A public issue tracker can be found at http://projects.gocept.com/projects/nagiosplugin/issues. There is also a forum available at https://projects.gocept.com/projects/nagiosplugin/boards.

License

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

Documentation

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.

Development

Getting the source

The source can be obtained via mercurial from https://bitbucket.org/gocept/nagiosplugin:

hg clone https://bitbucket.org/gocept/nagiosplugin

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

Creating a build with zc.buildout

First, create a virtualenv if not already present:

virtualenv -p python3.2 .

If you want to use Python 2.7, specify this Python version while creating the virtualenv:

virtualenv -p python2.7 .

Then launch the usual buildout steps:

bin/python3.2 bootstrap.py -t
bin/buildout

If you experience version conflicts with distutils, be sure to use a current virtualenv version. The library developers use virtualenv 1.8.2.

Running tests

When the buildout succeeds, run the unit test by invoking:

bin/test

nagiosplugin also includes support for coverage reports. It aims at 100% test coverage where possible. The preferred way to get a coverate report is to use

bin/createcoverage

to determine test coverage and open the report in a web browser. Alternatively, run

bin/coverage run bin/test

to get a purely text-based coverage report.

You may run the supplied examples with the local interpreter:

bin/py src/nagiosplugin/examples/check_load.py
https://builds.gocept.com/job/nagiosplugin/badge/icon
Documentation

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

make -C doc html
How to release

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

fullrelease

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

Contributors

nagiosplugin has become what it is now with the help of many contributors from the community. We want to thank everyone who has invested time and energy to make nagiosplugin better:

Release History

1.1 (2013-06-19)
  • Nothing changed.
1.1b1 (2013-05-28)
  • Made compatible with Python 2.6 (#12297).
  • Tutorial #3: check_users (#11539).
  • Minor documentation improvements.
1.0.0 (2013-02-05)
  • LogTail returns lines as byte strings in Python 3 to avoid codec issues (#11564).
  • LogTail gives a line-based iterator instead of a file object (#11564).
  • Basic API docs for the most important classes (#11612).
  • Made compatible with Python 2.7 (#11533).
  • Made compatible with Python 3.3.
1.0.0b1 (2012-10-29)
  • Improve error reporting for missing contexts.
  • Exit with code 3 if no metrics have been generated.
  • Improve default Summary.verbose() to list all threshold violations.
  • Move main source repository to https://bitbucket.org/gocept/nagiosplugin/ (#11561).
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.

Subscribe to package updates

Last updated Jun 24th, 2013

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.