scout 5.3.1 → 5.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 5.3.2
2
+
3
+ * New --name="My Server" option to specify server name from the scout command.
4
+
1
5
  == 5.3.1
2
6
 
3
7
  * Write a log message if a full disk prevents Scout from creating a history file.
data/lib/scout.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby -wKU
2
2
 
3
3
  module Scout
4
- VERSION = "5.3.1".freeze
4
+ VERSION = "5.3.2".freeze
5
5
  end
6
6
 
7
7
  require "scout/command"
data/lib/scout/command.rb CHANGED
@@ -65,6 +65,11 @@ module Scout
65
65
  options[:level] = level
66
66
  end
67
67
 
68
+ opts.on( "-n", "--name NAME", String,
69
+ "Optional name to display for this server." ) do |server_name|
70
+ options[:server_name] = server_name
71
+ end
72
+
68
73
  opts.separator " "
69
74
  opts.separator "Common Options:"
70
75
  opts.separator "--------------------------------------------------------------------------"
@@ -146,6 +151,7 @@ module Scout
146
151
  @verbose = options[:verbose] || false
147
152
  @level = options[:level] || "info"
148
153
  @force = options[:force] || false
154
+ @server_name = options[:server_name]
149
155
 
150
156
  @args = args
151
157
 
@@ -157,7 +163,7 @@ module Scout
157
163
 
158
164
  end
159
165
 
160
- attr_reader :server, :history, :config_dir, :log_path
166
+ attr_reader :server, :history, :config_dir, :log_path, :server_name
161
167
 
162
168
 
163
169
  def verbose?
@@ -9,7 +9,7 @@ module Scout
9
9
  configuration_directory = config_dir
10
10
  log.debug("Configuration directory is #{configuration_directory} ") if log
11
11
  # TODO: too much external logic of command doing things TO server. This should be moved into the server class.
12
- @scout = Scout::Server.new(server, key, history, log)
12
+ @scout = Scout::Server.new(server, key, history, log, server_name)
13
13
  @scout.load_history
14
14
 
15
15
  unless $stdin.tty?
data/lib/scout/server.rb CHANGED
@@ -41,12 +41,13 @@ module Scout
41
41
  attr_reader :plugin_config
42
42
 
43
43
  # Creates a new Scout Server connection.
44
- def initialize(server, client_key, history_file, logger = nil)
44
+ def initialize(server, client_key, history_file, logger = nil, server_name=nil)
45
45
  @server = server
46
46
  @client_key = client_key
47
47
  @history_file = history_file
48
48
  @history = Hash.new
49
49
  @logger = logger
50
+ @server_name = server_name
50
51
  @plugin_plan = []
51
52
  @directives = {} # take_snapshots, interval, sleep_interval
52
53
  @new_plan = false
@@ -397,7 +398,8 @@ module Scout
397
398
  :errors => Array.new,
398
399
  :summaries => Array.new,
399
400
  :snapshot => '',
400
- :config_path => File.expand_path(File.dirname(@history_file))}
401
+ :config_path => File.expand_path(File.dirname(@history_file)),
402
+ :server_name => @server_name}
401
403
  end
402
404
 
403
405
  def show_checkin(printer = :p)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout
3
3
  version: !ruby/object:Gem::Version
4
- hash: 57
4
+ hash: 63
5
5
  prerelease: false
6
6
  segments:
7
7
  - 5
8
8
  - 3
9
- - 1
10
- version: 5.3.1
9
+ - 2
10
+ version: 5.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Scout Monitoring
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-03 00:00:00 -07:00
18
+ date: 2011-05-10 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency