diff options
author | Richard Wall <richard@aziz> | 2010-08-01 12:12:55 +0100 |
---|---|---|
committer | Richard Wall <richard@aziz> | 2010-08-01 12:12:55 +0100 |
commit | d9601a87d071f066f0c58d3a8b93687e0d0969c4 (patch) | |
tree | 1f6bde7c4af497aa421113ceffe05258c86c3822 /docs | |
parent | a8767f33f43d23c78ed7c93482278f90847ce00a (diff) |
get rid of the separate loading of the available rrd listv10.7
Diffstat (limited to 'docs')
-rw-r--r-- | docs/jarmon_example_recipes.js | 46 | ||||
-rw-r--r-- | docs/rrd_finder.rpy | 20 |
2 files changed, 43 insertions, 23 deletions
diff --git a/docs/jarmon_example_recipes.js b/docs/jarmon_example_recipes.js index 73dd3d5..90b5c2e 100644 --- a/docs/jarmon_example_recipes.js +++ b/docs/jarmon_example_recipes.js @@ -14,26 +14,26 @@ jarmon.COLLECTD_RECIPES = { { title: 'CPU Usage', data: [ - ['cpu-0/cpu-wait.rrd', 0, 'CPU-0 Wait', '%'], - ['cpu-1/cpu-wait.rrd', 0, 'CPU-1 Wait', '%'], - ['cpu-0/cpu-system.rrd', 0, 'CPU-0 System', '%'], - ['cpu-1/cpu-system.rrd', 0, 'CPU-1 System', '%'], - ['cpu-0/cpu-user.rrd', 0, 'CPU-0 User', '%'], - ['cpu-1/cpu-user.rrd', 0, 'CPU-1 User', '%'] + ['data/cpu-0/cpu-wait.rrd', 0, 'CPU-0 Wait', '%'], + ['data/cpu-1/cpu-wait.rrd', 0, 'CPU-1 Wait', '%'], + ['data/cpu-0/cpu-system.rrd', 0, 'CPU-0 System', '%'], + ['data/cpu-1/cpu-system.rrd', 0, 'CPU-1 System', '%'], + ['data/cpu-0/cpu-user.rrd', 0, 'CPU-0 User', '%'], + ['data/cpu-1/cpu-user.rrd', 0, 'CPU-1 User', '%'] ], options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS, jarmon.Chart.STACKED_OPTIONS) - }, + } ], 'memory': [ { title: 'Memory', data: [ - ['memory/memory-buffered.rrd', 0, 'Buffered', 'B'], - ['memory/memory-used.rrd', 0, 'Used', 'B'], - ['memory/memory-cached.rrd', 0, 'Cached', 'B'], - ['memory/memory-free.rrd', 0, 'Free', 'B'] + ['data/memory/memory-buffered.rrd', 0, 'Buffered', 'B'], + ['data/memory/memory-used.rrd', 0, 'Used', 'B'], + ['data/memory/memory-cached.rrd', 0, 'Cached', 'B'], + ['data/memory/memory-free.rrd', 0, 'Free', 'B'] ], options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS, jarmon.Chart.STACKED_OPTIONS) @@ -44,10 +44,10 @@ jarmon.COLLECTD_RECIPES = { { title: 'DNS Query Types', data: [ - ['dns/dns_qtype-A.rrd', 0, 'A', 'Q/s'], - ['dns/dns_qtype-PTR.rrd', 0, 'PTR', 'Q/s'], - ['dns/dns_qtype-SOA.rrd', 0, 'SOA', 'Q/s'], - ['dns/dns_qtype-SRV.rrd', 0, 'SRV', 'Q/s'] + ['data/dns/dns_qtype-A.rrd', 0, 'A', 'Q/s'], + ['data/dns/dns_qtype-PTR.rrd', 0, 'PTR', 'Q/s'], + ['data/dns/dns_qtype-SOA.rrd', 0, 'SOA', 'Q/s'], + ['data/dns/dns_qtype-SRV.rrd', 0, 'SRV', 'Q/s'] ], options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) }, @@ -55,9 +55,9 @@ jarmon.COLLECTD_RECIPES = { { title: 'DNS Return Codes', data: [ - ['dns/dns_rcode-NOERROR.rrd', 0, 'NOERROR', 'Q/s'], - ['dns/dns_rcode-NXDOMAIN.rrd', 0, 'NXDOMAIN', 'Q/s'], - ['dns/dns_rcode-SERVFAIL.rrd', 0, 'SERVFAIL', 'Q/s'] + ['data/dns/dns_rcode-NOERROR.rrd', 0, 'NOERROR', 'Q/s'], + ['data/dns/dns_rcode-NXDOMAIN.rrd', 0, 'NXDOMAIN', 'Q/s'], + ['data/dns/dns_rcode-SERVFAIL.rrd', 0, 'SERVFAIL', 'Q/s'] ], options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) } @@ -67,9 +67,9 @@ jarmon.COLLECTD_RECIPES = { { title: 'Load Average', data: [ - ['load/load.rrd', 'shortterm', 'Short Term', ''], - ['load/load.rrd', 'midterm', 'Medium Term', ''], - ['load/load.rrd', 'longterm', 'Long Term', ''] + ['data/load/load.rrd', 'shortterm', 'Short Term', ''], + ['data/load/load.rrd', 'midterm', 'Medium Term', ''], + ['data/load/load.rrd', 'longterm', 'Long Term', ''] ], options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) } @@ -79,8 +79,8 @@ jarmon.COLLECTD_RECIPES = { { title: 'Wlan0 Throughput', data: [ - ['interface/if_octets-wlan0.rrd', 'tx', 'Transmit', 'b/s'], - ['interface/if_octets-wlan0.rrd', 'rx', 'Receive', 'b/s'] + ['data/interface/if_octets-wlan0.rrd', 'tx', 'Transmit', 'b/s'], + ['data/interface/if_octets-wlan0.rrd', 'rx', 'Receive', 'b/s'] ], options: jQuery.extend(true, {}, jarmon.Chart.BASE_OPTIONS) } diff --git a/docs/rrd_finder.rpy b/docs/rrd_finder.rpy new file mode 100644 index 0000000..c7c8517 --- /dev/null +++ b/docs/rrd_finder.rpy @@ -0,0 +1,20 @@ +import json +import os + +from twisted.python.filepath import FilePath +from twisted.web.resource import Resource + +RRD_PATH = '/var/lib/collectd/rrd/aziz/' +URL_BASE = 'data' + +class RrdFinder(Resource): + isLeaf = True + def render_GET(self, request): + p = FilePath(RRD_PATH) + paths = [] + for f in p.walk(): + if f.basename().endswith('.rrd'): + paths.append(os.path.join(URL_BASE, *f.segmentsFrom(p))) + return json.dumps(paths) + +resource = RrdFinder() |