genesis_collector 0.1.19 → 0.1.20

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: e9df6193b9f48f6752363e6ee9d760f1e38050f6
4
- data.tar.gz: 9df591e399533d7117c1d0b6bdf65685e666eb99
3
+ metadata.gz: e238cbe05eb6fa3d420d3f86666816152b7af434
4
+ data.tar.gz: 4ce21bf5044f365a4775f303931273d1f3602036
5
5
  SHA512:
6
- metadata.gz: efc85e32ce794bc05a012df0d2512af47e23564f50ee672b99b8e8fa7f3b8115193ca01d1085befe5dd0b7ade13d96e2dd33027cea511a3f8bd9410836f724ac
7
- data.tar.gz: 28f0aedf6db483089b6f6621083fa247b5a857a7b705c616e9f0445f0c39b910e32cbe00e2043da1a802e12a44865c87b2a2db110de2ffe5e9a865363d30b9e4
6
+ metadata.gz: fe6ec479a700fae23b719ced5b9ed926b9b89c742bcf408f8a8cdaecf7783dd62794f52f49daaad1757ad452f598edb076c5a8e838c2b5617f7c35013733db2f
7
+ data.tar.gz: f54658322e6bb156dd86a21b40d85e179f6bd1d9bfee8757e59b51f933fc224ec6ca382f965d53cfa434996ad94e2a2a3611f56a99d27d23549e376ecbc40dfb
@@ -57,6 +57,7 @@ module GenesisCollector
57
57
  codename: get_codename,
58
58
  description: get_description
59
59
  },
60
+ last_boot_at: get_last_boot_time,
60
61
  product: read_dmi('system-product-name'),
61
62
  vendor: read_dmi('system-manufacturer'),
62
63
  properties: {
@@ -136,6 +137,10 @@ module GenesisCollector
136
137
  Socket.gethostname
137
138
  end
138
139
 
140
+ def get_last_boot_time
141
+ Time.parse(shellout_with_timeout('date -d "`cut -f1 -d. /proc/uptime` seconds ago" -u')).utc.iso8601
142
+ end
143
+
139
144
  def read_lsb_key(key)
140
145
  @lsb_data ||= File.read('/etc/lsb-release')
141
146
  @lsb_data.match(/^#{key}=["']?(.+?)["']?$/)[1] || 'unknown'
@@ -1,3 +1,3 @@
1
1
  module GenesisCollector
2
- VERSION = '0.1.19'
2
+ VERSION = '0.1.20'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: genesis_collector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
4
+ version: 0.1.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Radcliffe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-30 00:00:00.000000000 Z
11
+ date: 2016-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  version: '0'
117
117
  requirements: []
118
118
  rubyforge_project:
119
- rubygems_version: 2.6.1
119
+ rubygems_version: 2.6.3
120
120
  signing_key:
121
121
  specification_version: 4
122
122
  summary: Agent to collect information about bare metal servers and send it to Genesis.