anamo 1.1.2 → 1.1.7

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
  SHA256:
3
- metadata.gz: 8c6ef7170b41ef076538f971579d4e27343ad61ed1b113abd06affbcc8a4c3f7
4
- data.tar.gz: d4762a0b9410c8230cf08d8cd82cc512e9887f1f5854407c8eca67735af6ef2b
3
+ metadata.gz: 845201f9967d87fb7043ce35eb82d327ad9b02121e3b1cb6f7786c3547babefd
4
+ data.tar.gz: d4a55a753e79d4af2796c8b61166e059a10619a7ca490ad85213bad4269e6e3e
5
5
  SHA512:
6
- metadata.gz: 2491fbad4edb339d1de66adb9be13287ea2b53d5c7b3d2eb2efa0b06b72485550a1960f0893d2b7f11006f8b39a3c468e3d3223cd621a3f9a1a78fe6336e552f
7
- data.tar.gz: a5ae2be7a15449c0bf0d5948f0e8260b2366c807666f0c581de5ebbd58b130fe7cb724b31681aa75918d9fc8d447e0774a417c4362b4facc8e572047a8028e92
6
+ metadata.gz: e9b87dcc52b8e297c25e7075aa815f974c425ec6f1b2b3c4756edb6524ed8eafd55c1bee219fbbaf1eb8275237d27c55d24b2ced9453249b70ff3b93b6fe2aa2
7
+ data.tar.gz: c6c80048b96218a70c23a938ab22d523cc21b123b6f65fdcc8fc93187dd2dc836bfea5c1ebe3df354fef023f94be46cce39f1a4396c945e5345d7d3dc1c8a235
@@ -38,7 +38,11 @@ module Anamo
38
38
  ret = {}
39
39
 
40
40
  config = YAML.load_file "/etc/anamo.conf.yml"
41
+
42
+ #train
41
43
  train = Train.create('local')
44
+ # start or reuse a connection
45
+ conn = train.connection
42
46
 
43
47
  ret['api_key'] = config['api_key']
44
48
  ret['beacon_modules'] = config['modules']
@@ -48,15 +52,29 @@ module Anamo
48
52
  ret['node']['os_name'] = Train.create('local').connection.os[:name]
49
53
  ret['node']['os_family'] = Train.create('local').connection.os[:family]
50
54
  ret['node']['os_release'] = Train.create('local').connection.os[:release]
55
+
56
+ # run a command on Linux/Unix/Mac
57
+ ret['node']['cpe'] = conn.run_command('hostnamectl | grep "Static hostname: "').stdout
58
+ ret['node']['chassis'] = conn.run_command('hostnamectl | grep "Chassis: "').stdout
59
+ ret['node']['machine_id'] = conn.run_command('hostnamectl | grep "Machine ID: "').stdout
60
+ ret['node']['boot_id'] = conn.run_command('hostnamectl | grep "Boot ID: "').stdout
61
+ ret['node']['virtualization'] = conn.run_command('hostnamectl | grep "Virtualization: "').stdout
62
+ ret['node']['operating_system'] = conn.run_command('hostnamectl | grep "Operating System: "').stdout
63
+ ret['node']['kernel'] = conn.run_command('hostnamectl | grep "Kernel: "').stdout
64
+ ret['node']['architecture'] = conn.run_command('hostnamectl | grep "Architecture: "').stdout
65
+
66
+ #Uname (General)
51
67
  ret['node']['uname_sysname'] = Uname.sysname # => The operating system name. e.g. "SunOS"
52
68
  ret['node']['uname_machine'] = Uname.machine # => The machine hardware type. e.g. "i686"
53
69
  ret['node']['uname_version'] = Uname.version # => The operating system version. e.g. "5.8". Windows includes patch information.
54
70
  ret['node']['uname_release'] = Uname.release # => The operating system release. e.g. "2.2.16-3"
55
- ret['node']['uname_architecture'] = Uname.architecture # => Returns the instruction set architecture. e.g. "sparc"
56
- ret['node']['uname_platform'] = Uname.platform # => The platform identifier. e.g. "SUNW,Sun-Blade-100"
57
- ret['node']['uname_isa_list'] = Uname.isa_list # => List of supported instr. sets, e.g. "amd64 pentium_pro+mmx pentium_pro"
58
- ret['node']['uname_hw_provider'] = Uname.hw_provider # => The name of the hardware manufacturer.
59
- ret['node']['uname_hw_serial_number'] = Uname.hw_provider # => Uname.hw_serial_number # => The hardware serial number
71
+
72
+ #Uname (Solaris-Only)
73
+ #ret['node']['uname_architecture'] = Uname.architecture # => Returns the instruction set architecture. e.g. "sparc"
74
+ #ret['node']['uname_platform'] = Uname.platform # => The platform identifier. e.g. "SUNW,Sun-Blade-100"
75
+ #ret['node']['uname_isa_list'] = Uname.isa_list # => List of supported instr. sets, e.g. "amd64 pentium_pro+mmx pentium_pro"
76
+ #ret['node']['uname_hw_provider'] = Uname.hw_provider # => The name of the hardware manufacturer.
77
+ #ret['node']['uname_hw_serial_number'] = Uname.hw_provider # => Uname.hw_serial_number # => The hardware serial number
60
78
 
61
79
  puts ret if output
62
80
 
@@ -1,3 +1,3 @@
1
1
  module Anamo
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anamo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anamo, Inc.
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: sys/uname
98
+ name: sys-uname
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="