RT 2 stats help (fwd)

forwarded per request.---------- Forwarded message ----------
Date: Tue, 03 Feb 2004 11:11:36 +1100
From: Teo de Hesselle tdehesse@uts.edu.au
To: David M Dennis dmd@speakeasy.org
Cc: rt-users@lists.bestpractical.com
Subject: Re: RT 2 stats help

On Tue, 2004-02-03 at 10:53, David M Dennis wrote:

Dear Teo,

I have spent the better part of today looking through archives
for RT 2 statistics. Apparently all the links are gone.

Would like to upgrade to RT3, but thats not an option currently.
Was wondering if you could provide a link to the stats perl source
referenced in

http://peabody.itd.uts.edu.au/rt2stats ?

Eww… That code really is horrible. It simply doesn’t scale at all.
Probably would be workable if the output was pre-generated though. It
was pretty, though.

If you really want it, it’s at http://lisa.itd.uts.edu.au/rt-stats/

Here’s what we replaced it with - this is a small shell script which
works for us against RT 2.0.8. The output is suitable for piping to your
system’s sendmail program. You will need to know what your Queue’s ID
number is in the database. Other than that, it works quite nicely.

#!/bin/bash

Hi David,

Thanks for posting this;

David M Dennis wrote:

From: Teo de Hesselle tdehesse@uts.edu.au

If you really want it, it’s at http://lisa.itd.uts.edu.au/rt-stats/

Here’s what we replaced it with - this is a small shell script which

I’ve taken the shell script and converted it into a perl script. I
wanted a little more than the script provided and the date function used
wasn’t the same on FreeBSD as on whatever platform the script was written.

WIth the perl version you can specify a specific queue, or “All” which
will do all queues. You can also specify a date range so you can get
statistics for any period. I didn’t have to modify the select queries
for our system so it should run on both RT2 and RT3 (We run 3.0.8 here).

Usage: rt3-stats |All [|] []
is the number of days ago to report from.
and are in the format yyyy-mm-dd.

It people are interested I can post it onto the list (It’s not much
larger than the original script), or make it available somewhere. It
requires DBI and DBD::mysql.

I also wrote a variant that reports on total slips created per queue for
a specified time period if people are interested.

Carl.

Sounds like a great thing for http://wiki.bestpractical.com ExternalUtils

MattFrom: rt-users-bounces@lists.bestpractical.com on behalf of Carl Makin
Sent: Wed 2/4/2004 5:12 PM
To: David M Dennis
Cc: tdehesse@uts.edu.au; rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Re: RT 2 stats help (fwd)

Hi David,

Thanks for posting this;

David M Dennis wrote:

>From: Teo de Hesselle <tdehesse@uts.edu.au>
>
>If you really want it, it's at http://lisa.itd.uts.edu.au/rt-stats/
>
>
>Here's what we replaced it with - this is a small shell script which
> 
>
I've taken the shell script and converted it into a perl script.  I
wanted a little more than the script provided and the date function used
wasn't the same on FreeBSD as on whatever platform the script was written.

WIth the perl version you can specify a specific queue, or "All" which
will do all queues.  You can also specify a date range so you can get
statistics for any period.  I didn't have to modify the select queries
for our system so it should run on both RT2 and RT3 (We run 3.0.8 here).

 Usage: rt3-stats <queue name>|All [<days>|<date from>] [<date to>]
        <days> is the number of days ago to report from.
        <date from> and <date to> are in the format yyyy-mm-dd.

It people are interested I can post it onto the list (It's not much
larger than the original script), or make it available somewhere.  It
requires DBI and DBD::mysql.

I also wrote a variant that reports on total slips created per queue for
a specified time period if people are interested.



Carl.

rt-users mailing list
rt-users@lists.bestpractical.com
http://lists.bestpractical.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm