This is a custom HTTP JSON API for RT. The service exposes a JSON API and uses the "rt" command line tool to control RT.
Generally it might be a good idea to use rvm. However what you actually need is a working JRuby.
$ gem install bundler
$ bundle install
$ rake jar
On the RequestTracker server you simply run the jar file with java. Typically from an upstart job. An example upstart config is in
On the icinga / nagios side you hook into the global event handlers. Proper scripts are in the
RT Command Line Tool
Some usage hints can be found in the RT wiki.
Please see the following examples for the
rt commands we need for the API.
rt list -s "Subject LIKE 'Test' AND Status != 'resolved'" -q icinga => "18425: Test 1"
Search for unowned tickets
rt list -s "Subject LIKE 'Test' AND Status != 'resolved' AND Owner = 'Nobody'" -q icinga => "18425: Test 1"
rt create -t ticket set subject="Test cli" queue="icinga" text="Test content" => "# Ticket 18427 created."
rt comment -m "This is a comment on 18427" 18427 => "# Message recorded"
Retrieve owner of a ticket
rt show ticket/18427 -f owner,id => "# Owner: Nobody # id: ticket/18427"
rt edit 18427 set status=resolved => "# Ticket 18427 updated."
Daniel Rauer, email@example.com
Bernd Ahlers, firstname.lastname@example.org