[rt-users] rt2stats - patch

Darren Nickerson darren at dazza.org
Thu Aug 8 22:40:48 EDT 2002


Harald,

Any chance you can coordinate with Jesse to get this stuff put into contrib/ now that you're the maintainer?

Increased exposure will mean increased feedback, one would hope ;-)

-Darren

  ----- Original Message ----- 
  From: Harald Wagener 
  To: 'rt-users at lists.fsck.com' 
  Sent: Thursday, August 08, 2002 12:59 PM
  Subject: Re: [rt-users] rt2stats - patch


  Simon Cozens wrote:
   > Hall, Christian N:
   >
   >> I am looking for the rt2stats package. If anyone has a link or of a
   >>known site that would be great.
   >
   >
   > http://users.ox.ac.uk/~simon/stats.tar.gz
   >
   > No instructions, no support, have fun!
   >

  Hello,
  attached You will find a patch that should make the Statistics package a bit
  more generic . CallsMultiQueue needs something better than
  @queues => qw(general) (the right hand side should be an array of all active
  queues fo the current user - anybody have the code for that at hand?); and
  Resolution.html should have something better than $queue => "general" as well.

  My main additions are links back to RT or the Statistics start page on all
  the sub pages.

  Mind that some of the graphs are not created on my system. I get the
  following error:

  [Thu Aug  8 11:42:02 2002] [error] Apache::GD::Graph: GET
  //chart?type=lines&x_labels=[Sun%204,Mon%205,Tue%206,Wed%207,Thu%208]&y_number_format=&data1=[,62299,31080,12349] 

  HTTP/1.0: Size of x_labels not the same as length of data.

  Regards,
  Harald

  PS: quick instructions:

  - get Apache::GD::Graph installed (via CPAN). This might require installing
      gd and gd-devel (in redhat lingo), as well as some graphics libraries
      (libfreetype, libpng, libjpeg, libXpm (not needed)) and a fistful of perl
      modules (GD, GD::Graph, GT::Text::Util, Font::TTF, possibly others).

  - configure Your rt location in httpd.conf similar to this:

  <VirtualHost rt.yournamehere.com>
        DocumentRoot /path/to/rt2/WebRT/html
        ServerName rt.yournamehere.com
        ErrorLog logs/error_log_rt
        CustomLog logs/access_log_rt combined
        PerlModule Apache::DBI
        PerlFreshRestart On
        PerlRequire /path/to/rt2/bin/webmux.pl
            <Location />
                SetHandler perl-script
                PerlHandler RT::Mason
            </Location>
            <Location /chart>
            SetHandler perl-script
            PerlHandler +Apache::GD::Graph
            </Location>
  </Virtualhost>

  - put the Statistics Directory into /path/to/rt2/WebRT/html

  - restart Your httpd (ideally stopping and starting)

  - go to $RT::WebUrl/Statistics and behold the wonders of the Statistics
      package

  - If You're in a good mood, fix some errors with the package and post Your
      diff (- :


  -- 
  Harald Wagener*An der Alster 42*20099 Hamburg*http://www.fcb-wilkens.com




------------------------------------------------------------------------------


  diff -r -U2 Statistics.orig/CallsMultiqueue.html Statistics/CallsMultiqueue.html --- Statistics.orig/CallsMultiqueue.html Tue Feb 19 06:56:11 2002 +++ Statistics/CallsMultiqueue.html Thu Aug 8 11:47:18 2002 @@ -2,4 +2,8 @@ 
  Number of Tickets Per Queue Per Day 
  +>Back to RT +  Statistics/ >Back to Statistics + 
  + @@ -89,5 +93,5 @@ 
  -% my $url = 'https://rt.oucs.ox.ac.uk/chart?type=lines&x_labels=['; +% my $url = $RT::WebURL.'/chart?type=lines&x_labels=['; % $url .= join ",", @{ shift @data }; % $url .= ']&'; @@ -102,5 +106,5 @@ $status => "resolved" $max => 5 - at queues => qw(advisory maillist registration micros) + at queues => qw(general) $weekends => 0 diff -r -U2 Statistics.orig/CallsQueueDay.html Statistics/CallsQueueDay.html --- Statistics.orig/CallsQueueDay.html Tue Feb 19 06:56:11 2002 +++ Statistics/CallsQueueDay.html Thu Aug 8 11:28:48 2002 @@ -2,4 +2,7 @@ 
  Number of Tickets Handled in Per Day 
  +>Back to RT +  Statistics/ >Back to Statistics + 
  @@ -60,5 +63,5 @@ 
  -% my $url = $RT::WebURL.'/chart?type=lines&x_labels=['; +% my $url = $RT::WebURL.'chart?type=lines&x_labels=['; % $url .= join ",", @{ shift @data }; % $url .= ']&'; @@ -74,5 +77,5 @@ Per Day 
  +>Back to RT +  Statistics/ >Back to Statistics + 
  diff -r -U2 Statistics.orig/Resolution.html Statistics/Resolution.html --- Statistics.orig/Resolution.html Tue Feb 19 06:56:11 2002 +++ Statistics/Resolution.html Thu Aug 8 11:47:45 2002 @@ -2,4 +2,7 @@ 
  Average Time-to-resolution for Tickets in 
  +>Back to RT +  Statistics/ >Back to Statistics + 
  @@ -73,5 +76,5 @@ >Back to RT + Statistics/ >Back to Statistics + + 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20020808/60a11b2f/attachment.htm>


More information about the rt-users mailing list