Anybody using RTx::Statistics

anybody using RTx::Statistics package?
I’m on 3.8.2. seems like the last dev on this package was done in 2006.
Just wondering if anybody’s got it up and running nicely?

Calvin Chiang
Network Admin
Utilyx
1st Floor, 55 North Wharf Road
Paddington
London, W2 1LA
Tel: 020 7087 8673
www.utilyx.com

“Utilyx” is the trading name of “Utilyx Limited” and “Utilyx Risk Management Limited” (URML). URML is authorised and regulated by the Financial Services Authority (FSA). This message contains information that may be privileged or confidential and is the property of Utilyx. It is intended only for the person to whom it is addressed. No confidentiality or privilege is waived or lost by any mistransmission. Any views or opinions expressed in this message are solely those of the author and do not necessarily represent those of Utilyx. Unless otherwise stated, any pricing information given in this message is indicative only and does not constitute an offer to deal at any price quoted. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email

Calvin,

We’re using a version of RTx::Statistics on RT v3.6.2.
It’s partly working. Histograms are OK, but the line graphs (Tkts per
day, Multiple Qs, Time to resolve) display constant values across the
entire graph. I think the query is gathering data just from the latest
date rather than as an array across the date range, but we don’t make
great use of the package and so haven’t seen this as a priority fix.

The default RT reports get more use than RTx::Statistics charts.

Steve
Bioinformatics
Health Protection Agency-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Calvin
Chiang
Sent: 24 February 2009 12:00
To: rt-users@lists.bestpractical.com
Subject: [rt-users] anybody using RTx::Statistics

anybody using RTx::Statistics package?
I’m on 3.8.2. seems like the last dev on this package was done in 2006.
Just wondering if anybody’s got it up and running nicely?

Calvin Chiang
Network Admin
Utilyx
1st Floor, 55 North Wharf Road
Paddington
London, W2 1LA
Tel: 020 7087 8673
www.utilyx.com

“Utilyx” is the trading name of “Utilyx Limited” and “Utilyx Risk
Management Limited” (URML). URML is authorised and regulated by the
Financial Services Authority (FSA). This message contains information
that may be privileged or confidential and is the property of Utilyx. It
is intended only for the person to whom it is addressed. No
confidentiality or privilege is waived or lost by any mistransmission.
Any views or opinions expressed in this message are solely those of the
author and do not necessarily represent those of Utilyx. Unless
otherwise stated, any pricing information given in this message is
indicative only and does not constitute an offer to deal at any price
quoted. If you are not the intended recipient, you are not authorized to
read, print, retain, copy, disseminate, distribute or use this message
or any part thereof. If you receive this message in error, please notify
the sender immediately and delete all copies of this message.
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
The information contained in the EMail and any attachments is
confidential and intended solely and for the attention and use of
the named addressee(s). It may not be disclosed to any other person
without the express authority of the HPA, or the intended
recipient, or both. If you are not the intended recipient, you must
not disclose, copy, distribute or retain this message or any part
of it. This footnote also confirms that this EMail has been swept
for computer viruses, but please re-sweep any attachments before
opening or saving. HTTP://www.HPA.org.uk

+1

PS : I had to make my own reports / graphs with direct Mysql queries and
gnuplot to have exactly what I wanted.On Tue, 2009-02-24 at 12:17 +0000, Steven Platt wrote:

Calvin,

We’re using a version of RTx::Statistics on RT v3.6.2.
It’s partly working. Histograms are OK, but the line graphs (Tkts per
day, Multiple Qs, Time to resolve) display constant values across the
entire graph. I think the query is gathering data just from the latest
date rather than as an array across the date range, but we don’t make
great use of the package and so haven’t seen this as a priority fix.

The default RT reports get more use than RTx::Statistics charts.

Steve
Bioinformatics
Health Protection Agency

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Calvin
Chiang
Sent: 24 February 2009 12:00
To: rt-users@lists.bestpractical.com
Subject: [rt-users] anybody using RTx::Statistics

anybody using RTx::Statistics package?
I’m on 3.8.2. seems like the last dev on this package was done in 2006.
Just wondering if anybody’s got it up and running nicely?

Oleg Sladkoff
KELKOO - Service Architect
oleg.sladkoff@yahoo-inc.com
Yahoo messenger : Kelkoooleg
tel : +33 (0)476848147
gsm : +33(0)675768532

thanks for the info guys!

@Oleg
is the gnuplot/mysql stuff fairly straightforward?
(i dont code at all)

