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 +4 -4
- data/README.md +14 -5
- data/exe/rb2db +1 -1
- data/lib/rb2db/version.rb +2 -1
- data/rb2db.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f53f6edb35402b7f5e53e3c9c8c78241f894ce26
|
4
|
+
data.tar.gz: f75d98630b2f9a619ec52faae7a6b5e525fd17cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
##
|
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
|
-
|
13
|
-
|
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: '
|
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.
|
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
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.
|
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-
|
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.
|
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.
|
26
|
+
version: 0.3.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: influxdb
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|