zorkian / nagios-api

A REST-like, JSON interface to Nagios
BSD 3-Clause "New" or "Revised" License
586 stars 173 forks source link

New functionality and a couple of fixes #3

Closed bunjiboys closed 12 years ago

bunjiboys commented 12 years ago

The following new calls have been added:

acknowledge_problem: Acknowledge either a host or service problem remove_acknowledgement: Remove an existing acknowledgement from a host or service add_comment: Adds a comment to a host or service remove_comment: Removes a comment from a host or service

Fixes: Changed the shebang to use /usr/bin/env to make it more portable, instead of relying on python in /usr/bin Fixed the URL_REGEX to allow dashes in the objid matching, for hostnames with dashes in them. Added "ensure_ascii=False" to the json dumps comment, to allow for non ASCII characters. Changed the command generation in send_nagios_command to use unicode() instead of str() to allow for non-ASCII characters in the commands.