rb2db 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b2ab50ce72a578dd3c7a1adbf8cd27631750a7bb
4
- data.tar.gz: 894aae660dd8cc37ebb37a44c31886d273e5caab
3
+ metadata.gz: f53f6edb35402b7f5e53e3c9c8c78241f894ce26
4
+ data.tar.gz: f75d98630b2f9a619ec52faae7a6b5e525fd17cc
5
5
  SHA512:
6
- metadata.gz: 54642b699853cbfbcb0c9651c702e20394a51cd2dca0d23d9fbcb86acd98267278b0dfe22ea5f21fef0bc56bf95fd155ecbbd08b2007e456d0d7d1c0221e8d5b
7
- data.tar.gz: 20cd6d4f89f8c9782115d1af6921615ce7a2ba1432f4ab060bb6ef1945f5d49f10661accd6589343314c4203e7dc843eb63665abe40e1459633b123396bd8a42
6
+ metadata.gz: 5a83406ae4e792e1ac6ebe91d8378a91d2a275e0e08c8235320ef5d556720690d2f925136f8bc9752eba2572827c7fcb76aa28fcd3c052f6d7eb4559694fc378
7
+ data.tar.gz: 71f65f993cdc33ad49e5b318e17aa8e173daf0a89f7310cd3a7ce44b683cb7a1ce81ae0f2cab74236aa219eac58ee63405fd7dc989f4572cf110021933027d48
data/README.md CHANGED
@@ -1,13 +1,22 @@
1
1
  # rb2db
2
2
  Write CPU and Memory info to InfluxDB with Ruby
3
3
 
4
+ ## Prerequisites
5
+ Influx DB
6
+ https://docs.influxdata.com/influxdb/
7
+
8
+ Grafana (Optional)
9
+ https://grafana.com/
10
+
11
+
4
12
  ## Install
5
13
  $ gem install rb2db
6
14
 
7
- ## Config
15
+ ## Quick Start
16
+ $ INFLUX_HOST='ip_or_hostname_here' rb2db
17
+
18
+ --------------
8
19
 
9
- ### InfluxDB Server
10
- ENV['INFLUX_HOST']
11
20
 
12
- ### Local Hostname
13
- ENV['INFLUX_DB']
21
+ # Result
22
+ ![screen shot](https://cloud.githubusercontent.com/assets/382216/26003093/5e005b16-36f7-11e7-8079-686d4a4807d4.png)
data/exe/rb2db CHANGED
@@ -26,7 +26,7 @@ while sleep 1
26
26
  { series: 'cpu_percent', tags: { host: influx_localhost }, values: { value: Duffy::System.cpu_percent } },
27
27
  { series: 'mem_total', tags: { host: influx_localhost }, values: { value: Duffy::System.mem_total } },
28
28
  { series: 'mem_used', tags: { host: influx_localhost }, values: { value: Duffy::System.mem_used } },
29
- { series: 'mem_available', tags: { host: influx_localhost }, values: { value: Duffy::System.mem_available } }
29
+ { series: 'mem_percent', tags: { host: influx_localhost }, values: { value: Duffy::System.mem_percent } }
30
30
  ]
31
31
  influxdb.write_points(data)
32
32
  end
data/lib/rb2db/version.rb CHANGED
@@ -1,8 +1,9 @@
1
1
  module Rb2db
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
 
4
4
 
5
5
  # CHANGELOG
6
+ # 0.1.4 Replace mem_available with mem_percent.
6
7
  # 0.1.3 Bump 'duffy' gem version to fix mem_available detection on older linux
7
8
  # 0.1.2 Tag 'host' correctly. Works nicely in Grafana.
8
9
  # 0.1.1 Updating gemspec to publish to RubyGems
data/rb2db.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
 
23
- spec.add_dependency 'duffy', '>= 0.3.1'
23
+ spec.add_dependency 'duffy', '>= 0.3.2'
24
24
  spec.add_dependency 'influxdb'
25
25
 
26
26
  spec.add_development_dependency "bundler", "~> 1.14"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rb2db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Duffy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-12 00:00:00.000000000 Z
11
+ date: 2017-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: duffy
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.3.1
19
+ version: 0.3.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.3.1
26
+ version: 0.3.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: influxdb
29
29
  requirement: !ruby/object:Gem::Requirement