Oleg Sladkoff wrote:

+1

PS : I had to make my own reports / graphs with direct Mysql queries and
gnuplot to have exactly what I wanted.

Calvin,

We’re using a version of RTx::Statistics on RT v3.6.2.
It’s partly working. Histograms are OK, but the line graphs (Tkts per
day, Multiple Qs, Time to resolve) display constant values across the
entire graph. I think the query is gathering data just from the latest
date rather than as an array across the date range, but we don’t make
great use of the package and so haven’t seen this as a priority fix.

The default RT reports get more use than RTx::Statistics charts.

Steve
Bioinformatics
Health Protection Agency

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Calvin
Chiang
Sent: 24 February 2009 12:00
To: rt-users@lists.bestpractical.com
Subject: [rt-users] anybody using RTx::Statistics

anybody using RTx::Statistics package?
I’m on 3.8.2. seems like the last dev on this package was done in 2006.
Just wondering if anybody’s got it up and running nicely?

Calvin Chiang
Network Admin
Utilyx
1st Floor, 55 North Wharf Road
Paddington
London, W2 1LA
Tel: 020 7087 8673
www.utilyx.com

“Utilyx” is the trading name of “Utilyx Limited” and “Utilyx Risk Management Limited” (URML). URML is authorised and regulated by the Financial Services Authority (FSA). This message contains information that may be privileged or confidential and is the property of Utilyx. It is intended only for the person to whom it is addressed. No confidentiality or privilege is waived or lost by any mistransmission. Any views or opinions expressed in this message are solely those of the author and do not necessarily represent those of Utilyx. Unless otherwise stated, any pricing information given in this message is indicative only and does not constitute an offer to deal at any price quoted. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email

HI Oleg,

that’s brilliant thanks!
i’ll jump in and get my hands dirty

Cheers

Oleg Sladkoff wrote:

Hello

If you want to adapt it , then you need to know bash/awk/sql/gnuplot
but this is not complicated (only a few lines of code)
however you can probably use it as is if you update the "for q in"
line only…

the reports created show tickets historic information per week

  • tickets created per week per queue
  • tickets resolved per week per queue
  • currently open tickets per week

bash script :

#!/bin/bash

newTickets()
{
mysql -urt3 -pxxxxxxxx -h myhost rt3 -N -e “select count(*) from
Tickets,Queues where Tickets.queue=Queues.id and Queues.name in
($QUEUE) and date(Tickets.Created) between ‘$BEFORE’ and ‘$DAY’”
}

resolvedTickets()
{
mysql -urt3 -pxxxxxxxx -h myhost rt3 -N -e “select count(*) from
Tickets,Queues where Tickets.queue=Queues.id and Queues.name in
($QUEUE) and date(Tickets.Resolved) between ‘$BEFORE’ and ‘$DAY’”
}

openTickets()
{
mysql -urt3 -pxxxxxxxx -h myhost rt3 -N -e “select count(*) from
Tickets,Queues where Tickets.queue=Queues.id and Queues.name in
($QUEUE) and date(Tickets.Created)<=’$DAY’ and (
date(Tickets.Resolved)>’$DAY’ or status=‘new’ or status=‘open’ or
status=‘stalled’)”
}

HISTORY=9
FULLHISTORY=100
let H=$HISTORY+1
DAY=$(date “+%Y-%m-%d” -d "$H weeks ago ")
HTMLPATH=/var/www/html/statistics

echo “

RT statistics

” > $HTMLPATH/index.html

for q in “‘ops.support’”:operations
"‘team1.support’,‘team2.support’,‘team3.support’":backend
"‘team4.support’,‘team5.support’,‘team6…support’":frontend
do
QUEUE=$(printf $q | cut -d: -f1)
QUEUENAME=$(printf $q | cut -d: -f2)
echo “

Tickets activity for queues $QUEUE

