A Brief Introduction of RT SCC 12/6/2018
Ticketing System In order to resolve a problem... – Who wants what? – Who's going to work on this? – When did they ask, when was it done? – How much time did it take (billing, hours)? – What's left to do? – Everything is summarized and presented in a simple and intuitive manner.
RT: Advantages • Open source and free • Heavily used and tested • Very active development • Quite flexibile • Web interface and via CLI
RT: Disadvantages • A bit tricky to install the first time... • It's powerful, so you'll need to spend some time learning how it works.
Ways RT Gets Used • Helpdesk • Network operations • Bug tracking • Customer service • Project management
Essential Functionality • Several interfaces – Web, CLI, e-mail, etc. • Multiuser – At different levels: admin, general user, gues • Authentication and authorization • Event history • Handles dependencies • Notifications
User Creation • Create a userid for each member. • Assign privileges to each user.
Create Groups • Create groups of users: –Administering privileges by group is more efficient that doing so for each user.
Create Queues • Create queues for problem categories – For example • security • accounts • connectivity – Assign users to each queue • Different between AdminCC and CC
Scrips (actions) • For each queue create automatic actions – There is a group of scrips that apply to all queues. • Possible to customize per queue or globally • “scrips” are “snippets of Perl code”
Extensions • You can extend the functionality of RT. For example: – Send daily emails to remind users of tickets that have not been “taken” – Send daily emails to each user reminding them of their pending tickets. – Periodically increment ticket priority – You can execute commands via email • http://wiki.bestpractical.com/index.cgi?Extensions
The RT CLI • Simple perl script • Usually lives in /usr/bin • Can run locally or remotely • Uses HTTP (or HTTPS) • Uses TicketSQL for Searching • Talks to RT's "REST" interface • Scriptable
CLI $ export RTUSER=root $ export RTSERVER=http://124.16.151.186/rt
CLI $rt help ... - rt help usage (syntax information) - rt help objects (how to specify objects) - rt help actions (a list of possible actions) - rt help types (a list of object types) - rt help config (configuration details) - rt help examples (a few useful examples) - rt help topics (a list of help topics) $rt help actions ... - list (list objects matching some condition) - show (display object details) - edit (edit object details) - create (create a new object)
CLI examples rt list -i "status='new'" rt show -t ticket 42 -f id,subject,status rt create -t ticket rt show ticket/3 rt show ticket/1,5-8,42 -f id,queue,subject,status,priority rt show ticket/9/history rt show ticket/9/attachments rt show ticket/9/attachments/11/content rt correspond -m "The vendor is supplying a patch" ticket/15 rt comment -m "This is what I see" -a screenshot.png ticket/15 rt edit ticket/47
Scripting RT Shell Functions rtspam( ) { rt edit ticket/$1 set queue=spam status=deleted } rtresolve( ) { rt edit ticket/$1 set status=resolved rtshow( ) { rt show ticket/$1 $ rtresolve 12345 Ticket 12345 Resolved.
Scripting RT Shell Aliases alias rtspam='rt edit ticket/$1 set queue=spam status=deleted' alias rttop='rt ls -i "priority > 70 and status != resolved" | rt show - -f id,subject'
Scripting RT MIME use Email::Simple; my $tno = $ARGV[0]; my $ticket = `rt show ticket/$tno`; my $tobj = Email::Simple->new($ticket); print "Ticket $tno was requested by ", $tobj->header("requestors"), " on ", $tobj->header("created"), ".\n";
References • Best Practical Web site http://bestpractical.com/rt http://wiki.bestpractical.com/view/HomePage