Skip to content
Newer
Older
100644 48 lines (35 sloc) 1.67 KB
a939f0e Readme\!
Josh Kleinpeter authored May 12, 2011
1 # Continuum
2 A Ruby gem which integrates with the OpenTSDB API
3
4 http://opentsdb.net/http-api.html
5
6 # About OpenTSDB
7 OpenTSDB is a distributed, scalable Time Series Database (TSDB) written on top of HBase. OpenTSDB was written to address a common need: store, index and serve metrics collected from computer systems (network gear, operating systems, applications) at a large scale, and make this data easily accessible and graphable.
8
9 # About Continuum
10 Continuum integrates with the OpenTSDB API so that Ruby Applications can access the metrics written to OpenTSDB instances. Support is planned for writing metrics into an OpenTSDB instance. So that you can easily integrate with Ruby applications.
11
12 # Usage
13
14 > client = Continuum::Client.new '10.0.0.1', 4242
15 > client.aggregators
c9d0c6a Better documentation.
Josh Kleinpeter authored May 12, 2011
16 => ["min", "sum", "max", "avg"]
ca05c69 Added query for json.
Josh Kleinpeter authored May 12, 2011
17
18 > client.logs.first
c9d0c6a Better documentation.
Josh Kleinpeter authored May 12, 2011
19 => "1305212010\tINFO\tNew I/O server boss #1 ([id: 0x7d8a8ce2, /0:0:0:0:0:0:0:0:4242])\tnet.opentsdb.tsd.ConnectionManager\t[id: 0x33f98d58, /10.0.0.2:63832 => /10.0.0.1:4242] CONNECTED: /10.0.0.2:63832"
ca05c69 Added query for json.
Josh Kleinpeter authored May 12, 2011
20
21 > client.query(
c9d0c6a Better documentation.
Josh Kleinpeter authored May 12, 2011
22 :format => :json,
23 :start => '2h-ago',
24 :m => ['sum:rate:proc.net.bytes', 'sum:rate:proc.stat.cpu']
ca05c69 Added query for json.
Josh Kleinpeter authored May 12, 2011
25 )
c9d0c6a Better documentation.
Josh Kleinpeter authored May 12, 2011
26 => {"plotted"=>701, "points"=>1961, "etags"=>[["direction"], ["type"]], "timing"=>370}
27
28 > client.query(
29 :format => :png,
30 :start => (Time.now - 7200),
31 :m => ['sum:rate:proc.net.bytes', 'sum:rate:proc.stat.cpu']
32 )
33 => # A PNG binary.
34
35 > client.query(
36 :format => :ascii,
37 :start => (Time.now - 7200),
38 :m => ['sum:rate:proc.net.bytes', 'sum:rate:proc.stat.cpu']
39 )
40 > data.split("\n").first
33b45d6 Formatting README.
Josh Kleinpeter authored May 12, 2011
41 => "proc.net.bytes 1305211753 563002.2 iface=eth0 host=i-007"
a939f0e Readme\!
Josh Kleinpeter authored May 12, 2011
42
00dcde4 Added more documentation.
Josh Kleinpeter authored May 12, 2011
43
a939f0e Readme\!
Josh Kleinpeter authored May 12, 2011
44 # Todo
ca05c69 Added query for json.
Josh Kleinpeter authored May 12, 2011
45 * The rest of the Read API
46 * The write API
a939f0e Readme\!
Josh Kleinpeter authored May 12, 2011
47
Something went wrong with that request. Please try again.