This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

PyNagios is a simple Python library meant to make writing Nagios plugins much easier. Nagios plugins have quite a few guidelines to adhere to, and PyNagios provides helpers to make this easy.

Install

To install, simply use pip or easy_install:

pip install pynagios

Documentation

Documentation for the latest version can always be found at http://kiip.github.com/pynagios/latest.

Features

The core features supported by PyNagios:

  • Parsing command line arguments such that the standard expected arguments (such as -H, -w, -c) are accepted.
  • Returning proper POSIX exit code based on status.
  • Parsing Nagios range formats (such as “@10:20”, “~:50”, “10”, etc.)
  • Outputting status and message.
  • Outputting performance data.

Example

What all these features result in is a concise, simple, and guidelines-compliant Python-based Nagios plugin:

from pynagios import Plugin

class UserCheck(Plugin):
    """
    Nagios plugin to check how many users are logged into this
    machine.
    """

    def check(self):
        # Get the number of logged in users, for now we hardcode
        users = 27

        # Build a response and exit. This `response_for_value` automatically
        # creates a response with the proper status given the value and the
        # warning/critical ranges passed in via the command line.
        response = self.response_for_value(users, "%d users" % users)
        response.set_perf_data("users", users)
        response.set_perf_data("another metric", 27, "MB")
        return response

if __name__ == 'main':
    # Build the plugin instance and run it. This will also parse
    # command line arguments by default.
    UserCheck().check().exit()

While the above example subclasses Plugin, you’re of course welcome to simply call Plugin`s methods directly and build a “Response` yourself.

Release History

Release History

0.1.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pynagios-0.1.1.tar.gz (8.9 kB) Copy SHA256 Checksum SHA256 Source Aug 2, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting