File: stats.xml

package info (click to toggle)
otrs2-doc 20120224-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 36,060 kB
  • sloc: xml: 57,412; sh: 126; makefile: 12
file content (1079 lines) | stat: -rw-r--r-- 37,540 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<!-- $Id: stats.xml,v 1.13 2011/07/27 14:25:57 mg Exp $ -->

<chapter id="statistic-module">
<title>Stats module</title>

<para>
The OTRS stats module holds features to track operational statistics and generate custom reports associated with OTRS usage. The OTRS system uses the term "stat" generically to refer to a report presenting various indicators.
</para>

<para>
Proper configuration of the OTRS stats module is associated with a multitude of requirements and considerations. These include the various OTRS modules to be evaluated, user permission settings, indicators to be calculated and their complexity levels, ease of configuration of the stats module, speed and efficiency of calculations, and support of a rich set of output variants.
</para>

<para>
Statistical elements, i.e. files which supplement the functionality of the stats module for specific requirements, can be integrated for calculating complex statistics.
</para>

<section id="stats-usage" >
<title>Handling of the module by the agent</title>

<para>
When signed on as an agent, the navigation bar displays the link "Statistics". This has various submenu options, as shown in Figure.
</para>

<para>
<screenshot>
<screeninfo>The stats module</screeninfo>
<graphic fileref="screenshots/stats-menu.png" scale="40" srccredit="stats-menu - Screenshot" />
</screenshot>
</para>

<para>
<emphasis>Figure: Statistics menu options.</emphasis>
</para>

<para>
The different options provided in the statistics menu are:
</para>

<para>
<itemizedlist>
    <listitem>
        <para>
            <emphasis>Overview</emphasis>. Presents a list of different pre-configured reports.
        </para>
    </listitem>
    <listitem>
        <para>
            <emphasis>New</emphasis>. Requires rw rights.
        </para>
    </listitem>
    <listitem>
        <para>
            <emphasis>Import</emphasis>. Requires rw rights.
        </para>
    </listitem>
</itemizedlist>
</para>

<section id="stats-overview" >
<title>Overview</title>

<para>
Selecting the "Statistics" link in the navigation bar, and then the submenu link "Overview", calls up the Overview screen. The Overview screen presents a list of all pre-configured reports the agent can use (see Figure below).

</para>

<para>
<screenshot>
<screeninfo>Overview of the standard reports</screeninfo>
<graphic fileref="screenshots/stats-overview.png" scale="40" srccredit="stats-overview - Screenshot" />
</screenshot>
</para>

<para>
<emphasis>Figure: Overview of the standard reports.</emphasis>
</para>

<para>
The following information is provided for each of the standard reports listed in the Overview:
</para>

<para>
<itemizedlist>
    <listitem>
        <para>
            <emphasis>Stat#</emphasis>. Unique report number.
        </para>
    </listitem>
    <listitem>
        <para>
            <emphasis>Title</emphasis>. Title of the report.
        </para>
    </listitem>
    <listitem>
        <para>
            <emphasis>Object</emphasis>. Object used for generating the statistic. In the case of a static statistic, no object is displayed as no dynamic object is used for its generation.
        </para>
    </listitem>
    <listitem>
        <para>
            <emphasis>Description</emphasis>. A brief description of the report.
        </para>
    </listitem>
</itemizedlist>
</para>

<para>
When the stats module is installed, it comes preloaded with a few sample reports imported into the system. These are shown as a list on the Overview page. If the Overview list extends to more than a single page, the agent can browse through the different pages. The list of reports can be sorted as desired, by clicking the desired column header in the list. To generate a particular report, click on the stat number associated with the report in the Overiew list. This brings up the "View" interface for the report.
</para>

</section>

<section id="stats-viewing-generating">
<title>Generate and view reports</title>

<para>
The view user interface provides the stat's configuration settings (see Figure below).
</para>

<para>
<screenshot id="stats-view-screenshot" >
<screeninfo>Stat view</screeninfo>
<graphic fileref="screenshots/stats-view.png" scale="40" srccredit="stats-view - Screenshot" />
</screenshot>
</para>

<para>
<emphasis>Figure: Viewing a specific report.</emphasis>
</para>

<para>
Configuration settings for a particular report can be set within the range of options in the View screen. Either the report creator or any others with the appropriate permissions can make the settings.
</para>

<para>
The page shows the following:
</para>

<para>
<itemizedlist>
    <listitem>
        <para>
        Possible actions:
        </para>

        <para>
        <itemizedlist>
            <listitem>
                <para>
                    <emphasis>Go to overview</emphasis>. Link back to the Overview list of reports.
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>Edit</emphasis>. Edit the current report structure (rw rights required).
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>Delete</emphasis>. Delete the current report (rw rights required).
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>Export config</emphasis>. Export a report configuration, via file download (rw rights required).
                </para>

                <para>
                    Usage: Export and Import functions allow for the convenient creation and testing of reports on test systems and subsequent easy integration into the production system.
                </para>
            </listitem>
        </itemizedlist>
        </para>
    </listitem>
    <listitem>
        <para>
        Report details:
        </para>
        <para>
        <itemizedlist>
            <listitem>
                <para>
                    <emphasis>Stat#</emphasis>. Number of the report.
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>Title</emphasis>. Title of the report.
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>Object</emphasis>. Object used for generating the report.
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>Description</emphasis>. Description on the report's purpose.
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>Format</emphasis>. Report output format which, depending on the configuration, can be any of the following output formats:
                </para>
                <para>
                <itemizedlist>
                    <listitem>
                        <para>
                        CSV.
                        </para>
                    </listitem>
                    <listitem>
                        <para>
                        Print.
                        </para>
                    </listitem>
                    <listitem>
                        <para>
                        Graph-lines.
                        </para>
                    </listitem>
                    <listitem>
                        <para>
                        Graph-bars.
                        </para>
                    </listitem>
                    <listitem>
                        <para>
                        Graph-hbars.
                        </para>
                    </listitem>
                    <listitem>
                        <para>
                        Graph-points.
                        </para>
                    </listitem>
                    <listitem>
                        <para>
                        Graph-lines-points.
                        </para>
                    </listitem>
                    <listitem>
                        <para>
                        Graph-area.
                        </para>
                    </listitem>
                    <listitem>
                        <para>
                        Graph-pie.
                        </para>
                    </listitem>
                </itemizedlist>
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>Graphsize</emphasis>. Size in pixels for the graphic / chart. This option is only given when the report configuration allows a chart. All generally usable graphic sizes are configured by the OTRS administrator in SysConfig. The agent can then pre-select all relevant formats, while configuring the report.
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>Sum rows</emphasis>. Indicates whether the report is amended by a column, whose cells state the sums of the respective rows.
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>Sum columns</emphasis>. Indicates whether the report is amended by a row, whose cells state the sum of the respective columns.
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>Cache</emphasis>. Indicates whether the generated report is cached in the filesystem.
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>Valid</emphasis>. This can be set to "invalid" if a report must not be run temporarily for any reason. The "Start" button in the bottom of the right panel is then no longer displayed. The report can no longer be generated.
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>Created</emphasis>. Creation time of the report.
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>Created by</emphasis>. Name of the agent who created the report.
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>Changed</emphasis>. Time when the report was last modified.
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>Changed by</emphasis>. Name of the agent who altered the report last.
                </para>
            </listitem>
            <listitem>
                <para>
                    <emphasis>X-axis</emphasis>. Using this function, the agent can switch the x and y axes (only when activated by the OTRS administrator).
                </para>
            </listitem>
            <listitem>
                <para>
                The general information is followed by information about the report itself. There are two different report (or stat) views:
                </para>
                <para>
                <itemizedlist>
                    <listitem>
                        <para>
                            <emphasis>Static stat view</emphasis>. Static report generators can be integrated into the stats module (see Figure below).
                        </para>
                        <para>
                        <screenshot>
                        <screeninfo>Static stat view</screeninfo>
                        <graphic fileref="screenshots/stats-view-static.png" scale="40" srccredit="stats-view-static - Screenshot" />
                        </screenshot>
                        </para>
                        <para>
                            <emphasis>Figure: Viewing a static report.</emphasis>
                        </para>
                    </listitem>
                    <listitem>
                        <para>
                            <emphasis>Dynamic stat view</emphasis> (see Figure above). They can be displayed in two different ways:
                        </para>
                        <para>
                        <itemizedlist>
                            <listitem>
                                <para>
                                    <emphasis>Unchangeable settings</emphasis>. The originator of the report has no permission for modifying this fields.
                                </para>
                            </listitem>
                            <listitem>
                                <para>
                                    <emphasis>Changeable settings</emphasis>. The configuration settings of such reports can be changed by the agent.
                                </para>
                            </listitem>
                        </itemizedlist>
                        </para>
                    </listitem>
                </itemizedlist>
                </para>
            </listitem>
        </itemizedlist>
        </para>
    </listitem>
</itemizedlist>
</para>

<para>
Pressing the "Start" button (at the bottom of the screen) is the last step to generate the report. There are two possible reasons for this button to not be displayed:
</para>

<para>
<orderedlist numeration="arabic" >
    <listitem>
        <para>
        The report was set to invalid and thus, deactivated.
        </para>
    </listitem>
    <listitem>
        <para>
        The report was not configured cleanly and is, therefore, not yet executable. In this case, the necessary information can be found in the OTRS notification section (below the navigation bar).
        </para>
    </listitem>
</orderedlist>
</para>

<para>
If the settings on the View page are incorrect, this page is shown again after the "Start" button was pushed, and information about which input was incorrect is provided in the notification section.
</para>
</section>

<section id="stats-modify-new">
<title>Edit / New</title>

<para>
Agents with write rights can edit an existing report configuration by calling up the edit user interface of the stats module. Alternately, they may create a new report. The associated screens can be reached in the following manner:
</para>

<para>
<orderedlist numeration="arabic">
<listitem>
    <para>
    Edit: Via the "Edit" button in the stat view.
    </para>
</listitem>
<listitem>
    <para>
    New: Via the "New" link in the Statistics menu from the navigation bar, or the "Add" button from the Overview page.
    </para>
</listitem>
</orderedlist>
</para>

<para>
The stats are edited with a wizard in four steps:
</para>

<para>
<orderedlist numeration="arabic">
<listitem>
    <para>
    General specifications.
    </para>
</listitem>
<listitem>
    <para>
    Definition of the element for the X-axis.
    </para>
</listitem>
<listitem>
    <para>
    Specification of the value series.
    </para>
</listitem>
<listitem>
    <para>
    Selecting the restrictions to limit the report.
    </para>
</listitem>
</orderedlist>
</para>

<para>
Steps 2 through 4 are only needed for the generation of reports with dynamic stats. For a static stat, only the general information (point 1) is required.
</para>

<para>
Information about how to handle the page is provided on each of these screens, below the Actions panel in a Hints panel.
</para>

<para>
If incorrect inputs are entered, the previously processed user interface is displayed again and with information about the incorrect input. This information can be found in the OTRS notification section. The next input user interface is only displayed after the current form has been filled out correctly.
</para>

<para>
<orderedlist numeration="arabic" >
<listitem>
    <para>
        <emphasis>General specifications</emphasis>. It is the first page of the Edit wizard (see Figure below).
    </para>

    <para>
    <screenshot>
    <screeninfo>General specifications</screeninfo>
    <graphic fileref="screenshots/stats-edit-general.png" scale="40" srccredit="stats-edit-general - Screenshot" />
    </screenshot>
    </para>

    <para>
        <emphasis>Figure: Editing the general specifications of a report.</emphasis>
    </para>


    <para>
        In the screen showed in Figure, there are a great number of common specifications and settings that can be edited:
    </para>

    <para>
    <itemizedlist>
        <listitem>
            <para>
                <emphasis>Title</emphasis>. Should reflect the stat's purpose in a concise manner.
            </para>
        </listitem>
        <listitem>
            <para>
                <emphasis>Description</emphasis>. More descriptive information about the report definition, type of configuration parameters, etc.
            </para>
        </listitem>
        <listitem>
            <para>
                <emphasis>Dynamic object</emphasis>. If the OTRS installation provides various dynamic objects, one of them can be chosen. The objects meet the requirements of the particular modules.
            </para>
        </listitem>
        <listitem>
            <para>
                <emphasis>Static file</emphasis>. Usually this selection is not shown, as only static files which are not yet assigned to any reports are displayed. If "Static file" is displayed, however, it is important to tick the option field and select a generation mode (dynamic with a dynamic object or static with a file). If a static file is selected, the input user interfaces 2 through 4 are not shown as the static file contains all required configuration settings.
            </para>
        </listitem>
        <listitem>
            <para>
                <emphasis>Permission settings</emphasis>. Facilitate a restriction of the groups (and therefore, agents) who can later view and generate the preconfigured reports. Thus the various reports can be allocated to the different departments and work groups who need them. It is possible to allocate one report to various groups.
            </para>

            <para>
                Example 1: The "stats" group was selected. The report is viewable for all users having at least ro rights for the "stats" group. This access is available by default.
            </para>

            <para>
                Example 2: A group named "sales" was selected. All users with ro rights for the "sales" group can see the stat in the view mode and generate it. However, the report will not be available for viewing by other users.
            </para>
        </listitem>
        <listitem>
            <para>
                <emphasis>Format</emphasis>. Output format of the stat: Depending on the configuration, one or more of the following formats can be chosen:
            </para>

            <para>
            <itemizedlist>
                <listitem>
                    <para>
                        CSV.
                    </para>
                </listitem>
                <listitem>
                    <para>
                        Print.
                    </para>
                </listitem>
                <listitem>
                    <para>
                        graph-lines.
                    </para>
                </listitem>
                <listitem>
                    <para>
                        graph-bars.
                    </para>
                </listitem>
                <listitem>
                    <para>
                        graph-hbars.
                    </para>
                </listitem>
                <listitem>
                    <para>
                        graph-points.
                    </para>
                </listitem>
                <listitem>
                    <para>
                        graph-lines-points.
                    </para>
                </listitem>
                <listitem>
                    <para>
                        graph-area.
                    </para>
                </listitem>
                <listitem>
                    <para>
                        graph-pie.
                    </para>
                </listitem>
            </itemizedlist>
            </para>
        </listitem>
        <listitem>
            <para>
                <emphasis>Graphsize</emphasis>. Select the chart size in pixels. This selection is only necessary if a graphical output format has been chosen under "Format". All graphic sizes that can generally be used are defined by the OTRS administrator in SysConfig. When configuring the report, the agent can pre-select all relevant formats.
            </para>
        </listitem>
        <listitem>
            <para>
                <emphasis>Sum rows</emphasis>. Indicates whether the report is amended by a column, whose cells contain the sum of the respective row.
            </para>
        </listitem>
        <listitem>
            <para>
                <emphasis>Sum columns</emphasis>. Indicates whether the report is amended by a row, whose cells contain the sum of the respective column.
            </para>
        </listitem>
        <listitem>
            <para>
                <emphasis>Cache</emphasis>. Specifies if the generated report should be cached in the filesystem. This saves computing power and time if the report is called up again, but it should only be used if the report's content is no longer changing.
            </para>

            <para>
                Caching is automatically prevented if the report contains no time designation values, or if a time designation value points to the future.
            </para>

            <para>
                If a cached report is edited, all cached data is deleted.
            </para>
        </listitem>
        <listitem>
            <para>
							<emphasis>Valid</emphasis>. This can be set to "invalid" if a pre-configured report must not be run temporarily for any reason. The "Start" button in the bottom of the right panel is then no longer displayed. The report can no longer be generated.
            </para>
        </listitem>
    </itemizedlist>
    </para>
</listitem>
<listitem>
    <para>
        <emphasis>Definition of the element for the X-axis</emphasis>. It is the configuration of the element used for the depiction of the X-axis or, if tables are used, of the column name applied to the X-axis (see Figure).
    </para>

    <para>
    <screenshot>
    <screeninfo>Definition of the element for the X-axis.</screeninfo>
    <graphic fileref="screenshots/stats-edit-xaxis.png" scale="40" srccredit="stats-edit-xaxis - Screenshot" />
    </screenshot>
    </para>

    <para>
        <emphasis>Figure: Definition of the element for the X-axis.</emphasis>
    </para>

    <para>
    First of all, an element is selected using the option field. Then two or more attributes of the element must be selected. If no attributes are selected, all attributes are used including those added after the configuration of the report.
    </para>

    <para>
    If the "Fixed" setting is disabled, the agent generating the report can change the attributes of the respective element in the "View" user interface.
    </para>

    <para>
    Time elements are different as time period and scale have to be stated. Type and number of elements result from the used dynamic object and vary depending on it.
    </para>

    <para>
    If all input is correct, the "Next" button leads to the "Value series" form. It is also possible to go back to editing earlier sections.
    </para>
