[rt-users] Creating a Link to a Ticket via a Perl Script
Rappaport, Evan
evan at mtvn.com
Wed Mar 15 08:47:20 EST 2006
There is an example of a command line call to that script in the usage print statement. I put the script on a UNIX server and I use the script in multiple ways.
1) Running it from cron for creating periodic tickets for various departments. Things like weekly reminders to check overnight backups or official timestamping of work shifts. Something like, shift turnovers for operations workers to signal that they are now taking over operations.
Example: of a daily ticket created from cron.
./rt_custom.pl -queue="Storage" -subject="Check overnight backups" -owner='nobody' -requestor='bob\@bob.com' -priority=30 -body="Check status of overnight backups and rotate backup tapes as necessasary." -AdminCc="bobsboss\@bob.com" -work_type="Task" -department="Infrastructure" -requestor="cronjob\@rt.bob.com"
2) Automatically generating tickets from server alarms. Basically using Nagios to generate tickets automatically so it saves people who are responding to alarms from opening tickets for problems. The ticket is generated when someone acknowleges the alarm and adds their comment. The ticket would go into an alarm queue and be owned by the person who acknowleged the alarm so they can come back with an update and close the ticket later.
Nagios might do a call to the script that looks like this.
./rt_custom.pl -queue="Alarms" -subject="Diskspace at %5 on live-production-server-1" -owner='bob' -body="Going to delete old log files" -priority=99 -AdminCc="bobsboss\@bob.com" -requestor="bob\@bob.com"
3) As part of a CGI to automatically generate tickets from custom web pages. It might be used as the stand alone script though escape to the shell or I might just use the Perl code directly in the CGI. Basically this would be web pages to create custom tickets through HTML forms for frequently requested things like DNS requests.
Example
./rt_custom.pl -queue="Networking" -subject="DNS Request" -body="Please set up a new DNS entry for welovebob.bob.com to point to 208.182.91.44." -requestor="sally\@bob.com" -department="Ad Sales"
These are the basic things I use it for but since it's a fairly generic ticket generator you can do whatever you want. For example, you can set up something like a script that calls this and creates a parent ticket which has three children each of which have two dependent tickets of their own etc.
I use either "site" or "department" as the business unit making the request for work and use the queue as the department which is getting the request to perform work. People from each department would be watching their respective queues and dealing with requests from there or reassigning requests to other queues.
-----Original Message-----
From: Duncan Shannon [mailto:dshannon at techfluent.com]
Sent: Tuesday, March 14, 2006 1:22 PM
To: Rappaport, Evan; Nick Metrowsky; rt-users at lists.bestpractical.com
Subject: RE: [rt-users] Creating a Link to a Ticket via a Perl Script
>________________________________________
>From: rt-users-bounces at lists.bestpractical.com
>[mailto:rt-users->bounces at lists.bestpractical.com] On Behalf Of
>Rappaport, Evan
>Sent: Tuesday, March 14, 2006 11:00 AM
>To: Nick Metrowsky; rt-users at lists.bestpractical.com
>Subject: RE: [rt-users] Creating a Link to a Ticket via a Perl Script>
>
>This is what I use. It does everything, creates tickets, does parent-child >relationships, and fills in some custom fields. You'd have to change the >custom fields and library locations to suit your installation (or >just don't use those options). I find this easier to use than the rt CLI >which has limited options.
Hi Evan-
Can you share some examples of how you use this script?
duncan
More information about the rt-users
mailing list