anamo 1.1.3 → 1.1.8

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: b248375e60e38489f546fd888ad95d8ca1e8cd55ca297121ee8b61713f7cb49d
4
- data.tar.gz: a972b4a46d6ba2bcaf52246d7a7127e99464cadf90e9bfd23832055c9cae8c72
3
+ metadata.gz: ef328fa1e935577845c7e2a1b50cf7f0f7d1d30cdb23c88e8130d2db94a137fa
4
+ data.tar.gz: 5c94cadf11d8fd7c469878f19fb68e5795570c836fdf5df1b2d88fd5b0eec7ef
5
5
  SHA512:
6
- metadata.gz: 1f022479534a6af3a72588f75f064153d370f5986327c7d73dc522abc29ca13f88af74316765bb1ab22e6555f859a41032372b2fb78e1c876a133b5d5bdd15b4
7
- data.tar.gz: e1ac6b4ff9a71f714c45528681439bc2a3fab7a2cb2194183b5d73e95981dd4d76e4eedc1b34548f5416f85bb2dab00ffba990c67ff3dbb45f8c2d26f687c8dd
6
+ metadata.gz: f07cc659c8616a27ec8a9f82d9d5688a8c60fb8a6e0fa346c69fd38e0b55d9f87b76b34b0fc5bdfa1c5db522690f831bff8d7c2f81bbfa354eb6337c04fd0cf8
7
+ data.tar.gz: 8d5b17f547def102bbd5ab18a6c1e210646fb2cda082f54ab67be075868ecc3ebb9aa143435f25229778e4190b295e3287c5937c55773f75e742fe8c099afaa1
@@ -1,3 +1,3 @@
1
1
  ---
2
- api_key: 63ITKI8a0CrQQW06rK
2
+ api_key:
3
3
  modules: {}
@@ -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
 
@@ -4,7 +4,7 @@ require 'yaml'
4
4
  if ARGV[0]
5
5
  path = ARGV[0]
6
6
  else
7
- path = '/etc/anamo.conf.yml'
7
+ path = '/$HOME/anamo.conf.yml'
8
8
  end
9
9
 
10
10
  config = YAML.load_file(path)
@@ -1,3 +1,3 @@
1
1
  module Anamo
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anamo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anamo, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-09 00:00:00.000000000 Z
11
+ date: 2020-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor