126
Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Embed Size (px)

Citation preview

Page 1: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Generating Reportswith REQADM 1.2

Steve Willoughby

PMD Engineering Computing

Page 2: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Overview

• The Basic Idea• REQADM’s Reporting Tool• Output Formats• Automatic Web Page Generation• Simple Queries• Advanced Queries• Raw Data Dumps• Documentation Available

Page 3: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

The Basic Idea

• REQADM’s database contains your history– Issues and complaints from customers– Incidents affecting your systems– Time required to resolve different issues– Employee performance metrics

• Caution...

Page 4: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

The Basic Idea

• Raw data can be analyzed into meaningful reports– Number of tickets submitted by week– Top 10 categories of issues seen– Mean time to repair by problem type– System failure history by host or platform type– Many others...

Page 5: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

REQADM’s Reporting Tool

• Used to have to be done with Perl scripts

• REQADM 1.2 introduced “reqadm-report” tool– High-level query language– Standardize your reports– Generate color graphs for printing or web pages– Raw ticket data exported to other tools

Page 6: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

REQADM’s Reporting Tool

• Invoke with query file already prepared:reqadm-report -file filename

• Report sent to standard output

• When running interactively, -verbose option is useful for watching progress

Page 7: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Output Formats

• Reqadm-report’s default output format is “structured” ASCII– Multiple graphs possible per file– All data necessary to plot graph included– Easy to write scripts to parse or translate to

other formats

Page 8: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Structured ASCII Output

CHART (Tickets) (Q1 2000) (REQADM) 28 18

LEGEND

(Tickets submitted per week) 1 0 0 BAR

(Tickets closed per week) 0 1 0 BAR

(Tickets closed late) 0 0 1 LINE

AXES

(Work Week) 12 1 0 13 14 (WW13) 8 X

(Tickets) 12 0 200 10 (X200) 8 Y

TICKS

tick labels are listed here...

Page 9: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Structured ASCII Output

DATA 1 0 0 BAR

0 100 Y

1 110 Y

DATA 0 1 0 BAR

0 98 Y

1 109 Y

ENDCHART

Page 10: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

PostScript® Output

• Alternative output format to drive printers directly– Actually just programs printer to understand

structured ASCII format

• Hard-copy reports

• Use other software tools to convert PostScript to other graphics formats

Page 11: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

CSV Output

• Alternative output format for exporting “raw” ticket data to spreadsheets or other report generators

• No data analysis other than ticket selection#Comments delimit each dataset in file...

#Fields: queue number subject

request,123456,Help with Printer problem

request,123457,”Need software, hardware”

request,123458,E-Mail seems to be borken

Page 12: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Automatic Web Page Generation

• Build request center metrics pages automatically via cron

• Build your query files and generate PNG files (or JPEG or GIF or whatever…):reqadm-report -ps -file weekly \

| gs -sDEVICE=png256 -r72 \

-sOutputFile=graph%d.png

Page 13: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Simple Queries

• Going from idea to finished graph is as simple as these steps:– Specify report titles and axis styles– Select a set of tickets– Filter the selection further (temporarily)– Plot the filtered data onto the graph– Repeat, if desired, with different data

Page 14: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Titles and Styles

R EQ AD M 1.2_BETA_P10 / G EN ER ATED 04 FEB 2000 14:10:23

(R EQ UEST Q UEUE O N LY)

EC M ade C om m its

TIC KETS R ESO LVED % M ade Com m its G oal

W ork W eek

Mad

e C

om

mits

Num

ber of T

ickets

W W 45 W W 46 W W 47 W W 48 W W 49 W W 50 W W 51 W W 52 W W 01 W W 02 W W 03 W W 04 W W 05 W W 060%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

0

82

164

246

328

410

492

574

656

738

820

Titles

y Axis

x Axis Legend

y2 Axis

Axis Label

TickLabel

Page 15: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Titles and Styles

• Set the overall chart titles:title title-string [size]

subtitle title-string [size]

• Examples:title ”Tickets resolved”

title ”Top Categories” 48

subtitle ”Q1 2000”

Page 16: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Titles and Styles

• You can also change paper size and which fonts to use (see reqadm-report documentation for full details).

Page 17: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Chart Axes

• Provide axis and tick labels

• The major (sample) axis is always “x”– ...but you can “flip” the chart so the x axis runs

vertically and the y axis runs horizontally– Controls how data are sampled for plotting on

the chart

x sample-type [options]

Page 18: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Chart Axes (x)

