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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>Jarmon - customisable, Javascript generated charts from
Collectd RRD data</title>
<link rel="stylesheet" type="text/css" href="assets/css/style.css" />
<link rel="stylesheet" type="text/css"
href="assets/css/tabs-no-images.css" />
<link rel="stylesheet" type="text/css"
href="assets/css/jquerytools.dateinput.skin1.css" />
<script type="text/javascript" src="assets/js/dependencies.js"></script>
<script type="text/javascript" src="assets/js/jsrrdgraph.js"></script>
<script type="text/javascript" src="../../jarmon/jarmon.js"></script>
<script type="text/javascript" src="jarmon_example_recipes.js"></script>
<script type="text/javascript">
$(function() {
var rrdgraph = new RRDGraph("canvas");
rrdgraph.cmdline($('#cmdline').val());
var url = 'data/load/load.rrd';
jarmon.downloadBinary(url).always(
function(res){
var rrd = new RRDFile(res);
rrdgraph.rrdfiles[url] = rrd;
rrdgraph.graph_paint();
})
// return;
jarmon.buildTabbedChartUi(
$('.chart-container').remove(),
jarmon.CHART_RECIPES_COLLECTD,
$('.tabbed-chart-interface'),
jarmon.TAB_RECIPES_STANDARD,
$('.chartRangeControl')
);
});
</script>
</head>
<body>
<canvas id="canvas"></canvas>
<textarea id="cmdline" rows="10" cols="120">-s end-1h -w 600 -h 120 -v "System load" -t Load -E
DEF:s_avg=data/load/load.rrd:shortterm:AVERAGE
DEF:s_min=data/load/load.rrd:shortterm:MIN
DEF:s_max=data/load/load.rrd:shortterm:MAX
DEF:m_avg=data/load/load.rrd:midterm:AVERAGE
DEF:m_min=data/load/load.rrd:midterm:MIN
DEF:m_max=data/load/load.rrd:midterm:MAX
DEF:l_avg=data/load/load.rrd:longterm:AVERAGE
DEF:l_min=data/load/load.rrd:longterm:MIN
DEF:l_max=data/load/load.rrd:longterm:MAX
AREA:s_max#B7EFB7
AREA:s_min#FFFFFF
"LINE1:s_avg#00E000: 1m average"
"GPRINT:s_min:MIN:%4.2lf Min,"
"GPRINT:s_avg:AVERAGE:%4.2lf Avg,"
"GPRINT:s_max:MAX:%4.2lf Max,"
"GPRINT:s_avg:LAST:%4.2lf Last\n"
"LINE1:m_avg#0000FF: 5m average"
"GPRINT:m_min:MIN:%4.2lf Min,"
"GPRINT:m_avg:AVERAGE:%4.2lf Avg,"
"GPRINT:m_max:MAX:%4.2lf Max,"
"GPRINT:m_avg:LAST:%4.2lf Last\n"
"LINE1:l_avg#FF0000:15m average"
"GPRINT:l_min:MIN:%4.2lf Min,"
"GPRINT:l_avg:AVERAGE:%4.2lf Avg,"
"GPRINT:l_max:MAX:%4.2lf Max,"
"GPRINT:l_avg:LAST:%4.2lf Last\n"</textarea>
<div class="chartRangeControl">
<form>
<div>
<span class="timerange_control custom">
<img src="assets/icons/calendar.png"
width="16" height="16"
alt="calendar" class="from_custom"
title="Click to choose a custom start date" />
<input name="from_custom" type="text" readonly="readonly"
title="Time range start" />
<img src="assets/icons/calendar.png" width="16" height="16"
alt="calendar" class="to_custom"
title="Click to choose a custom end date" />
<input name="to_custom" type="text" readonly="readonly"
title="Time range end" />
</span>
<span class="timerange_control standard">
<select name="from_standard"
title="Time range shortcuts - click to select an alternative time range" >
</select>
</span>
<input name="from" type="hidden" />
<input name="to" type="hidden" />
<select name="tzoffset"
title="Timezone offset - click to choose a custom timezone offset" ></select>
<input name="action" value="Update" type="button"
title="Graph update - click to update all graphs" />
</div>
<div class="range-preview"
title="Time range preview - click and drag to select a custom timerange" ></div>
</form>
</div>
<div class="tabbed-chart-interface"></div>
<div class="chart-container">
<div class="chart-header">
<h2 class="title"></h2>
</div>
<div class="error"></div>
<div class="chart"></div>
<div class="graph-legend"></div>
</div>
</body>
</html>
|