Skip to content
forked from hannseman/hipsaint

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

License

Notifications You must be signed in to change notification settings

thekev/hipsaint

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#HipSaint

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

Build Status

Implements HipChat message API.

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

##Install

Through pip:

$ pip install hipsaint

Or clone and simply run:

$ python setup.py install

##Usage

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

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
}

Additional commands is available through:

$ 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
}

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%