RT Statistics Package

Rich West wrote:

Just as an FYI, the call to your site is located on line 91 of
CallsMultiqueue.html. :slight_smile:

I hate to be another person emailing you about this, but hopefully this
is an easy one that you have already hashed out. The installation was
rather easy, except I do not get the graphs at all (Apache::GD::Graph
and others are installed).

I tried, as some have suggested, linking
/usr/lib/perl5/site_perl/<perl_version>/Apache/GD/Graph.pm as
/WebRT/html/chart, and I get the following error:

Error during compilation of /usr/rt2/WebRT/html//chart:
unknown section <%20> (line 87)

This was my idea, and it is wrong, as has been pointed out higher in the
thread. See my posting in the ‘installation woes’ thread to have a look
at a working configuration.

As well, some of the queue names are hard coded into the Statistics
package. It’s a snap to insert Your own queue names, and it should be
easy to come up with a generic solution enumerating existing queues.

H.

Harald Wagener | Systemadministrator
FCB/Wilkens GmbH | Tel.:+49-40-2881-1252
An der Alster 42 | Fax.:+49-40-2881-1263
20099 Hamburg | http://www.fcb-wilkens.com

Attached is a simple statistics package for RT. I’m planning on releasing
further versions with more complex data available in the future, but I
think this is cool enough to release for now. Simply drop it into your
RT HTML tree, and go to http://rt/Statistics/

Very, very nice. A bit of work to install the Apache::GD::Graph bit as I
had to snag a half-dozen other modules to satisfy the dependencies, but
after installing the modules (and copying the config from perldoc Apache::GD::Graph into my server’s config), it’s working quite well.
Oh, and I changed line 91 of CallsMultiqueue.html to:

