File: graph_templates.html

package info (click to toggle)
cacti 0.8.8b%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 9,796 kB
  • sloc: php: 52,273; sql: 2,463; xml: 691; sh: 434; perl: 151; makefile: 30
file content (701 lines) | stat: -rw-r--r-- 17,309 bytes parent folder | download | duplicates (3)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Graph Templates</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="The Cacti Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Templates"
HREF="templates.html"><LINK
REL="PREVIOUS"
TITLE="Templates"
HREF="templates.html"><LINK
REL="NEXT"
TITLE="Host Templates"
HREF="host_templates.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="manual.css"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>The Cacti Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="templates.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 13. Templates</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="host_templates.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="GRAPH_TEMPLATES"
>Graph Templates</A
></H1
><P
>				In Cacti, a graph template provides a skeleton for an actual graph. If you have many graphs that
				share most of their characteristics, using a graph template would probably make sense. After a
				graph is attached to a particular graph template, all changes made to the graph template will
				propagate out to all of its graphs, unless <SPAN
CLASS="GUILABEL"
>Use Per-Graph Value</SPAN
> has been checked.
			</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="CREATING_GRAPH_TEMPLATES"
>Creating a Graph Template</A
></H2
><P
>					To create a new graph template, select <SPAN
CLASS="GUILABEL"
>Graph Templates</SPAN
> under the
					<SPAN
CLASS="GUILABEL"
>Templates</SPAN
> heading and click <SPAN
CLASS="GUILABEL"
>Add</SPAN
>.
				</P
><P
>					The first thing you must do is give the template a name. This name has nothing to do with
					the graph title, but is what you will use to identify the template throughout Cacti.
					Second, you will notice a list of graph field names with Use Per-Graph Value checkboxes
					next to each one. The nice thing about templates in Cacti is that you can choose whether
					to template each field on a per-field basis. If you leave the checkbox uncheked, every
					graph attached to the template will inherit its value from the template. If the checkbox
					is checked, every graph attached to the template will contain its own value for that
					particular field.
				</P
><DIV
CLASS="TABLE"
><A
NAME="AEN1670"
></A
><P
><B
>Table 13-3. Field Description: Graph Templates</B
></P
><TABLE
BORDER="1"
FRAME="border"
RULES="all"
CLASS="CALSTABLE"
><COL
WIDTH="1*"><COL
WIDTH="3*"><THEAD
><TR
><TH
ALIGN="CENTER"
>Name</TH
><TH
ALIGN="CENTER"
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
>Title</TD
><TD
><P
>The title of the graph within Cacti and the title that will be printed on the actual graph itself.</P
><P
><B
CLASS="EMPHASIS"
>Note:</B
> You can use the keyword |host_description| in this field, which will be automatically substituted with the current host description.</P
></TD
></TR
><TR
><TD
>Image Format</TD
><TD
>Choose whether you would prefer to output your graph images in PNG or SVG. GIF is supported only with rrdtool 1.0.x and has been deleted from rrdtool 1.2.x and later</TD
></TR
><TR
><TD
>Height</TD
><TD
>The height of the graph area in pixels</TD
></TR
><TR
><TD
>Width</TD
><TD
>The width of the graph area in pixels</TD
></TR
><TR
><TD
>Slope Mode</TD
><TD
>RRDtool graphs are composed of stair case curves by default.
								This is in line with the way RRDtool
           						calculates its data. Some people favor a more "organic" look for their graphs.
           						<SPAN
CLASS="APPLICATION"
>RRDTool</SPAN
> version 1.2 and above
								support smoothing of graphs, know as <SPAN
CLASS="GUILABEL"
>slope mode</SPAN
>.</TD
></TR
><TR
><TD
>Auto Scale</TD
><TD
>Enable auto scale for the graph. This option must be check to use the next two options. Upper/Lower limit values are ignored when using autoscale since these boundaries are determined automatically.</TD
></TR
><TR
><TD
>Auto Scale Options</TD
><TD
><P
>Choose whether you would like to use
								<P