• daily 24 hour samples (midnight to midnight)• hourly 1 hour samples• iweekly 7 day samples, by Intel work week number• monthly by calendar month • mweekly 7 day samples, by Monday-centric week no.• quarterly 3-month samples (Jan, Apr, Jul, Oct)• weekly 7 day samples, by Sunday-centric week no.• yearly by calendar year• values sample by value, not by date

Page 19: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Chart Axes (x)

• Sample dates may be skewed forward or back to adjust for time zones, or non-standard reporting frames (Wed-Tue, etc.) – (-adjust option)

• Custom sample criteria may be specified rather than these pre-made ones– (-custom option)

Page 20: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

x Axis Options

• Other options available to control the appearance of the data samples:-sort [options]

• Sorts data points. Options provide control over sort order (ascending, descending, by y-axis value, numeric, etc.)

-top n (or… -bottom n)• Selects only the n highest (or lowest) data points

-flip• Flip chart 90º so x runs vertically

Page 21: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

x Axis Options

-label string

-ticklabel spec

• These control the overall axis label and the labels placed on each “tick” mark on the x axis.

• The tick label spec parameter may include sample “bucket” identifiers such as dates, times, week numbers, or custom generated labels.

• Normally, you don’t need -ticklabel — an appropriate one is automatically chosen for you based on axis sample type.

Page 22: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

y Axis Options

• y (data) axis runs vertically, containing the actual data tabulated in each sample bucket

• Specify y axis options as:y [options]

• Options:% Graph as percentages

-label string Specify axis label

Page 23: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

y2 Axis Options

• y2 (data) axis runs vertically on the right side of the graph

• Used when you need two scales:– E.g., number of tickets vs. % done on time

• Specify y2 axis options as:y2 [options]

• Options are the same as with the y axis

Page 24: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

R EQ AD M 1.2_BETA_P10 / G EN ER ATED 04 FEB 2000 14:10:23

(R EQ UEST Q UEUE O N LY)

EC M ade C om m its

TIC KETS R ESO LVED % M ade Com m its G oal

W ork W eek

Mad

e C

om

mits

Num

ber of T

ickets

W W 45 W W 46 W W 47 W W 48 W W 49 W W 50 W W 51 W W 52 W W 01 W W 02 W W 03 W W 04 W W 05 W W 060%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

0

82

164

246

328

410

492

574

656

738

820

Page 25: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

title ”EC Made Commits”

subtitle ”(Request queue only)”

x iweekly -label ”Work Week”

y % -label ”Made Commits”

y2 -label ”Number of Tickets”

Page 26: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

R EQ AD M 1.2_BETA_P10 / G EN ER ATED 04 FEB 2000 15:21:01

TO P-LEVEL PR O BLEM TYPES

Top 10 R oot-C ause C ategories by Volum e

TIC KETS R ESO LVED W W 02 2000 Tickets R esolved W W 03 2000 Tickets R esolved W W 04 2000

Tickets R esolved W W 05 2000 Tickets R esolved W W 06 2000

N etw ork/In ternet

M obile C om puting/R em ote Access

M ail/cc:M ail

R equest Adm in istra tion

U N IX W orkstation/X term inal

M icrosoft W indow s

Applications/C om m ands

Logistics

Account A dm in istra tion

Fileserver/D isk M anagem ent

0 50 100 150 200 250 300 350 400 450 500

Page 27: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

title ”Top 10 Root-Cause Categories by Volume”

subtitle ”top-level problem types”

x values -top 10 -flip \

-sort -values

Page 28: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

R EQ AD M 1.2_BETA_P10 / G EN E R ATED 04 FEB 2000 15:32:46

ALL Q U EU ES

C urrently-O pen R equest P riorities

U R G EN T (41)h igh (104)m edium (439)low (62)

Page 29: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

title ”Currently-Open Request Priorities”

subtitle ”All Queues”

x values -sort -exec prioritySort

Page 30: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Simple Queries

• Going from idea to finished graph is as simple as these steps:– Specify report titles and axis styles– Select a set of tickets– Filter the selection further (temporarily)– Plot the filtered data onto the graph– Repeat, if desired, with different data

Page 31: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selecting Tickets

• Reqadm-report’s first action is to retrieve a working set of tickets from the REQADM server– Not all ticket data loaded at first (for speed)– Don’t select more tickets (or more detail) than

you really need (to conserve memory and download time)

• These tickets may be used for multiple plots

Page 32: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selecting Tickets

select [criteria…]

• Grabs all tickets in entire database which satisfy the given criteria– So be careful with your criteria :)

• Specify any number of criteria in any order– Only tickets matching all specified criteria will

be selected.

Page 33: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Dates

• Select by date ranges:closed datespec

due datespec

resolved datespec

submitted datespec

updated datespec

Page 34: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Dates

• Date specifiers are any of the following:from date

before date

between date1 [and] date2

• Dates may be in a wide variety of formats:2/13/00

February 13, 2000

4 weeks ago

Page 35: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Dates

• N.B.: The date portion of the date specifiers must be enclosed in double quotes or curly braces if it contains spaces:closed from 2/1/00

closed from ”4 weeks ago”

due between {1 week ago} and today

Page 36: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Dates

• Also, if no time is specified, it defaults to midnight at the start of that date, so this does not include 29 Feb itself:closed between 2/1/00 and 2/29/00

• Whereas, this will include all of Februaryclosed between 2/1/00 and \

”2/29/00 23:59:59”

Page 37: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Owner/Submitter

• Select by submitter or owner: all tickets from (owned by) any of the people in the list of user ID numbers:from [not] idlist

owner [not] idlist

• The idlist is a list of REQADM user ID numbers...

Page 38: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Owner/Submitter

• These ID numbers are formatted thus:- No user (e.g., not assigned an

owner)

Gdigits Rotation group ID number

Pdigits Person’s own ID number (WWID)

Tdigits Temporary ID number

Xdigits Invalid number

Page 39: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Owner/Submitter

• The idlist may be a single number:select owner P12345678

• Or, it may contain shell-style wildcards *, ? and […]select owner P100*

• Or, it may be a list of ID numbers in braces:select from {G10[0-4] P1234 P1238}

Page 40: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Attributes

• Select by ticket attributes:flags [not] flag-list

importance [not] priority-list

ontime

overdue

priority [not] priority-list

queue [not] queue-list

status [not] status-list

Page 41: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Flag Attributes

• Flags indicate historical status:amended “Read-only” attrib changed

categorized Category assigned to ticket

merged Others merged into this one

reopened Ever re-opened

requeued Ever re-queued

Page 42: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Flag Attributes

• The flaglist may be a single flag:select flags reopened

• Or, it may be a list of flags in braces:select flags {merged requeued}– This will select all tickets for which any (not

necessarily all) of the flags are true!

• Flag names may be abbreviated:select flags not {m req}

Page 43: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Priority

• Priorities have their usual names:urgent high medium low

• The same rules apply to selecting with lists of priorities as we just discussed about flags:select priority {high urgent}

select importance not l

Page 44: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Timeliness

• Two simple boolean keywords are provided to select tickets based on timeliness:ontime

overdue

• They simply compare the tickets’ due date vs. their resolution date.

Page 45: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Queue

• Selecting based on queue works just like priorities, except you use queue names as defined in your system:select queue request

• The same rules apply to selecting with lists of queues as with the others:select queue {restore project}

select queue not {req* res* proj*}

Page 46: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Status

• Status values work like the flags, but describe the ticket’s current state:active Open, not stale or due

closed Resolved and approved

due Open, due within 1 hour

merged Merged into another ticket

new Never assigned to an owner

open Active/due/new/pending/stale

Page 47: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Status

pending “On hold” pending external action

resolved Resolved but not approved yet

requeued Moved to a different queue

stale Open, no updates in too long

• These behave like the flags described previously with respect to lists, negation, abbreviation, etc.

Page 48: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by System

• Select by affected system:platform [not] list

system [not] list

sysloc [not] list

• The items in these lists are as defined in your “systems.conf” file:select platform Intel::Linux

select system {fred barney wilma}

Page 49: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by System

• An incomplete platform with trailing “::” includes all sub-platform types in the query:select platform Intel::

• Wildcards may also be used in these names.

Page 50: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Subject

• Select by ticket subject:subject [not] [-case] [-regexp] pattern

• The pattern may contain wildcards or a regular expression. Don’t forget to put quotes or braces around the pattern if it contains spaces.select subject *mail*

• Use -case option to match with exact case (default is case-insensitive matching)

Page 51: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Category/Type

• In REQADM 1.2, the following criteria require loading extra data from the server and will significantly slow your query:category [not] list

type [not] list

• They select based on root-cause category and problem type, respectively.

Page 52: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection by Category/Type

• Wildcards are allowed, as are multi-item lists.