% my $url = “$RT::WebPath/chart?type=lines&x_labels=[”;

…which should be suitable for all.

Thanks for sharing your excellent work!

–j, looking forward to frobbing this code endlessly.
Jim Meyer, Geek At Large purp@wildbrain.com

I concur, very very nice!

One slight clarification to Jim’s comment on the webserver configuration:

If you really do use the exact configuration statements in the perldoc for
Apache::GD::Graph, you will need to edit each .html file in the Statistics
directory so that they define their urls in the pattern

$my_url = ‘/chart/blahblah’

instead of

$my_url = $RT::WebURL.’/chart/blahblah’

Which will allow other stuff on your server to use the charting functions
without having “rt” in the url.

The other option, of course, is to frob slightly the webserver configuration
so that it uses “/rt/chart” as the location instead of just “/chart” as
listed in the perldoc.

Hmmm, one thing I noticed: the “time to resolution” page isn’t drawing a
graph. I checked the underlying html and saw a url for a graph, but it was
incomplete:

(Yes, it really says ampersand-amp-semicolon.) Has anyone seen anything
like this? I looked at the code that produces this, but all I could do was
scratch my head:

% my $url = ‘/chart?type=lines&x_labels=[’;
% $url .= join “,”, @{ shift @data };
% $url .= ‘]&’;
% $url .= ‘y_number_format=&’;
% for (0…$#data) {
% $url .= “data”.(1+$).“=[”.(join “,”, @{$data[$]}).“]&”;
% }
% chop $url;
From: Beachey, Kendric [mailto:Kendric.Beachey@garmin.com]
Sent: Thursday, February 21, 2002 11:26 AM
To: Request Tracker Users Mailing List
Subject: RE: [rt-users] RT Statistics Package

I concur, very very nice!
One slight clarification to Jim’s comment on the webserver configuration:
If you really do use the exact configuration statements in the perldoc for
Apache::GD::Graph, you will need to edit each .html file in the Statistics
directory so that they define their urls in the pattern
$my_url = ‘/chart/blahblah’
instead of
$my_url = $RT::WebURL.‘/chart/blahblah’
Which will allow other stuff on your server to use the charting functions
without having “rt” in the url.
The other option, of course, is to frob slightly the webserver configuration
so that it uses “/rt/chart” as the location instead of just “/chart” as
listed in the perldoc.

-----Original Message-----
From: Jim Meyer [mailto:purp@wildbrain.com]
Sent: Thursday, February 21, 2002 10:24 AM
To: Simon Cozens
Cc: Request Tracker Users Mailing List; jesse@bestpractical.com
Subject: Re: [rt-users] RT Statistics Package

Attached is a simple statistics package for RT. I’m
planning on releasing
further versions with more complex data available in the
future, but I
think this is cool enough to release for now. Simply drop
it into your
RT HTML tree, and go to http://rt/Statistics/

Very, very nice. A bit of work to install the
Apache::GD::Graph bit as I
had to snag a half-dozen other modules to satisfy the
dependencies, but
after installing the modules (and copying the config from perldoc Apache::GD::Graph into my server’s config), it’s working quite well.
Oh, and I changed line 91 of CallsMultiqueue.html to:

% my $url = “$RT::WebPath/chart?type=lines&x_labels=[”;

…which should be suitable for all.

Thanks for sharing your excellent work!

–j, looking forward to frobbing this code endlessly.

Jim Meyer, Geek At Large
purp@wildbrain.com


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

Interesting. My copy of the package works fine, but the code is slightly
different:

% my $url = $RT::WebURL.‘/chart?type=points&x_labels=[’;
% my $i;
% $url .= join “,”, (map {(int($/2) == $/2 && (++$i)%2) ? $/2 : “”} grep
{$counts[$
]} 0…($#counts-1)), “longer”;
% $url .= ‘]&’;
% $url .= “marker_size=1&”;
% $url .= “data1=[”.(join “,”, map { $_ || () } @counts).“]&”;
% chop $url;
From: rt-users-admin@lists.fsck.com
[mailto:rt-users-admin@lists.fsck.com]On Behalf Of Beachey, Kendric
Sent: Thursday, February 21, 2002 12:23 PM
To: Request Tracker Users Mailing List
Subject: RE: [rt-users] RT Statistics Package

Hmmm, one thing I noticed: the “time to resolution” page isn’t drawing a
graph. I checked the underlying html and saw a url for a graph, but it was
incomplete:

(Yes, it really says ampersand-amp-semicolon.) Has anyone seen anything
like this? I looked at the code that produces this, but all I could do was
scratch my head:

% my $url = ‘/chart?type=lines&x_labels=[’;
% $url .= join “,”, @{ shift @data };
% $url .= ‘]&’;
% $url .= ‘y_number_format=&’;
% for (0…$#data) {
% $url .= “data”.(1+$).“=[”.(join “,”, @{$data[$]}).“]&”;
% }
% chop $url;

From: Beachey, Kendric [mailto:Kendric.Beachey@garmin.com]
Sent: Thursday, February 21, 2002 11:26 AM
To: Request Tracker Users Mailing List
Subject: RE: [rt-users] RT Statistics Package

I concur, very very nice!
One slight clarification to Jim’s comment on the webserver configuration:
If you really do use the exact configuration statements in the perldoc for
Apache::GD::Graph, you will need to edit each .html file in the Statistics
directory so that they define their urls in the pattern
$my_url = ‘/chart/blahblah’
instead of
$my_url = $RT::WebURL.‘/chart/blahblah’
Which will allow other stuff on your server to use the charting functions
without having “rt” in the url.
The other option, of course, is to frob slightly the webserver configuration
so that it uses “/rt/chart” as the location instead of just “/chart” as
listed in the perldoc.

-----Original Message-----
From: Jim Meyer [mailto:purp@wildbrain.com]
Sent: Thursday, February 21, 2002 10:24 AM
To: Simon Cozens
Cc: Request Tracker Users Mailing List; jesse@bestpractical.com
Subject: Re: [rt-users] RT Statistics Package

Attached is a simple statistics package for RT. I’m
planning on releasing
further versions with more complex data available in the
future, but I
think this is cool enough to release for now. Simply drop
it into your
RT HTML tree, and go to http://rt/Statistics/

Very, very nice. A bit of work to install the
Apache::GD::Graph bit as I
had to snag a half-dozen other modules to satisfy the
dependencies, but
after installing the modules (and copying the config from perldoc Apache::GD::Graph into my server’s config), it’s working quite well.
Oh, and I changed line 91 of CallsMultiqueue.html to:

% my $url = “$RT::WebPath/chart?type=lines&x_labels=[”;

…which should be suitable for all.

Thanks for sharing your excellent work!

–j, looking forward to frobbing this code endlessly.

Jim Meyer, Geek At Large
purp@wildbrain.com


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

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

Beachey, Kendric:

Hmmm, one thing I noticed: the “time to resolution” page isn’t drawing a
graph. I checked the underlying html and saw a url for a graph, but it was
incomplete:

turns off HTML escaping.

I decided to spread the bad mood: Dress To Depress.
- Red Drag Diva

Ah, sorry, I should have been more specific. This is in Resolution.html,
aka the “Average Time To Resolution” report. The snippet you posted is from
TimeToResolve.html, aka the “Time To Resolution” report.

From: Simon Cozens [mailto:rt@netthink.co.uk]

Beachey, Kendric:

Hmmm, one thing I noticed: the “time to resolution” page
isn’t drawing a
graph. I checked the underlying html and saw a url for a
graph, but it was
incomplete:

turns off HTML escaping.

Thanks for the tip, but the stuff in $url is still missing about half the
information it should include.

Quoting Simon Woodward sw-lists@onyx.net [19 Feb-02 10:31]:

Same here. I thought that was the first thing I tried, but apparently
not. The graphs look nice! :slight_smile:

I wanna see, I wanna see :wink: … (still not working)

<VirtualHost ###.###.###.###>
ServerAdmin webmaster@onyx.net
DocumentRoot /usr/local/rt2/WebRT/html
ServerName ###.###.###
PerlModule Apache::DBI
PerlRequire /usr/local/rt2/bin/webmux.pl
SetHandler perl-script
<Directory /usr/local/rt2/stats>
SetHandler cgi-script
DirectoryIndex index.cgi

<Location /chart>
SetHandler perl-script
PerlHandler +Apache::GD::Graph

PerlHandler RT::Mason
Options ExecCGI FollowSymLinks
ErrorLog /usr/local/apache/logs/ticket.error.log
CustomLog /usr/local/apache/logs/ticket.access.log common

[Tue Feb 19 15:10:12 2002] [error] Undefined subroutine
&Apache::GD::Graph::handler called.

:frowning:

Tips/thoughts/comments/suggestions/ideas ?

Be sure you add:

PerlModule Apache::GD::Graph

and stop/start your server.

(darren)

One man’s “magic” is another man’s engineering.
“Supernatural” is a null word.
– Robert Heinlein

Jim Meyer:

Thanks for sharing your excellent work!
–j, looking forward to frobbing this code endlessly.

Please feel free to send me frobs. I won’t have time to work any more
queries for a while, but I’d like to maintain this.

“A word to the wise: a credentials dicksize war is usually a bad idea on the
net.”
(David Parsons in c.o.l.development.system, about coding in C.)

I should probably have clarified… When I said “The installation was
rather easy”, I meant the installation of The Statistics package and
related modules. I’ve had RT up for years… :slight_smile:

Also, I realized that the Statistics package IS working properly as it
generates the appropriate HTML tables, but I do not get any graphical
charts.

I am wondering if someone would have the time to jot down an “idiots
guide to installing the Statistics package” in which they were able to
get the graphics to work out properly. This way most of us could
probably find that one little step that they missed… :slight_smile:

Actually, as I look at it, there seem to be some discrepancies in the
data… I mean, on the 5 day chart, it shows all zeros, but when I Hit
the “Go” button at the bottom, the page updates and the correct
information is displayed in the table… Hrmm… Not sure if this is
fastcgi related or not…

Oh, and I, too, am seeing the URL references to the chart as:

https://mysite.com/rt2//chart?type=lines&amp;x_labels=[Thu%2021,Fri%2022,Mon%2025,Tue%2026,Wed%2027]&amp;data1=[0,0,0,0,0]&amp;data2=[0,0,0,0,0]&amp;data3=[0,0,0,0,0]

(where the rt installation is at /rt2 of the website)

Thanks!
-Rich

Rich West wrote:

Hrmm… a thought just hit me. I’m running with mod_fastcgi… that
might prevent the graphics from being displayed.

But, still, I would be curious to know if the steps I took should have
been sufficient, and if the the error I listed indicated something
other than the limitation due to the mod_fastcgi install…

Thanks!
-Rich

Rich West wrote:

Just as an FYI, the call to your site is located on line 91 of
CallsMultiqueue.html. :slight_smile:

I hate to be another person emailing you about this, but hopefully
this is an easy one that you have already hashed out. The
installation was rather easy, except I do not get the graphs at all
(Apache::GD::Graph and others are installed).

I tried, as some have suggested, linking
/usr/lib/perl5/site_perl/<perl_version>/Apache/GD/Graph.pm as
/WebRT/html/chart, and I get the following error:

Error during compilation of /usr/rt2/WebRT/html//chart:
unknown section <%20> (line 87)

HTML::Mason::Interp::__ANON__('Error during compilation of 

/usr/rt2/WebRT/html//chart:^Junknown …') called at
/usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Interp.pm line 418

HTML::Mason::Interp::_compilation_error(‘HTML::Mason::Interp=HASH(0x8b1ea54)’,
‘/usr/rt2/WebRT/html//chart’, ‘unknown section <%20> (line 87)^J’)
called at /usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Interp.pm line 374
HTML::Mason::Interp::load(‘HTML::Mason::Interp=HASH(0x8b1ea54)’,
‘//chart’) called at
/usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Request.pm line 116
eval {…} called at
/usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Request.pm line 116

HTML::Mason::Request::exec(‘HTML::Mason::Request=HASH(0x8f3dc38)’,
‘//chart’, ‘x_labels’, ‘[Thu 14,Fri 15,Mon 18,Tue 19,Wed 20]’,
‘data1’, ‘[0,0,0,0,0]’, ‘data2’, ‘[0,0,0,0,0]’, …) called at
/usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Interp.pm line 243
HTML::Mason::Interp::exec(‘HTML::Mason::Interp=HASH(0x8b1ea54)’,
‘//chart’, ‘x_labels’, ‘[Thu 14,Fri 15,Mon 18,Tue 19,Wed 20]’,
‘data1’, ‘[0,0,0,0,0]’, ‘data2’, ‘[0,0,0,0,0]’, …) called at
/usr/rt2/bin/mason_handler.fcgi line 199
eval {…} called at /usr/rt2/bin/mason_handler.fcgi line 198

Not sure what step I missed here… any help would be much appreciated!

-Rich

Simon Cozens wrote:

Attached is a simple statistics package for RT. I’m planning on
releasing
further versions with more complex data available in the future, but I
think this is cool enough to release for now. Simply drop it into your
RT HTML tree, and go to http://rt/Statistics/

For shiny shiny graphs, you’ll need the Apache::GD::Graph module
installed
as $rturl/graph but if you don’t want that, just dike out all the
lines which
refer to “$url”. (This will make the time-to-resolve scatter graph a
bit
useless, though.)

Thanks to Oxford University Computing Services for letting me
develop and
distribute this.

Richard West $14.95 Registrations mailto:rwest@wesmo.com
Wesmo Computer Services .com .net .org .tv .cc http://www.wesmo.com
Full Domain & Web Hosting .BIZ .INFO & MORE!!

I too would really like an “idiots guide” to getting the stats (specifically
the graphs) working. I’m still stuck with the:

[error] Undefined subroutine &Apache::GD::Graph::handler called.

Apache::GD::Graph is installed. Any enlightenment?

John AlexanderFrom: Rich West [mailto:Rich.West@wesmo.com]
Sent: Wednesday, February 27, 2002 8:59 PM
To: rt-users@lists.fsck.com
Subject: Re: [rt-users] RT Statistics Package

I should probably have clarified… When I said "The installation was

rather easy", I meant the installation of The Statistics package and

related modules. I’ve had RT up for years… :slight_smile:

Also, I realized that the Statistics package IS working properly as it

generates the appropriate HTML tables, but I do not get any graphical

charts.

I am wondering if someone would have the time to jot down an "idiots

guide to installing the Statistics package" in which they were able to

get the graphics to work out properly. This way most of us could

probably find that one little step that they missed… :slight_smile:

Actually, as I look at it, there seem to be some discrepancies in the

data… I mean, on the 5 day chart, it shows all zeros, but when I Hit

the “Go” button at the bottom, the page updates and the correct

information is displayed in the table… Hrmm… Not sure if this is

fastcgi related or not…

Oh, and I, too, am seeing the URL references to the chart as:

https://mysite.com/rt2//chart?type=lines&amp;x_labels=[Thu%2021,Fri%2022,Mon
%2025,Tue%2026,Wed%2027]&data1=[0,0,0,0,0]&data2=[0,0,0,0,0]&dat
a3=[0,0,0,0,0]

(where the rt installation is at /rt2 of the website)

Thanks!

-Rich

Rich West wrote:

Hrmm… a thought just hit me. I’m running with mod_fastcgi… that

might prevent the graphics from being displayed.

But, still, I would be curious to know if the steps I took should have

been sufficient, and if the the error I listed indicated something

other than the limitation due to the mod_fastcgi install…

Thanks!

-Rich

Rich West wrote:

Just as an FYI, the call to your site is located on line 91 of

CallsMultiqueue.html. :slight_smile:

I hate to be another person emailing you about this, but hopefully

this is an easy one that you have already hashed out. The

installation was rather easy, except I do not get the graphs at all

(Apache::GD::Graph and others are installed).

I tried, as some have suggested, linking

/usr/lib/perl5/site_perl/<perl_version>/Apache/GD/Graph.pm as

/WebRT/html/chart, and I get the following error:

Error during compilation of /usr/rt2/WebRT/html//chart:

unknown section <%20> (line 87)

HTML::Mason::Interp::__ANON__('Error during compilation of 

/usr/rt2/WebRT/html//chart:^Junknown …') called at

/usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Interp.pm line 418

HTML::Mason::Interp::_compilation_error('HTML::Mason::Interp=HASH(0x8b1ea54)
',

‘/usr/rt2/WebRT/html//chart’, ‘unknown section <%20> (line 87)^J’)

called at /usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Interp.pm line 374

HTML::Mason::Interp::load('HTML::Mason::Interp=HASH(0x8b1ea54)', 

‘//chart’) called at

/usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Request.pm line 116

eval {...} called at 

/usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Request.pm line 116

HTML::Mason::Request::exec(‘HTML::Mason::Request=HASH(0x8f3dc38)’,

‘//chart’, ‘x_labels’, ‘[Thu 14,Fri 15,Mon 18,Tue 19,Wed 20]’,

‘data1’, ‘[0,0,0,0,0]’, ‘data2’, ‘[0,0,0,0,0]’, …) called at

/usr/lib/perl5/site_perl/5.6.1/HTML/Mason/Interp.pm line 243

HTML::Mason::Interp::exec('HTML::Mason::Interp=HASH(0x8b1ea54)', 

‘//chart’, ‘x_labels’, ‘[Thu 14,Fri 15,Mon 18,Tue 19,Wed 20]’,

‘data1’, ‘[0,0,0,0,0]’, ‘data2’, ‘[0,0,0,0,0]’, …) called at

/usr/rt2/bin/mason_handler.fcgi line 199

eval {...} called at /usr/rt2/bin/mason_handler.fcgi line 198

Not sure what step I missed here… any help would be much appreciated!

-Rich

Simon Cozens wrote:

Attached is a simple statistics package for RT. I’m planning on

releasing

further versions with more complex data available in the future, but I

think this is cool enough to release for now. Simply drop it into your

RT HTML tree, and go to http://rt/Statistics/

For shiny shiny graphs, you’ll need the Apache::GD::Graph module

installed

as $rturl/graph but if you don’t want that, just dike out all the

lines which

refer to “$url”. (This will make the time-to-resolve scatter graph a

bit

useless, though.)

Thanks to Oxford University Computing Services for letting me

develop and

distribute this.

Richard West $14.95 Registrations
mailto:rwest@wesmo.com

Wesmo Computer Services .com .net .org .tv .cc
http://www.wesmo.com

Full Domain & Web Hosting .BIZ .INFO & MORE!!

rt-users mailing list

rt-users@lists.fsck.com

http://lists.fsck.com/mailman/listinfo/rt-users

Did you also add it as a location in httpd.conf and restart your apache
server?

Unix is like a wigwam - no gates, no windows, apache inside

Johan Edstr�m, SCA IT Services
johan.edstrom@sca.com

Yeah…

<Location /chart>

SetHandler perl-script

PerlHandler +Apache::GD::Graph

and restarted apache. Getting the undefined subroutine error.

John Alexander-----Original Message-----
From: Edstrom Johan [mailto:johan.edstrom@sca.com]
Sent: Thursday, February 28, 2002 11:24 AM
To: Alexander, John; rt-users@lists.fsck.com
Subject: RE: [rt-users] RT Statistics Package

Did you also add it as a location in httpd.conf and restart your apache

server?

Unix is like a wigwam - no gates, no windows, apache inside

Johan Edström, SCA IT Services

johan.edstrom@sca.com

<Location /chart>

SetHandler perl-script

PerlHandler +Apache::GD::Graph

and restarted apache. Getting the undefined subroutine error.

The general fix for this type of thing, in my experience, is to throw in a
“PerlModule Apache::GD::Graph” to load the module. Either inside or
outside the should work. Give that a try.

Tim

Tim Wilde
twilde@dyndns.org
Systems Administrator
Dynamic DNS Network Services
http://www.dyndns.org/

Can someone send me this package? My email was down the day it came
out, so I wasn’t able to get the attachment.

Thanks much,
Shannon Pedersen

Well, numerous installs of various modules later, Apache is now crashing on
the following:

Can’t locate GD.pm in @INC

Specifically, in line 364 of Graph.pm is “use GD;” Is there a GD.pm module
somewhere? I can’t seem to find it.

John Alexander-----Original Message-----
From: Tim Wilde [mailto:twilde@dyndns.org]
Sent: Thursday, February 28, 2002 10:57 AM
To: Alexander, John
Cc: rt-users@lists.fsck.com
Subject: RE: [rt-users] RT Statistics Package

On Thu, 28 Feb 2002, Alexander, John wrote:

<Location /chart>

SetHandler perl-script

PerlHandler +Apache::GD::Graph

and restarted apache. Getting the undefined subroutine error.

The general fix for this type of thing, in my experience, is to throw in a

“PerlModule Apache::GD::Graph” to load the module. Either inside or

outside the should work. Give that a try.

Tim

Tim Wilde

twilde@dyndns.org

Systems Administrator

Dynamic DNS Network Services

http://www.dyndns.org/

Yes,

It’s the perl interface to the GD library - you need it to create graphs.

/JE

Specifically, in line 364 of Graph.pm is “use GD;” Is there a GD.pm module
somewhere? I can’t seem to find it.

http://cpan.perl.org/modules/by-module/GD/

Getting the graphics to work with the statistics package is an incredible
exercise in dependencies. Once you get Apache::GD::Graph installed, there
is GD.pm to install - which depends on libGD, which depends on libpng, zlib,
and jpeg-6, and so on and on.

At this point I think I have the dependencies for libGD installed but it’s
make keeps crashing. Sigh… I’m learning to hate solaris.

John AlexanderFrom: Jason Englander
To: Alexander, John
Cc: ‘rt-users@lists.fsck.com’
Sent: 2/28/02 7:13 PM
Subject: RE: [rt-users] RT Statistics Package

Specifically, in line 364 of Graph.pm is “use GD;” Is there a GD.pm
module
somewhere? I can’t seem to find it.

http://cpan.perl.org/modules/by-module/GD/