~richardw/jarmon/ping-droprate-multiplier-846377

« back to all changes in this revision

Viewing changes to docs/examples/jarmon_example_recipes.js

  • Committer: Richard Wall
  • Date: 2011-08-08 00:01:50 UTC
  • mfrom: (73.1.8 prerelease-fixes)
  • Revision ID: richard@largo-20110808000150-fc7wea24k7ky5x8l
Merge lp:~richardw/jarmon/prerelease-fixes
 * Add transformer function option to allow optional transformation of RRD values before they are plotted
 * Update dates of copyright notices
 * Remove DNS reports from example page
 * Remove unfinished editable graph controls - I will try and finish those off later.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2010 Richard Wall <richard (at) the-moon.net>
 
1
/* Copyright (c) Richard Wall
2
2
 * See LICENSE for details.
3
3
 *
4
4
 * Some example recipes for Collectd RRD data - you *will* need to modify this
5
5
 * based on the RRD data available on your system.
6
6
 */
7
7
 
8
 
if(typeof jarmon == 'undefined') {
 
8
if(typeof(jarmon) === 'undefined') {
9
9
    var jarmon = {};
10
10
}
11
11
 
12
12
jarmon.TAB_RECIPES_STANDARD = [
13
13
    ['System',      ['cpu', 'memory','load']],
14
 
    ['Network',     ['interface']],
15
 
    ['DNS',         ['dns_query_types', 'dns_return_codes']]
 
14
    ['Network',     ['interface']]
16
15
];
17
16
 
18
17
jarmon.CHART_RECIPES_COLLECTD = {
42
41
                                         jarmon.Chart.STACKED_OPTIONS)
43
42
    },
44
43
 
45
 
    'dns_query_types': {
46
 
        title: 'DNS Query Types',
47
 
        data: [
48
 
            ['data/dns/dns_qtype-A.rrd', 0, 'A', 'Q/s'],
49
 
            ['data/dns/dns_qtype-PTR.rrd', 0, 'PTR', 'Q/s'],
50
 
            ['data/dns/dns_qtype-SOA.rrd', 0, 'SOA', 'Q/s'],
51
 
            ['data/dns/dns_qtype-SRV.rrd', 0, 'SRV', 'Q/s']
52
 
        ],
53
 
        options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS)
54
 
    },
55
 
 
56
 
    'dns_return_codes': {
57
 
        title: 'DNS Return Codes',
58
 
        data: [
59
 
            ['data/dns/dns_rcode-NOERROR.rrd', 0, 'NOERROR', 'Q/s'],
60
 
            ['data/dns/dns_rcode-NXDOMAIN.rrd', 0, 'NXDOMAIN', 'Q/s'],
61
 
            ['data/dns/dns_rcode-SERVFAIL.rrd', 0, 'SERVFAIL', 'Q/s']
62
 
        ],
63
 
        options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS)
64
 
    },
65
 
 
66
44
    'load': {
67
45
        title: 'Load Average',
68
46
        data: [
76
54
    'interface': {
77
55
        title: 'Wlan0 Throughput',
78
56
        data: [
79
 
            ['data/interface/if_octets-wlan0.rrd', 'tx', 'Transmit', 'b/s'],
80
 
            ['data/interface/if_octets-wlan0.rrd', 'rx', 'Receive', 'b/s']
 
57
            ['data/interface/if_octets-wlan0.rrd', 'tx', 'Transmit', 'bit/s', function (v) { return v*8; }],
 
58
            ['data/interface/if_octets-wlan0.rrd', 'rx', 'Receive', 'bit/s', function (v) { return v*8; }]
81
59
        ],
82
60
        options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS)
83
61
    }