</listitem>
<listitem>
    <para>
        <emphasis>Specification of the value series</emphasis>.
    </para>

    <para>
    In the third step of the report configuration, the value series are defined (see Figure below). They will later form the individual graphs or the various series within a tabular view.
    </para>

    <para>
    <screenshot>
    <screeninfo>Definition of the value series</screeninfo>
    <graphic fileref="screenshots/stats-edit-valueseries.png" scale="40" srccredit="stats-edit-valueseries - Screenshot" />
    </screenshot>
    </para>

    <para>
        <emphasis>Figure: Definition of the value series.</emphasis>
    </para>

    <para>
    If an element is selected, each chosen attribute will correspond to a value series (see the Example 19-1 below).
    </para>

    <para>
    <example id="stats-value-series-1">
    <title>Definition of a value series - one element</title>

    <para>
    Element Queue:
    </para>

    <para>
    <itemizedlist>
        <listitem>
            <para>
            Value series 1 = Raw
            </para>
        </listitem>
        <listitem>
            <para>
            Value series 2 = Junk
            </para>
        </listitem>
        <listitem>
            <para>
            ....
            </para>
        </listitem>
    </itemizedlist>
    </para>
    </example>
    </para>

    <para>
    If two elements are selected, each selected attribute of the first element is combined with an attribute of the second element to form a value series (see Example 19-2 below).
    </para>

    <para>
    <example id="stats-value-series-2" >
    <title>Definition of a value series - two elements </title>

    <para>
    Element 1 queue, Element 2 status:
    </para>

    <para>
    <itemizedlist>
        <listitem>
            <para>
            Value chain 1 = Raw - open
            </para>
        </listitem>
        <listitem>
            <para>
            Value series 2 = Raw - successfully closed
            </para>
        </listitem>
        <listitem>
            <para>
            Value series 3 = Junk - open
            </para>
        </listitem>
        <listitem>
            <para>
            Value series 4 = Junk - successfully closed
            </para>
        </listitem>
    </itemizedlist>
    </para>
    </example>
    </para>

    <para>
    Selection of three or more elements is not allowed.
    </para>

    <para>
    Additionally the same conditions apply to the selection of the attributes and the "Fixed" checkbox as to the "X-axis" selection:
    </para>

    <para>
    <itemizedlist>
        <listitem>
            <para>
            If no attributes of the element are selected, all attributes are used, including those added after the configuration of the report.
            </para>
        </listitem>
        <listitem>
            <para>
            If the "Fixed" setting is disabled, the agent generating the report can change the attributes of the respective element.
            </para>
        </listitem>
    </itemizedlist>
    </para>
</listitem>
<listitem>
    <para>
        <emphasis>Setting restrictions to the report</emphasis>. This is the fourth and final step of the configuration (see Figure below). The restrictions serve to limit the results to the selected criteria. In many cases, no restrictions at all may be set up.
    </para>

    <para>
    <screenshot>
    <screeninfo>Definition of restrictions</screeninfo>
    <graphic fileref="screenshots/stats-edit-restrictions.png" scale="40" srccredit="stats-edit-restrictions - Screenshot" />
    </screenshot>
    </para>

    <para>
        <emphasis>Figure: Definition of restrictions.</emphasis>
    </para>

    <para>
    After all the restrictions are set up, the configuration of the report is completed by pressing the "Finish" button.
    </para>
</listitem>
</orderedlist>
</para>
</section>

<section id="stats-import">
<title>Import</title>

<para>
The Import user interface (see Figure below) can be accessed by choosing from the navigation bar, the link "Statistics", then "Import". Alternately, pressing the Import button on the Overview screen achieves the same result. "rw" rights to the report are required.
</para>

<para>
<screenshot>
<screeninfo>The Import user interface</screeninfo>
<graphic fileref="screenshots/stats-import.png" scale="40" srccredit="stats-import - Screenshot" />
</screenshot>
</para>

<para>
    <emphasis>Figure: The Import user interface.</emphasis>
</para>