”>>$HTMLPATH/index.html
echo “”>> $HTMLPATH/index.html
echo > $HTMLPATH/tickets_$QUEUENAME.csv
echo > $HTMLPATH/tickets_full_$QUEUENAME.csv
for d in seq $FULLHISTORY -1 0
do
BEFORE=$DAY
DAY=$(date “+%Y-%m-%d” -d “$d weeks ago “)
[ $d -lt $HISTORY ] && printf “%s;%i;%i;%i\n” $DAY $(newTickets)
$(openTickets) $(resolvedTickets) >> $HTMLPATH/tickets_$QUEUENAME.csv
printf “%s;%i;%i;%i\n” $DAY $(newTickets) $(openTickets)
$(resolvedTickets) >> $HTMLPATH/tickets_full_$QUEUENAME.csv
done
sed -e “s/QUEUE/$QUEUENAME/g” /root/RTstats/graphic.plt | gnuplot
awk -F; ’ BEGIN {
printf(”
%16s%16s%16s%16s\n”,“WeekEndingDay”,“NewTickets”,“OpenTickets”,“ResolvedTickets”)
}
{ printf("%16s%16s%16s%16s\n",$1,$2,$3,$4) }
END { print “

” } '
$HTMLPATH/tickets_$QUEUENAME.csv >> $HTMLPATH/index.html
done

gnuplot script :
set datafile separator ";"
set terminal png small
set autoscale x
set mxtics 1
set yrange [0:140]
set xdata time
set timefmt "%Y-%m-%d"
set format x “w%W"
set style fill solid 9 border 0
set boxwidth 0.6 relative
set style line 1 lt 1 linewidth 3 pt 1 ps 0.5
set style line 2 lt 2 linewidth 3 pt 2 ps 0.5
set style line 3 lt 9 linewidth 3 pt 3 ps 0.5
set title “tickets activity for QUEUE"
set output “/var/www/html/statistics/tickets_QUEUE.png"
plot ‘/var/www/html/statistics/tickets_QUEUE.csv’ using 1:3 title
"Total remaining tickets” with boxes ls 3 ,
‘/var/www/html/statistics/tickets_QUEUE.csv’ using 1:2 title
"tickets created per week” with lp ls 1 ,
‘/var/www/html/statistics/tickets_QUEUE.csv’ using 1:4 title
"tickets resolved per week” with lp ls 2
set terminal png small transparent
set boxwidth 1 relative
set autoscale y
set title “tickets full activity for QUEUE"
set format x “%m/%y"
set output “/var/www/html/statistics/tickets_full_QUEUE.png"
plot ‘/var/www/html/statistics/tickets_full_QUEUE.csv’ using 1:3 title
"Total remaining tickets” with boxes ls 3 ,
‘/var/www/html/statistics/tickets_full_QUEUE.csv’ using 1:2 title
"tickets created per week” with lp ls 1 ,
‘/var/www/html/statistics/tickets_full_QUEUE.csv’ using 1:4 title
"tickets resolved per week” with lp ls 2

@Oleg
is the gnuplot/mysql stuff fairly straightforward?
(i dont code at all)

Oleg Sladkoff
KELKOO - Service Architect
oleg.sladkoff@yahoo-inc.com mailto:oleg.sladkoff@yahoo-inc.com
Yahoo messenger : Kelkoooleg
tel : +33 (0)476848147
gsm : +33(0)675768532


This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email


Calvin Chiang
Network Admin
Utilyx
1st Floor, 55 North Wharf Road
Paddington
London, W2 1LA
Tel: 020 7087 8673
www.utilyx.com

“Utilyx” is the trading name of “Utilyx Limited” and “Utilyx Risk Management Limited” (URML). URML is authorised and regulated by the Financial Services Authority (FSA). This message contains information that may be privileged or confidential and is the property of Utilyx. It is intended only for the person to whom it is addressed. No confidentiality or privilege is waived or lost by any mistransmission. Any views or opinions expressed in this message are solely those of the author and do not necessarily represent those of Utilyx. Unless otherwise stated, any pricing information given in this message is indicative only and does not constitute an offer to deal at any price quoted. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email

Hello

If you want to adapt it , then you need to know bash/awk/sql/gnuplot but
this is not complicated (only a few lines of code)
however you can probably use it as is if you update the “for q in” line
only…

the reports created show tickets historic information per week

  • tickets created per week per queue
  • tickets resolved per week per queue
  • currently open tickets per week

bash script :

#!/bin/bash

newTickets()
{
mysql -urt3 -pxxxxxxxx -h myhost rt3 -N -e “select count(*) from
Tickets,Queues where Tickets.queue=Queues.id and Queues.name in ($QUEUE)
and date(Tickets.Created) between ‘$BEFORE’ and ‘$DAY’”
}

resolvedTickets()
{
mysql -urt3 -pxxxxxxxx -h myhost rt3 -N -e “select count(*) from
Tickets,Queues where Tickets.queue=Queues.id and Queues.name in ($QUEUE)
and date(Tickets.Resolved) between ‘$BEFORE’ and ‘$DAY’”
}

