Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

A command line tool for pushing Nagios host and service notifications to a HipChat room.

Project description

#HipSaint

Push your nagios notifications to HipChat using a simple command line tool.

[![Build Status](https://travis-ci.org/hannseman/hipsaint.png?branch=master)](https://travis-ci.org/hannseman/hipsaint)
[![Downloads](https://pypip.in/d/hipsaint/badge.png)](https://crate.io/package/hipsaint)

Implements [HipChat message API](https://www.hipchat.com/docs/api/method/rooms/message).

Inspired by https://gist.github.com/2418848

##Install

Through pip:

~~~ sh
$ pip install hipsaint
~~~

Or clone and simply run:
~~~ sh
$ python setup.py install
~~~

##Usage

Assuming you use Nagios 3 add the following sections to commands.cfg with `<TOKEN>` and `<ROOM_ID>` specified and macros delimited by `|`:

define command {
command_name notify-host-by-hipchat
command_line hipsaint --token=<TOKEN> --room=<ROOM_ID> --type=host --inputs="$HOSTNAME$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$HOSTSTATE$|$HOSTOUTPUT$" -n
}
define command {
command_name notify-service-by-hipchat
command_line hipsaint --token=<TOKEN> --room=<ROOM_ID> --type=service --inputs="$SERVICEDESC$|$HOSTALIAS$|$LONGDATETIME$|$NOTIFICATIONTYPE$|$HOSTADDRESS$|$SERVICESTATE$|$SERVICEOUTPUT$" -n
}

To send less verbose messages to hipchat set the ``--type`` flag to either ``short-host`` or ``short-service``.

Additional commands is available through:
~~~ sh
$ hipsaint --help
~~~

Edit the Nagios contacts.cfg file by adding or editing an existing user and adding the notification commands created above:

define contact {
....
.....
service_notification_commands notify-service-by-hipchat
host_notification_commands notify-host-by-hipchat
email /dev/null
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
hipsaint-0.4.6-py2.py3-none-any.whl (7.8 kB) Copy SHA256 hash SHA256 Wheel 2.7
hipsaint-0.4.6.tar.gz (5.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page