<para>
Facilitates the import of reports and is, when combined with the export function of the module, a very handy functionality. Stats can be created and tested conveniently on test systems, then imported into the production system.
</para>

<para>
The import is effected by an easy file upload. The "View" user interface of the imported report is opened automatically afterwards.
</para>
</section>

</section>

<section id="stats-managing-the-module">
<title>Administration of the stats module by the OTRS administrator</title>

<para>
This section provides information about the tasks and responsibilities of the OTRS administrator dealing with the statistics module.
</para>

<section id="stats-permissions" >
<title>Permission settings, Groups and Queues</title>

<para>
No new queues and/or groups are created when the stats module is installed.
</para>

<para>
The default configuration of the module registration gives all agents with "stats" group permissions access to the stats module.
</para>

<para>
Access according to permission settings:
</para>

<para>
<itemizedlist>
    <listitem>
        <para>
            <emphasis>rw</emphasis>. Allows configuring statistics and reports.
        </para>
    </listitem>
    <listitem>
        <para>
            <emphasis>ro</emphasis>. Permits generating pre-configured statistics and reports.
        </para>
    </listitem>
</itemizedlist>
</para>

<para>
The OTRS administrator decides whether agents with the permission to generate pre-configured reports are allocated ro rights in the "stats" group, or if their respective groups are added in the module registration in SysConfig.
</para>
</section>

<section id="stats-sysconfig" >
<title>SysConfig</title>

<para>
The SysConfig groups <link linkend="Framework:Core::Stats">Framework:Core::Stats</link>, <link linkend="Framework:Core::Stats::Graph">Framework:Core::Stats::Graph</link> and <link linkend="Framework:Frontend::Agent::Stats">Framework:Frontend::Agent::Stats</link> contain all configuration parameters for the basic set-up of the statistics module. Moreover, the configuration parameter <link linkend="Framework:Frontend::Agent::ModuleRegistration:Frontend::Module_AgentStats">$Self-&gt;{'Frontend::Module'}-&gt;{'AgentStats'}</link> controls the arrangement and registration of the modules and icons within the statistics module.
</para>
</section>

</section>

<section id="stats-managing-the-stats-module-by-the-sysadmin" >
<title>Administration of the stats module by the system administrator</title>

<para>
Generally, no system administrator is needed for the operation, configuration and maintenance of the statistics module. However, a little background information for the system administrator is given at this point.
</para>

<note>
<para>
File paths refer to subdirectories of the OTRS home directory (in most cases<filename>/opt/otrs</filename>).
</para>
</note>

<section id="stats-db-table" >
<title>Data base table</title>

<para>
All report configurations are implemented and administrated in XML, and therefore stored in the database table
"xml_storage". Other modules whose content is presented in xml format use this table as well.
</para>

</section>

<section id="stats-filelist" >
<title>List of all files</title>

<para>
The following files are necessary for the stats module to work accurately:
</para>

<para>
<itemizedlist>
    <listitem>
        <para>
        <filename>Kernel/System/Stats.pm</filename>
        </para>
    </listitem>
    <listitem>
        <para>
        <filename>Kernel/Modules/AgentStats.pm</filename>
        </para>
    </listitem>
    <listitem>
        <para>
        <filename>Kernel/System/CSV.pm</filename>
        </para>
    </listitem>
    <listitem>
        <para>
        <filename>Kernel/Output/HTML/Standard/AgentStatsOverview.dtl</filename>
        </para>
    </listitem>
    <listitem>
        <para>
        <filename>Kernel/Output/HTML/Standard/AgentStatsDelete.dtl</filename>
        </para>
    </listitem>
    <listitem>
        <para>
        <filename>Kernel/Output/HTML/Standard/AgentStatsEditSpecification.dtl</filename>
        </para>
    </listitem>
    <listitem>
        <para>
        <filename>Kernel/Output/HTML/Standard/AgentStatsEditRestrictions.dtl</filename>
        </para>
    </listitem>
    <listitem>
        <para>
        <filename>Kernel/Output/HTML/Standard/AgentStatsEditXaxis.dtl</filename>
        </para>
    </listitem>
    <listitem>
        <para>
        <filename>Kernel/Output/HTML/Standard/AgentStatsEditValueSeries.dtl</filename>
        </para>
    </listitem>
    <listitem>
        <para>
        <filename>Kernel/Output/HTML/Standard/AgentStatsImport.dtl</filename>
        </para>
    </listitem>
    <listitem>
        <para>
        <filename>Kernel/Output/HTML/Standard/AgentStatsPrint.dtl</filename>
        </para>
    </listitem>
    <listitem>
        <para>
        <filename>Kernel/Output/HTML/Standard/AgentStatsView.dtl</filename>
        </para>
    </listitem>
    <listitem>
        <para>
        <filename>Kernel/System/Stats/Dynamic/Ticket.pm</filename>
        </para>
    </listitem>
    <listitem>
        <para>
        <filename>bin/otrs.GenerateStats.pl</filename>
        </para>
    </listitem>
</itemizedlist>
</para>
</section>

<section id="stats-caching" >
<title>Caching</title>

<para>
Whether the results of a statistic are to be cached or not can be setup in the configuration. Cached report results are stored as files in the <filename>var/tmp</filename>directory of the OTRS installation (in most cases <filename>/opt/otrs/var/tmp</filename>).
</para>

<para>
Cached stats can be recognized by the "Stats" prefix.
</para>

<para>
If the data is lost, no major damage is caused. The next time the report is called up, the stats module will not find the file any more and so will generate a new report. Of course this will probably take a little longer to run.
</para>
</section>

<section id="stats-mkstats" >
<title>otrs.GenerateStats.pl</title>

<para>
This file is saved in the <filename>bin</filename>directory. It facilitates the generation of report in the command line.
</para>

<para>
As an example, see the command line call in the following script.
</para>

<para>
<programlisting>
bin> perl otrs.GenerateStats.pl -n 10004 -o /output/dir
</programlisting>
</para>

<para>
    <emphasis>Script: Generating a report from the command line.</emphasis>
</para>

<para>
A report from the stat configuration "Stat# 10004" is generated and saved as csv in the <filename>/output/dir</filename> directory.
</para>

<para>
The generated report can also be sent as an e-mail. More information can be called up with the command in the script below.
</para>

<para>
<programlisting>
bin> perl otrs.GenerateStats.pl --help
</programlisting>
</para>

<para>
    <emphasis>Script: Getting information about the otrs.GenerateStats.pl file.</emphasis>
</para>

</section>

<section id="stats-cron" >
<title>Automated stat generation - Cronjob</title>

<para>
It usually does not make sense to generate reports manually via the command line, as the stats module has a convenient graphical user interface. However, generating reports manually does make sense when combined with a Cronjob.
</para>

<para>
Imagine the following scenario: On the first day of every month, the heads of department want to receive a report for the past month. By combining a cronjob and command line call the reports can be sent to them automatically by e-mail.
</para>

</section>

<section id="stats-static" >
<title>Static stats</title>

<para>
The stats module facilitates the generation of static statistics. For every static stat a file exists in which its content is precisely defined.
</para>

<para>
This way, very complex stats can be generated. The disadvantage is that they are not particularly flexible.
</para>

<para>
The files are saved in the directory <filename>Kernel/System/Stats/Static/</filename>.
</para>
</section>

<section id="stats-using-old-stats" >
<title>Using old static stats</title>

<para>
Prior OTRS versions 1.3 and 2.0 already facilitated the generation of stats / reports. Various reports for OTRS versions 1.3 and 2.0 which have been specially developed to meet customers' requirements can be used in recent OTRS versions too.
</para>

<para>The files must merely be moved from the <filename>Kernel/System/Stats/</filename> path to <filename>Kernel/System/Stats/Static/</filename>. Additionally the package name of the respective script must be amended by "::Static".
</para>

<para>
The following example shows how the first path is amended.
</para>

<para>
<programlisting>
    package Kernel::System::Stats::AccountedTime;
</programlisting>
</para>

<para>
<programlisting>
    package Kernel::System::Stats::Static::AccountedTime;
</programlisting>
</para>
</section>

<section id="stats-default-stats" >
<title>Default stats</title>

<para>"It is not always necessary to reinvent the wheel..."
</para>

<para>
The stats module provides various default reports. Reports which are of interest for all OTRS users will in future be added to the default reports set of the stats module package. Default reports are saved in the stats module xml format in the<filename>scripts/test/sample/</filename> directory.
</para>

</section>

</section>

</chapter>