• However, if any item contains spaces, it must be quoted inside the list, too. Best to use braces here rather than quotes:select category not unix/*

select type {{Printer Issue} Network}

• Use the short category codes, not the full English descriptions, for category

Page 53: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection Criteria

• Each select or filter starts over with a fresh set of tickets, completely overriding the previously-selected (or filtered) ticket list.

• Including the add keyword to the criteria will cause this select or filter to add the tickets matching its criteria to the set already selected by the previous one(s).

Page 54: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection Criteria

# get all tickets open now, and

# all those resolved since the

# start of 2000.

select resolved from 1/1/00

select add open

Page 55: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection Criteria

• Each select or filter criterion may only be specified once per selection.

• Multiple select or filter criteria imply an “and” between them: only tickets matching all criteria will be selected.

• An “or” operation is performed by following the first select or filter statement with another, and including the “add” keyword.

Page 56: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Simple Queries

• Going from idea to finished graph is as simple as these steps:– Specify report titles and axis styles– Select a set of tickets– Filter the selection further (temporarily)– Plot the filtered data onto the graph– Repeat, if desired, with different data

Page 57: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection Filtering

• Apply filters to refine the selected ticket set even further

• Temporarily narrow the criteria for a portion of the graph, perhaps

• Same criteria keywords and options as for the select statement

filter [criteria…]

Page 58: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection Filtering

select resolved from 1/1/00

# now graph all resolved ...

filter overdue

# now graph the set of those

# which were overdue ...

Page 59: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Selection Filtering

• You can “reset” the filter at any time, giving you back the full set of selected tickets, by leaving out all criteria (setting the filter to allow everything):filter

Page 60: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

R EQ AD M 1.2_BETA_P10 / G EN ER ATED 04 FEB 2000 14:10:23

(R EQ UEST Q UEUE O N LY)

EC M ade C om m its

TIC KETS R ESO LVED % M ade Com m its G oal

W ork W eek

Mad

e C

om

mits

Num

ber of T

ickets

W W 45 W W 46 W W 47 W W 48 W W 49 W W 50 W W 51 W W 52 W W 01 W W 02 W W 03 W W 04 W W 05 W W 060%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

0

82

164

246

328

410

492

574

656

738

820

Page 61: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

select resolved from \

”13 weeks ago” queue request

Page 62: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

R EQ AD M 1.2_BETA_P10 / G EN ER ATED 04 FEB 2000 15:21:01

TO P-LEVEL PR O BLEM TYPES

Top 10 R oot-C ause C ategories by Volum e

TIC KETS R ESO LVED W W 02 2000 Tickets R esolved W W 03 2000 Tickets R esolved W W 04 2000

Tickets R esolved W W 05 2000 Tickets R esolved W W 06 2000

N etw ork/In ternet

M obile C om puting/R em ote Access

M ail/cc:M ail

R equest Adm in istra tion

U N IX W orkstation/X term inal

M icrosoft W indow s

Applications/C om m ands

Logistics

Account A dm in istra tion

Fileserver/D isk M anagem ent

0 50 100 150 200 250 300 350 400 450 500

Page 63: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

select resolved from ”4 weeks ago”

filter queue request

Page 64: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

R EQ AD M 1.2_BETA_P10 / G EN E R ATED 04 FEB 2000 15:32:46

ALL Q U EU ES

C urrently-O pen R equest P riorities

U R G EN T (41)h igh (104)m edium (439)low (62)

Page 65: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

select status open

Page 66: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Simple Queries

• Going from idea to finished graph is as simple as these steps:– Specify report titles and axis styles– Select a set of tickets– Filter the selection further (temporarily)– Plot the filtered data onto the graph– Repeat, if desired, with different data

Page 67: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Graphing Data Points

• Now the selected (and filtered) tickets can be plotted on a graph

• Each “tick” on the x axis is a “sample” or “bucket” in which a set of qualifying tickets will be gathered, and the value of tickets in the sample bucket will be plotted to the y axis.

Page 68: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

R EQ AD M 1.2_BETA_P10 / G EN ER ATED 04 FEB 2000 14:10:23

(R EQ UEST Q UEUE O N LY)

EC M ade C om m its

TIC KETS R ESO LVED % M ade Com m its G oal

W ork W eek

Mad

e C

om

mits

Num

ber of T

ickets

W W 45 W W 46 W W 47 W W 48 W W 49 W W 50 W W 51 W W 52 W W 01 W W 02 W W 03 W W 04 W W 05 W W 060%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

0

82

164

246

328

410

492

574

656

738

820

WW45SampleBucket

WW46SampleBucket

Constant

Line

Bar

Legend

Page 69: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

R EQ AD M 1.2_BETA_P10 / G EN ER ATED 04 FEB 2000 15:21:01

TO P-LEVEL PR O BLEM TYPES

Top 10 R oot-C ause C ategories by Volum e

TIC KETS R ESO LVED W W 02 2000 Tickets R esolved W W 03 2000 Tickets R esolved W W 04 2000

Tickets R esolved W W 05 2000 Tickets R esolved W W 06 2000

N etw ork/In ternet

M obile C om puting/R em ote Access

M ail/cc:M ail

R equest Adm in istra tion

U N IX W orkstation/X term inal

M icrosoft W indow s

Applications/C om m ands

Logistics

Account A dm in istra tion

Fileserver/D isk M anagem ent

0 50 100 150 200 250 300 350 400 450 500

MailSampleBucket

NetworkSampleBucket

WW06Sub-Sample

WW05Sub-Sample

x Axis Stacked Bar

Page 70: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

R EQ AD M 1.2_BETA_P10 / G EN E R ATED 04 FEB 2000 15:32:46

ALL Q U EU ES

C urrently-O pen R equest P riorities

U R G EN T (41)h igh (104)m edium (439)low (62)

“low”SampleBucket

“medium”SampleBucket

LegendPie

Page 71: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Graphing Data Points

graph style type attribute [options]

graph const value [options]

• Tabulates ticket data by scanning selected tickets and adding their attributes to the sample buckets

• Plots the resulting values of the samples on the graph

Page 72: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Graph Styles

• The style parameter determines the type of graph to be plotted:bar

const

line

pie

stacked

• Note that “constant” line graphs have a different syntax (just value and options)

Page 73: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Graph Types

• The type parameter specifies the type of data to collect in each sample:count all

• Total number of tickets in sample

count attrlist• Total number of tickets in sample which had all of the

attributes in attrlist true during the sample period– reopened requeued merged ontime overdue active closed due new open pending resolved stale

Page 74: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Graph Types

ratio attrlist• Ratio of the number of tickets for which all the

attributes in attrlist were true, vs. the total number of tickets in the sample.

• Same values for attrlist as with count

average sattr• Average of the sattr values for all tickets in sample

sum sattr• Sum of the sattr values for all tickets in sample

Page 75: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Graph Attributes

• The attribute parameter specifies the attribute which assigns each ticket to a sample bucket.

• If your x axis type is date-related, you need to use a date attribute.graph line count all resolved

Page 76: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Graph Options

-color list• List of colors to use for graph elements.

• Use X color names or #rrggbb.

-label string• Set the graph element label for the legend area.

-y2• Plot to the y2 axis.

Page 77: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Graphing Multiple Elements

• Place one graph statement per element you wish to appear on the same graph.

• When the graph is complete, end it:end [-keep]

• Use the -keep option to keep the selected set of tickets from the previous graph to use on the next one. This avoids selecting the same tickets all over again.

Page 78: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

R EQ AD M 1.2_BETA_P10 / G EN ER ATED 04 FEB 2000 14:10:23

(R EQ UEST Q UEUE O N LY)

EC M ade C om m its

TIC KETS R ESO LVED % M ade Com m its G oal

W ork W eek

Mad

e C

om

mits

Num

ber of T

ickets

W W 45 W W 46 W W 47 W W 48 W W 49 W W 50 W W 51 W W 52 W W 01 W W 02 W W 03 W W 04 W W 05 W W 060%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

0

82

164

246

328

410

492

574

656

738

820

Page 79: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

select resolved from \

”13 weeks ago” queue request

graph bar count all resolved \

-y2 -label ”TICKETS RESOLVED”

graph line ratio ontime \

resolved -label ”% Made Commits”

graph const .95 -label Goal

end

Page 80: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

R EQ AD M 1.2_BETA_P10 / G EN E R ATED 04 FEB 2000 15:32:46

ALL Q U EU ES

C urrently-O pen R equest P riorities

U R G EN T (41)h igh (104)m edium (439)low (62)

Page 81: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

x values -sort -exec prioritySort

select status open

graph pie count all priority \

-color {red yellow green blue}

end

Page 82: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Hints

• Elements are plotted in the order specified.– If you plot lines and bars together, plot the bars

first, so the lines will go “on top” of the bars (otherwise they’re hard to see).

Page 83: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Stacked Bar Elements

• Mostly like bar elements, but each bar contains “subsamples” showing proportions of components making up the full bar

• For example, change the bar graph of tickets resolved per week– Each week’s bar broken into request priorities– See how many of each priority were resolved

Page 84: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Stacked Bar Graph Options

-colormap {sampID color sampID color…}• Map specific colors to specific subsamples in the

bars.

• Use X color names or #rrggbb.

-subattr attr• Specify attribute used for subsamples in each bar.

-subvalues• Use actual value of attr as the sample ID, rather

than a date-based translation of it.

Page 85: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Stacked Bar Graph Options

-sublabel labelspec• Use this instead of -label to set legend keys

%h Month from sample ID (“Jan”, “Feb”, etc.)

%d Date from sample ID (“01”, “02”, etc.)

%H Hour from sample ID (“00”, “01”, etc.)

%k Intel work week from sample ID (“01”, “02”, etc.)

%K Intel work year from sample ID (“Jan”, “Feb”, etc.)

%Q Quarter from sample ID (“1”, “2”, etc.)

%W Week number from sample ID (Monday-based)

%U Week number from sample ID (Sunday-based)

%% Percent sign (“%”)

Page 86: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

select resolved from \

”13 weeks ago” queue request

graph stacked count all resolved \

-y2 -subattr priority -subvalues

graph line ratio ontime \

resolved -label ”% Made Commits”

graph const .95 -label Goal

end

Page 87: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

R EQ AD M 1.2_BETA_P10 / G EN ER ATED 05 FEB 2000 20:32:46

(R EQ UEST Q UEUE O N LY)

EC M ade C om m its

H IG H low m edium

urgent % M ade C om m its G oal

W ork W eek

Mad

e C

omm

itsN

umber of T

ickets

W W 46 W W 47 W W 48 W W 49 W W 50 W W 51 W W 52 W W 01 W W 02 W W 03 W W 04 W W 05 W W 060%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

0

82

164

246

328

410

492

574

656

738

820

Page 88: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Performance Hints

• Avoid selection criteria category and type

• Unless you exclude closed requests, or ask for at least one date-related criterion, or a single non-wild-carded owner or submitter, the client will have to select a larger number of tickets to be downloaded and filtered at the client side, which may take longer.

Page 89: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Performance Hints

• Avoid using the following ticket attributes:body catdesc categorycclist eventlist full-

eventlist

fromname fromuser ownername

owneruser requestedBy timescore

type

• Try to group similar charts together and keep a common selection for all of them.

Page 90: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Advanced Queries

• Query language actually much more advanced and flexible than we’ve shown yet.

• Many more sophisticated kinds of charts and queries possible, but require a bit more work to get.

• Once working set is selected, you can analyze any attributes in any manner, even using external databases or services.

Page 91: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Query Syntax

• But first, let’s cover some ground rules about what you can put into a query.

• Query is a series of statements.

• Statements are a series of words separated by semicolons (“;”) or newlines.

• Words are separated from each other by spaces and/or tabs.

Page 92: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Query Syntax

• If the first character of the first word in a statement is an octothorpe1 (“#”), the remainder of the line is considered to be a comment and is ignored.– Anyplace else they have no special meaning.– To add a comment after a statement, separate them with

a semicolon:title ”Q1 2000”; #set title for chart

1A.k.a. “pound sign”, “sharp”, “pound”, “hash”, “tic-tac-toe”, etc. Betcha didn’t know it had an official name, eh? It’s the only character name sillier than “ampersand” if you ask me...

Page 93: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Query Syntax

• Long statements may be continued on multiple lines

• If the last character on a line is a backslash (“\”), the newline doesn’t count as a statement separator (just a normal word delimiter).

• Beware:– Must really be the last character (no spaces)– Even comment lines are continued this way

Page 94: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Query Syntax

• Text strings (titles, attribute names, dates, etc.) do not need to be in quotes unless they contain special characters or spaces).

• Two kinds of quotes are available:– ”Double quotes”

• Interpolation allowed

– {Curly braces}• Literal text, no interpolation

• Great for list parameters (they can nest)

Page 95: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Query Syntax

• “Interpolation” allows substitution of certain special symbols in a statement before it is executed.– $name interpolates the value of a variable– [statement] executes the statement,

substituting it with the result it produces.– \char is replaced by a special character:

•\n \b \r \t \[ \$ \\ \” etc.

Page 96: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Variables

• You may use variables to hold data temporarily while building a query and analyzing data.set user ”steve”

set month 1

set tickets {12345 12370 12398}

• Read the value of a variable by interpolation:set x $y

Page 97: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Conditionals

• Conditional execution via the “if” statement:if expression statement [else statement]

if {$var < 200} {

# do something…

} else {

# do something else…

}

Page 98: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Other Flow Control

• All the standard programming features:while expression statements

foreach var list statements

for setup expression increment statements

proc varlist statements

Page 99: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Naming Rules

• To avoid colliding with internal values used by reqadm-report, don’t name your procedures or variables:– Anything starting with RA__– TicketData– TicketList– date_adj– Any other pre-defined name mentioned in the

reqadm-report documentation.

Page 100: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Advanced Axis Configuration

• You can customize the sampling of tickets for the x axis by using these options to the x statement:-custom formula

• Alternative to the standard samples (“weekly”, etc)

• Formula is a series of characters indicating conversions between the significant dates of the tickets and sample bucket ID codes.

• Specific conversion codes detailed in documentation

Page 101: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Advanced Axis Configuration

-sort -exec statements• Custom sorting specification. Statements (generally

the name of a defined procedure) executed with two arguments; return value determines sort order of those two arguments.

-sort -exec prioritySort• Pre-defined routine to sort priority codes in order

from urgent to low.

Page 102: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Advanced Axis Configuration

-ticklabel -exec statements• The statements are executed to determine the

sample label to be placed on each ticket.

• The following codes are expanded in the statements:%# Replaced with the ticket number.

%S Replaced with the sample ID for this set of tickets.

Page 103: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Advanced Graphing

graph style type -sample statements• The statements are executed to determine the

sample in which to place each ticket, rather than dropping into sample buckets by date attribute.

• Return a list of sample IDs to which the ticket should belong.

• The following code is expanded in the statements:%# Replaced with the ticket number.

Page 104: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Advanced Graphing

sampleRange attrlist ticketnumber [options]• Pre-defined statement to return a list of samples

during which the specified attributes in attrlist are true.

• Options:-all All samples from submission to now.

-min dt The date dt is the earliest to consider.

-max dt The date dt is the latest to consider.

Page 105: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Advanced Graphing

-if statements• Consider a ticket to belong to the sample only if the

statements return true.• The following symbols are substituted in the statements:

%# The ticket number being examined.

%S The current sample ID.

-value statements• Rather than sample the actual attribute value, execute the

statements and use their return value as the sampled value for the graph.

Page 106: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Advanced Graphing

-subsample statements• For stacked bar elements, execute the statements to

determine which tickets belong in each subsample.

Page 107: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Built-In Procedures

requestAttr ticket attr [-date]• Return the value of the specified attribute from the named ticket.

• Attributes include:body flags

catdesc [level] from fromname fromuser

category importance

cclist is...

closed newnumber newqueue

due number

eventlist ontime overdue

full-eventlist owner ownername owneruser

Page 108: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Built-In Procedures

prioritySort a b• Used as a sort procedure.

• Returns a negative number if a is a priority name of greater urgency than b, positive if a is lower than b, or zero if they are equal.

Page 109: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Built-In Procedures

expandTokens pattern date• Expand %-tokens in the pattern string based on the

supplied date value.

event attr list• Extract the specified event attribute from the list of

values, such as those returned by [requestAttr eventlist]

priorityLabel ticket attr• Convert ticket’s priority to form suitable for use with

the -subsample graphing option.

Page 110: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Built-In Procedures

CONFIG tag• Retrieve the value of the given configuration tag from the

reqadm.conf file on the server.

getSystemTypeList

firstSystemName type

nextSystemName• Get lists of known platform types and hostnames

username id

fullname idConvert ID number to username or full name.

Page 111: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Built-In Procedures

getOwnerList

getRotationList

getQueueList• Get lists of known request owners, groups and

queues.

Page 112: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

R EQ AD M 1.2_BETA_P10 / G EN ER ATED 04 FEB 2000 15:21:01

TO P-LEVEL PR O BLEM TYPES

Top 10 R oot-C ause C ategories by Volum e

TIC KETS R ESO LVED W W 02 2000 Tickets R esolved W W 03 2000 Tickets R esolved W W 04 2000

Tickets R esolved W W 05 2000 Tickets R esolved W W 06 2000

N etw ork/In ternet

M obile C om puting/R em ote Access

M ail/cc:M ail

R equest Adm in istra tion

U N IX W orkstation/X term inal

M icrosoft W indow s

Applications/C om m ands

Logistics

Account A dm in istra tion

Fileserver/D isk M anagem ent

0 50 100 150 200 250 300 350 400 450 500

Page 113: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Example Graph

x values -top 10 -flip -sort -values

graph stacked count all -sample {

list [list [requestAttr %# {catdesc 1}]]

} -subcustom Kk -sublabel \

”Tickets Resolved WW%k %K” \

-subattr resolved

end

Page 114: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Another Example

• Measure “first touch” resolution: how many tickes were only assigned once?

• For each ticket, retrieve its event history and count how many assignments you find.

Page 115: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

First Touch Resolution

title ”First Touch Resolution”

subtitle ”(Assigned to only 1 non-group)”

proc 1st_touch ticket {

set count 0

foreach e [requestAttr $ticket eventlist] {

if {[event type $e] == ”assignment”

&& [string range [event towhom $e] 0 0] != ”G”} {

incr count

}

}

return [expr $count < 2]

}

Page 116: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

First Touch Resolution

x iweekly -label ”Work Week”

y % -label ”First Touch”

y2 -label ”Request Tickets”

select resolved from {13 weeks ago}

graph line ratio all resolved -if {1st_touch $#} \

-label ”% First Touch”

graph line count all resolved \

-label ”Total Resolved Tickets” -y2

graph const .9 -label Goal

end

Page 117: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

First Touch Resolution

R EQ AD M 1.2_BETA_P10 / G EN ER ATED 05 FEB 2000 20:43:05

(ASSIG N ED TO O N LY 1 N O N-G RO U P)

First Touch R esolution

% FIRST TO UCH Total R esolved Tickets G oal

W ork W eek

Fir

st T

ouch

Req

uest Tickets

W W 46 W W 47 W W 48 W W 49 W W 50 W W 51 W W 52 W W 01 W W 02 W W 03 W W 04 W W 05 W W 060%

10%

20%

30%

40%

50%

60%

70%

80%

90%

100%

0

94

188

282

376

470

564

658

752

846

940

Page 118: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Employee Statistics

• For each system administrator, what is the frequency of tickets they resolve on time?

• Set up a loop of each request owner, and plot a new graph for each, showing total tickets resolved by them and how many were on time.

Page 119: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Employee StatisticsSelect resolved between 1/1/99 and 1/1/00

foreach owner [getOwnerList] {

set wwid [lindex $owner 0]

title ”1999 Request Statistics”

subtitle [fullname $wwid]

x iweekly -label {Work Week}

y -label {Tickets Resolved}

filter owner $wwid

graph bar count all resolved -color blue \

-label {Total tickets resolved}

graph line count overdue resolved -color red \

-label {Tickets resolved late}

end -keep

}

Page 120: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Employee Statistics

R EQ ADM 1.2_BETA_P10 / G EN ER ATED 24 JAN 2000 18:49:35

J. R AN D O M PEN C ILPU SH ER

1999 R equest S tatistics

TO TAL T IC KETS R ESO LVED Tickets reso lved la teW ork W eek

Tic

kets

Res

olve

d

W W 02 W W 03 W W 04 W W 05 W W 06 W W 07 W W 08 W W 09 W W 10 W W 11 W W 12 W W 13 W W 14 W W 15 W W 16 W W 17 W W 18 W W 19 W W 20 W W 21 W W 22 W W 23 W W 24 W W 25 W W 26 W W 27 W W 28 W W 29 W W 30 W W 31 W W 32 W W 33 W W 34 W W 35 W W 36 W W 37 W W 38 W W 39 W W 40 W W 41 W W 42 W W 43 W W 44 W W 45 W W 46 W W 47 W W 48 W W 49 W W 50 W W 51 W W 52 W W 01

0

13

26

39

52

65

78

91

104

117

130

Page 121: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Raw Data Dumps

• Rather than analyzing the ticket data, you can simply “dump” fields of your selected tickets to a CSV file.

• Import to spreadsheets or other reporting tools for further analysis

• First, select a working set of tickets in the usual way.

Page 122: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Raw Data Dumps

• Then, rather than graphing anything, simply use the dump statement:dump reportname [options]

-comments– Include comments in output file describing contents

-events– Include the ticket event history in the CSV file

-fields list– Specify which fields to export for each ticket

-text– Include full request body text in CSV file

Page 123: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Raw Data Dumps

• No sampling or analysis is done, so no axis setup statements.

• Example:select status open

dump rep1 -fields {queue number priority owner due} -comments

end

Page 124: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Raw Data Dumps

###########################################################GENERATED-BY: REQADM 1.2_beta_p10 / Generated 05 Feb 2000 #TITLE: #SUBTITLE: #DATASET: rep1#FIELDS: queue number priority owner due##########################################################request,126456,medium,P10072347,02/03/2000 14:14:55request,126142,high,G2027,01/27/2000 16:13:45request,108636,medium,P10580084,10/05/1999 23:59:59request,119806,low,P10566404,11/20/1999 11:45:37project,31628,medium,P10503190,09/08/1997 18:21:54

Page 125: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing

Documentation Available

• Manpages– reqadm-report(1)

• Full description of the tool and query language

– reqadm-report(5) • Description of file formats produced by reqadm-

report.

– Also available under “manpages” in the REQADM web help area.

• Tcl language reference books.

Page 126: Generating Reports with REQADM 1.2 Steve Willoughby PMD Engineering Computing