anamo 1.1.5 → 1.1.88

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: 8710fa69bba9fa27a00b89f0a4f15f2fb5f1dcc23d2b968bb11f6dbecc047501
4
- data.tar.gz: d016007e6d6451f7bdd1457f3fe310f09a38b7d0f012e4bb9af19e89331641c5
3
+ metadata.gz: 02405ec3b509097973f6cfa77008d96f7aeee0529e86ad9eeb16bf9f665f8e51
4
+ data.tar.gz: f49a2e774c8b22c76cb1176dcfd00d38dca24827fa497907dbbb3eea4f63def1
5
5
  SHA512:
6
- metadata.gz: 2a060b354356c409f5e145377ad1f4c808b7a5600a27525f6193ca63c7481f27b0e90f42756c02d6b37c0fb2bee37a445efc745295cbce234c66824267aeb050
7
- data.tar.gz: e8ebc708ea75d392b5ce268ad4547d1441d2ffb2beeaaae7d33af7054c38cad8af349983311110296bb17b8cf3ff66e0a1b70d148a81e3ad9916b7a1f66a3e5d
6
+ metadata.gz: 94bb0274f4916bb3ae09e13de65ee72ef380fa235f39e82d9c5ad476f5c6e07402e0dcb46d2529c29e14ec68c4f20e1d6d2f8709265ef9a8efcd8d35c6f61491
7
+ data.tar.gz: e710af0af6c1eb2eda1b3341f516d0eceb1e782c49d05430e91fee6b64060984e9a310547ceec2029a913d9bb052357e5ca462ce5e75bbfa61574e2a723818af
data/bin/anamo CHANGED
@@ -7,9 +7,11 @@ if ARGV[2]
7
7
  path = ARGV[2]
8
8
  # otherwise use system path
9
9
  else
10
- path = '/etc/anamo.conf.yml'
10
+ path = '#{HOME}/anamo.conf.yml"' #path = '/etc/anamo/conf.yml'
11
11
  end
12
12
 
13
+
14
+
13
15
  unless ARGV[0] == 'setup'
14
16
 
15
17
  if File.exists? path
@@ -19,7 +21,7 @@ unless ARGV[0] == 'setup'
19
21
  multiple: false,
20
22
  monitor: true,
21
23
  log_output: true,
22
- dir: '/var/log/anamo',
24
+ dir: '#{HOME}/anamo/logs/anamo.log"' #'/var/log/anamo',
23
25
  force_kill_waittime: 15,
24
26
  dir_mode: :system
25
27
 
@@ -7,8 +7,8 @@ module Anamo
7
7
 
8
8
  def initialize
9
9
  @api_base_url = 'https://app.anamo.io/api'
10
- @config = YAML.load_file "/etc/anamo.conf.yml"
11
- @client_key = File.exists?("/etc/anamo.client.key") ? File.open("/etc/anamo.client.key", 'rb') { |f| f.read } : nil
10
+ @config = YAML.load_file "#{Dir.home('ubuntu')}/anamo.conf.yml"
11
+ @client_key = File.exists?("#{Dir.home('ubuntu')}/anamo.client.key") ? File.open("#{Dir.home('ubuntu')}/anamo.client.key", 'rb') { |f| f.read } : nil
12
12
  end
13
13
 
14
14
  def make_url path
@@ -1,3 +1,3 @@
1
1
  ---
2
- api_key: 63ITKI8a0CrQQW06rK
2
+ api_key:
3
3
  modules: {}
@@ -37,8 +37,12 @@ module Anamo
37
37
 
38
38
  ret = {}
39
39
 
40
- config = YAML.load_file "/etc/anamo.conf.yml"
40
+ config = YAML.load_file "#{Dir.home('ubuntu')}/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']
@@ -50,14 +54,14 @@ module Anamo
50
54
  ret['node']['os_release'] = Train.create('local').connection.os[:release]
51
55
 
52
56
  # run a command on Linux/Unix/Mac
53
- ret['node']['cpe'] conn.run_command('hostnamectl | grep "Static hostname: "').stdout
54
- ret['node']['chassis'] conn.run_command('hostnamectl | grep "Chassis: "').stdout
55
- ret['node']['machine_id'] conn.run_command('hostnamectl | grep "Machine ID: "').stdout
56
- ret['node']['boot_id'] conn.run_command('hostnamectl | grep "Boot ID: "').stdout
57
- ret['node']['virtualization'] conn.run_command('hostnamectl | grep "Virtualization: "').stdout
58
- ret['node']['operating_system'] conn.run_command('hostnamectl | grep "Operating System: "').stdout
59
- ret['node']['kernel'] conn.run_command('hostnamectl | grep "Kernel: "').stdout
60
- ret['node']['architecture'] conn.run_command('hostnamectl | grep "Architecture: "').stdout
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
61
65
 
62
66
  #Uname (General)
63
67
  ret['node']['uname_sysname'] = Uname.sysname # => The operating system name. e.g. "SunOS"
@@ -143,7 +147,7 @@ module Anamo
143
147
  if defined? @config_file_path
144
148
  @config_file_path
145
149
  else
146
- return '/etc/anamo.conf.yml'
150
+ return "#{Dir.home('ubuntu')}/anamo.conf.yml"
147
151
  end
148
152
  end
149
153
 
@@ -152,7 +156,7 @@ module Anamo
152
156
  private
153
157
 
154
158
  def key_file
155
- "/etc/anamo.client.key"
159
+ "#{Dir.home('ubuntu')}/anamo.client.key"
156
160
  end
157
161
 
158
162
  end
@@ -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 = '
8
8
  end
9
9
 
10
10
  config = YAML.load_file(path)
@@ -1,3 +1,3 @@
1
1
  module Anamo
2
- VERSION = "1.1.5"
2
+ VERSION = "1.1.88"
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.5
4
+ version: 1.1.88
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-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -164,8 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  requirements: []
167
- rubyforge_project:
168
- rubygems_version: 2.7.3
167
+ rubygems_version: 3.1.4
169
168
  signing_key:
170
169
  specification_version: 4
171
170
  summary: This gem provides a beacon that collects system telemetry for a client and