Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A simple Nagios alternative made to look like unit tests.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 man
Octocat-spinner-32 pagerunit
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.md
Octocat-spinner-32 example.py
Octocat-spinner-32 pydir.py
Octocat-spinner-32 setup.py.m4
Octocat-spinner-32 tests.py
README.md

PagerUnit

A simple Nagios alternative made to look like unit tests.

This is probably a bad idea but I wanted to get something on paper (as it were) so I could get back to real work.

Usage

Configure PagerUnit so it can send email in /etc/pagerunit.cfg or ~/.pagerunit.cfg:

[mail]
address = recipient@example.com

[smtp]
password = password
port = 587
server = smtp.gmail.com
username = sender@gmail.com

Define some tests a la Nose:

def foo():
    """
    Docstring for foo.
    """
    assert False, 'Assertion for foo.'

Run them every 10 seconds:

pagerunit --loop example.py

Installation

Prerequisites:

  • Python >= 2.6

From source

git clone git://github.com/rcrowley/pagerunit.git
cd pagerunit && make && sudo make install

From DevStructure's Debian archive

echo "deb http://packages.devstructure.com release main" | sudo tee /etc/apt/sources.list.d/devstructure.list
sudo wget -O /etc/apt/trusted.gpg.d/devstructure.gpg http://packages.devstructure.com/keyring.gpg
sudo apt-get update
sudo apt-get -y install pagerunit

Replace release with "lenny", "squeeze", "lucid", "maverick", or "natty" as your situation requires.

From PyPI

pip install pagerunit
Something went wrong with that request. Please try again.