openTickets()
{
mysql -urt3 -pxxxxxxxx -h myhost rt3 -N -e “select count(*) from
Tickets,Queues where Tickets.queue=Queues.id and Queues.name in ($QUEUE)
and date(Tickets.Created)<=’$DAY’ and ( date(Tickets.Resolved)>’$DAY’ or
status=‘new’ or status=‘open’ or status=‘stalled’)”
}

HISTORY=9
FULLHISTORY=100
let H=$HISTORY+1
DAY=$(date “+%Y-%m-%d” -d "$H weeks ago ")
HTMLPATH=/var/www/html/statistics

echo “

RT statistics

” > $HTMLPATH/index.html

for q in “‘ops.support’”:operations
"‘team1.support’,‘team2.support’,‘team3.support’":backend
"‘team4.support’,‘team5.support’,‘team6…support’":frontend
do
QUEUE=$(printf $q | cut -d: -f1)
QUEUENAME=$(printf $q | cut -d: -f2)
echo “

Tickets activity for queues
$QUEUE

”>>$HTMLPATH/index.html
echo “”>> $HTMLPATH/index.html
echo > $HTMLPATH/tickets_$QUEUENAME.csv
echo > $HTMLPATH/tickets_full_$QUEUENAME.csv
for d in seq $FULLHISTORY -1 0
do
BEFORE=$DAY
DAY=$(date “+%Y-%m-%d” -d “$d weeks ago “)
[ $d -lt $HISTORY ] && printf “%s;%i;%i;%i\n” $DAY $(newTickets)
$(openTickets) $(resolvedTickets) >> $HTMLPATH/tickets_$QUEUENAME.csv
printf “%s;%i;%i;%i\n” $DAY $(newTickets) $(openTickets)
$(resolvedTickets) >> $HTMLPATH/tickets_full_$QUEUENAME.csv
done
sed -e “s/QUEUE/$QUEUENAME/g” /root/RTstats/graphic.plt | gnuplot
awk -F; ’ BEGIN { printf(”
%16s%16s%16s%16s
\n”,“WeekEndingDay”,“NewTickets”,“OpenTickets”,“ResolvedTickets”) }
{ printf("%16s%16s%16s%16s\n",$1,$2,$3,$4) }
END { print “

” } '
$HTMLPATH/tickets_$QUEUENAME.csv >> $HTMLPATH/index.html
done

gnuplot script :
set datafile separator ";"
set terminal png small
set autoscale x
set mxtics 1
set yrange [0:140]
set xdata time
set timefmt "%Y-%m-%d"
set format x "w%W"
set style fill solid 9 border 0
set boxwidth 0.6 relative
set style line 1 lt 1 linewidth 3 pt 1 ps 0.5
set style line 2 lt 2 linewidth 3 pt 2 ps 0.5
set style line 3 lt 9 linewidth 3 pt 3 ps 0.5
set title “tickets activity for QUEUE"
set output “/var/www/html/statistics/tickets_QUEUE.png"
plot ‘/var/www/html/statistics/tickets_QUEUE.csv’ using 1:3 title “Total
remaining tickets” with boxes ls 3 ,
‘/var/www/html/statistics/tickets_QUEUE.csv’ using 1:2 title
"tickets created per week” with lp ls 1 ,
‘/var/www/html/statistics/tickets_QUEUE.csv’ using 1:4 title
"tickets resolved per week” with lp ls 2
set terminal png small transparent
set boxwidth 1 relative
set autoscale y
set title “tickets full activity for QUEUE"
set format x “%m/%y"
set output “/var/www/html/statistics/tickets_full_QUEUE.png"
plot ‘/var/www/html/statistics/tickets_full_QUEUE.csv’ using 1:3 title
"Total remaining tickets” with boxes ls 3 ,
‘/var/www/html/statistics/tickets_full_QUEUE.csv’ using 1:2 title
"tickets created per week” with lp ls 1 ,
‘/var/www/html/statistics/tickets_full_QUEUE.csv’ using 1:4 title
"tickets resolved per week” with lp ls 2On Tue, 2009-02-24 at 15:04 +0000, Calvin Chiang wrote:

@Oleg
is the gnuplot/mysql stuff fairly straightforward?
(i dont code at all)

Oleg Sladkoff
KELKOO - Service Architect
oleg.sladkoff@yahoo-inc.com
Yahoo messenger : Kelkoooleg
tel : +33 (0)476848147
gsm : +33(0)675768532