></P
><UL
><LI
><P
>--alt-autoscale (ignoring given limits),</P
></LI
><LI
><P
>--alt-autoscale-max (accepting a lower limit),</P
></LI
><LI
><P
>--alt-autoscale-min (accepting an upper limit, requires rrdtool 1.2.x) or</P
></LI
><LI
><P
>--alt-autoscale (accepting both limits, rrdtool default) on the graph.</P
></LI
></UL
>
								The <A
HREF="http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html"
TARGET="_top"
>RRDTool graph manual</A
> says:</P
><P
>       <B
CLASS="EMPHASIS"
>Limits</B
></P
><P
>           [-u|--upper-limit value] [-l|--lower-limit value] [-r|--rigid]</P
><P
>           By default the graph will be autoscaling so that it will adjust the y-axis to the range of the data.
           You can change this behaviour by explicitly setting the limits. The displayed y-axis will then range
           at least from lower-limit to upper-limit. Autoscaling will still permit those boundaries to be
           stretched unless the rigid option is set.&#13;</P
><P
>           [-A|--alt-autoscale]</P
><P
>           Sometimes the default algorithm for selecting the y-axis scale is not satisfactory. Normally the
           scale is selected from a predefined set of ranges and this fails miserably when you need to graph
           something like "260 + 0.001 * sin(x)". This option calculates the minimum and maximum y-axis from the
           actual minimum and maximum data values. Our example would display slightly less than "260-0.001" to
           slightly more than "260+0.001" (this feature was contributed by Sasha Mikheev).&#13;</P
><P
>           [-J|--alt-autoscale-min]</P
><P
>           Where "--alt-autoscale" will modify both the absolute maximum AND minimum values, this option will
           only affect the minimum value. The maximum value, if not defined on the command line, will be 0. This
           option can be useful when graphing router traffic when the WAN line uses compression, and thus the
           throughput may be higher than the WAN line speed.&#13;</P
><P
>           [-M|--alt-autoscale-max]</P
><P
>           Where "--alt-autoscale" will modify both the absolute maximum AND minimum values, this option will
           only affect the maximum value. The minimum value, if not defined on the command line, will be 0. This
           option can be useful when graphing router traffic when the WAN line uses compression, and thus the
           throughput may be higher than the WAN line speed.</P
></TD
></TR
><TR
><TD
>Logarithmic Scaling</TD
><TD
>Choose if you want logarithmic y-axis scaling.</TD
></TR
><TR
><TD
>Scientific Units for Logarithmic Scaling</TD
><TD
>This option is not available for rrdtool-1.0.x. For linear graphs,
								scientific units (in magnitudes of k=kilo, M=mega, ...) is default. But
								for logarithmic graphs, exponential notation is default.
								Choose if you want logarithmic y-axis scaling and scientific units.</TD
></TR
><TR
><TD
>Rigid Boundaries Mode</TD
><TD
>From the RRDTool manual
								<SPAN
CLASS="QUOTE"
>"Normally rrdgraph will automatically expand the lower and upper
								limit if the graph contains a value outside the valid range.
								With this option you can disable this behavior"</SPAN
>.</TD
></TR
><TR
><TD
>Auto Padding</TD
><TD
>If you have ever created RRDTool-based graphs manually,
								you may have realized how annoying it can be to get text to
								line up properly. With this option Cacti will do its best to
								make the columns on your graph legend line up. This option
								works best when your graph legend has a consistent number of columns.</TD
></TR
><TR
><TD
>Allow Graph Export</TD
><TD
>If you choose to use Cacti's static HTML/image export, you can
								choose whether you want each individual graph to be exported.</TD
></TR
><TR
><TD
>Upper Limit</TD
><TD
>The maximum value that will be displayed on the y-axis.
								This value is ignored is auto-scaling is turned on.</TD
></TR
><TR
><TD
>Lower Limit</TD
><TD
>The minimum value that will be displayed on the y-axis.
								This value is ignored is auto-scaling is turned on.</TD
></TR
><TR
><TD
>Base Value</TD
><TD
>Whether you want to base the y-axis labels on 1000 or 1024.
								This field will typically be set to 1024 for memory and 1000
								for traffic measurements.</TD
></TR
><TR
><TD
>Unit Grid Value</TD
><TD
>Sets the unit value for the y-axis (--y-grid). You should probably
								keep the unit short as to keep it readable.</TD
></TR
><TR
><TD
>Unit Exponent Value</TD
><TD
>Sets the 10^e scaling of the y-axis. Valid values for
								this field are between -18 and 18. For example, you could use
								3 to display everything in 'k' (kilo) or -6 to display everything in 'u' (micro).</TD
></TR
><TR
><TD
>Vertical Label</TD
><TD
>The text to print on the left edge of the graph. Usually
								is the units the data on the graph is measured in.</TD
></TR
></TBODY
></TABLE
></DIV
><P
>					<B
CLASS="EMPHASIS"
>Note:</B
> For most graph templates, you will want to check the Use
					<SPAN
CLASS="GUILABEL"
>Per-Graph Value</SPAN
> checkbox for the title field so each graph using this
					template has its own unique title. It also makes sense to enter an initial value in this
					field that includes the variable |host_description| for organizational purposes.
				</P
><P
>					When you are finished filling in values for the graph template, click <SPAN
CLASS="GUILABEL"
>Create</SPAN
>
					and you will be presented with a page similar to the graph edit page.
				</P
><DIV
CLASS="FIGURE"
><A
NAME="IMG_GRAPH_TEMPLATE_NEW"
></A
><P
><B
>Figure 13-2. Adding a Graph Template</B
></P
><DIV
CLASS="MEDIAOBJECT"
><P
><IMG
SRC="images/graph_template.png"></P
></DIV
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="GRAPH_ITEMS"
>Graph Items</A
></H3
><P
>						The first thing you should do is create graph items for this graph template, just like for a regular graph.
						One difference you will notice is that the <SPAN
CLASS="GUILABEL"
>Data Sources</SPAN
> dropdown will contain a list
						of data template items rather than data source items. It is important that Cacti can make this association
						here, so that Cacti doesn't have to make unnecessary assumptions later.
					</P
><DIV
CLASS="TABLE"
><A
NAME="AEN1775"
></A
><P
><B
>Table 13-4. Field Description: Graph Template Items</B
></P
><TABLE
BORDER="1"
FRAME="border"
RULES="all"
CLASS="CALSTABLE"
><COL
WIDTH="1*"><COL
WIDTH="3*"><THEAD
><TR
><TH
ALIGN="CENTER"
>Name</TH
><TH
ALIGN="CENTER"
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
>Data Source</TD
><TD
>If this graph item is to represent some sort of data, you must select a your data source here. Keep in mind that not all graph items have a data source. Graph item types such as COMMENT, VRULE, and HRULE typically do not.</TD
></TR
><TR
><TD
>Color</TD
><TD
>Depending on the graph item type, you can select a color for the graph item. This field only applies to the graph item types AREA, STACK, LINE1, LINE2, and LINE3.</TD
></TR
><TR
><TD
>Opacity/Alpha Channel</TD
><TD
>For a colored graph item, you may optionally select an opacity (alpha channel).
									This option is not available with rrdtool-1.0.x.</TD
></TR
><TR
><TD
>Graph Item Type</TD
><TD
><P
>This field is important because it defines what kind of graph item this is. Types such as AREA, STACK, LINE1, LINE2, and LINE3 are used to represent data on the graph, while COMMENT and GPRINT are used put on the legend. The LEGEND type is specific to Cacti only and can be used if you want to Cacti to automatically create a GPRINT-LAST/GPRINT-AVERAGE/GPRINT-MAXIMUM graph item for you.</P
><P
><B
CLASS="EMPHASIS"
>Note:</B
>: You must always put an AREA item before using STACK or your graph will not render.</P
></TD
></TR
><TR
><TD
>Consolidation Function</TD
><TD
>This tells <SPAN
CLASS="APPLICATION"
>RRDTool</SPAN
> which consolidation function to use when representing this data on the graph. You will typically use AVERAGE for most things on the graph area, and LAST/MAXIMUM as well for GPRINT items.</TD
></TR
><TR
><TD
>CDEF Function</TD
><TD
>If you want to apply a CDEF function to the graph item, select one here. Check out the CDEF section  of the manual for more information.</TD
></TR
><TR
><TD
>Value</TD
><TD
>This field is only used with the HRULE/VRULE graph item types. Type any valid integer to draw the line at for HRULE or the time of the day HH:MM for VRULE.</TD
></TR
><TR
><TD
>GPRINT Type</TD
><TD
>If this item is a GPRINT, you can choose how you want the number to be formatted. You can add your own in the GPRINT Presets section of Cacti.</TD
></TR
><TR
><TD
>Text Format</TD
><TD
>You can enter text to be displayed on the legend here. This field is applicable for all graph item types except for the virtual LEGEND type.</TD
></TR
><TR
><TD
>Hard Return</TD
><TD
>Check this box to force graph items onto the next line.</TD
></TR
></TBODY
></TABLE
></DIV
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="GRAPH_ITEM_INPUTS"
>Graph Item Inputs</A
></H3
><P
>						After creating graph items for your template, you will need to create some graph item inputs. Graph item inputs are
						unique to graph templates because of the large number of items they sometimes contain. Graph item inputs enable you to
						take one graph item field, and associate it with multiple graph items.
					</P
><P
>						To create a new graph item input, click <SPAN
CLASS="GUILABEL"
>Add</SPAN
> on the right of the <SPAN
CLASS="GUILABEL"
>Graph Item
						Inputs</SPAN
> box. There are various fields that must be filled in for every graph item input:
					</P
><DIV
CLASS="TABLE"
><A
NAME="AEN1825"
></A
><P
><B
>Table 13-5. Field Description: Graph Template Items</B
></P
><TABLE
BORDER="1"
FRAME="border"
RULES="all"
CLASS="CALSTABLE"
><COL
WIDTH="1*"><COL
WIDTH="3*"><THEAD
><TR
><TH
ALIGN="CENTER"
>Name</TH
><TH
ALIGN="CENTER"
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
>Name</TD
><TD
>This will be the name used to identify the graph item input on both the graph template and graph edit pages.</TD
></TR
><TR
><TD
>Description</TD
><TD
>(Optional) This description will be displayed on the graph edit page of any graph using this template if specified.</TD
></TR
><TR
><TD
>Field Type</TD
><TD
>You must choose the field that you are going to associate with one or more graph items.</TD
></TR
><TR
><TD
>Associated Graph Items</TD
><TD
>Choose one or more graph items to associate with the field selected for "Field Type". When the user specifies a value for the field, it will be applied to all of the items you select here.</TD
></TR
></TBODY
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="APPLYING_GRAPH_TEMPLATES"
>Applying Graph Templates to Graphs</A
></H2
><P
>					Applying a graph template to a graph is a very simple process. The first thing you must do is select the graph you
					want to apply the template to under <SPAN
CLASS="GUILABEL"
>Graph Management</SPAN
>. Under the <SPAN
CLASS="GUILABEL"
>Graph Template
					Selection</SPAN
> box, select the graph template that you want to apply to the graph and click
					<SPAN
CLASS="GUILABEL"
>Save</SPAN
>. If this is a new graph or the graph and graph template contains an equal number of
					graph items, the graph template will be automatically applied. If number of graph items varies from the graph to
					the target graph template, you will be propmted with a warning that your graph will be changed.
				</P
><P
>					Once the template is applied to the graph, you will notice that you can only change values for the fields that
					you checked Use Per-Graph Value for. You will also notice a new box, called <SPAN
CLASS="GUILABEL"
>Graph Item Inputs</SPAN
>.
					This is where you can specify values for the graph items inputs that you defined in the graph template. The values
					specified here will be applied to each graph item tied to the graph item input.
				</P
><P
>					<B
CLASS="EMPHASIS"
>Now any time a change is made to the graph template, it will be automatically propagated to the graphs
					attached to it.</B
>
				</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="templates.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="host_templates.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Templates</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="templates.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Host Templates</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>