scout 5.5.4 → 5.5.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ == 5.5.5
2
+
3
+ * Fix for blank PID file
4
+ * Added client version + hostname when starting run in debug mode
5
+
1
6
  == 5.5.4
2
7
 
3
8
  * Fixes warnings with Ruby 1.9.3p0
data/README.markdown ADDED
@@ -0,0 +1,65 @@
1
+ # Scout Server Monitoring Agent
2
+
3
+ [Scout](https://scoutapp.com) is an easy-to-use hosted server monitoring service. The `scout` Ruby gem reports metrics to our service. The agent runs plugins, configured via the Scout web interface, to monitor a server. [View a list of available plugins on our website](https://scoutapp.com/plugin_urls) and [their source on Github](http://github.com/scoutapp/scout-plugins).
4
+
5
+ ## Installing
6
+
7
+ Install the Scout gem:
8
+
9
+ $ gem install scout
10
+
11
+ Then simply run:
12
+
13
+ $ scout
14
+
15
+ to start the installation wizard. You'll need your server key, provided via Scout's web UI, to continue. Scout's web UI also provides additional troubleshooting and Ruby installation instructions.
16
+
17
+ ## Running the Scout Agent
18
+
19
+ The Scout agent has several modes of operation and commands. The normal, intended usage is through a scheduled interval with no output.
20
+
21
+ Normal checkin with server:
22
+
23
+ $ scout [OPTIONS] SERVER_KEY
24
+
25
+ Install:
26
+
27
+ $ scout
28
+ $ scout [OPTIONS] install
29
+
30
+ Local plugin testing:
31
+
32
+ $ scout [OPTIONS] test PATH_TO_PLUGIN [PLUGIN_OPTIONS]
33
+
34
+
35
+ `SERVER_KEY` is the identification key assigned by your account at http://scoutapp.com.
36
+
37
+ `PATH_TO_PLUGIN` is the file system path to a Ruby file that contains a Scout plugin.
38
+
39
+ `PLUGIN_OPTIONS` are one or more options in the form:
40
+
41
+ key1=val1 key2=val2
42
+
43
+ These options will be used for the plugin run.
44
+
45
+ ## Setting up in Cron
46
+
47
+ Configure Scout to run every minute. Typically, this will look like:
48
+
49
+ * * * * * deploy /usr/bin/scout SERVER_KEY
50
+
51
+ It's often helpful to log the output to a file. To do so:
52
+
53
+ * * * * * deploy /usr/bin/scout SERVER_KEY > /path/to/anywhere/scout.out 2>&1
54
+
55
+ ## Troubleshooting
56
+
57
+ Extensive help is available via our website (http://scoutapp.com) and while installing the agent via the Scout web UI.
58
+
59
+ ## Credits / Contact
60
+
61
+ Contact support@scoutapp.com with questions.
62
+
63
+ Primary maintainers: Andre Lewis (andre@scoutapp.com) and Derek Haynes (derek@scoutapp.com)
64
+
65
+ Many thanks to James Edward Gray II, Charles Brian Quinn, and Matt Todd for early work on the Scout agent!
data/lib/scout/command.rb CHANGED
@@ -234,24 +234,28 @@ module Scout
234
234
  end
235
235
  end
236
236
  rescue
237
- pid = File.read(pid_file).strip.to_i rescue "unknown"
238
237
  running = true
239
- begin
240
- Process.kill(0, pid)
241
- if stat = File.stat(pid_file)
242
- if mtime = stat.mtime
243
- if Time.now - mtime > 25 * 60 # assume process is hung after 25m
244
- log.info "Trying to KILL an old process..." if log
245
- Process.kill("KILL", pid)
246
- running = false
238
+ pid = File.read(pid_file).strip.to_i rescue "unknown"
239
+ if pid.zero?
240
+ running = false
241
+ else
242
+ begin
243
+ Process.kill(0, pid)
244
+ if stat = File.stat(pid_file)
245
+ if mtime = stat.mtime
246
+ if Time.now - mtime > 25 * 60 # assume process is hung after 25m
247
+ log.info "Trying to KILL an old process..." if log
248
+ Process.kill("KILL", pid)
249
+ running = false
250
+ end
247
251
  end
248
252
  end
253
+ rescue Errno::ESRCH
254
+ running = false
255
+ rescue
256
+ # do nothing, we didn't have permission to check the running process
249
257
  end
250
- rescue Errno::ESRCH
251
- running = false
252
- rescue
253
- # do nothing, we didn't have permission to check the running process
254
- end
258
+ end # pid.zero?
255
259
  if running
256
260
  if pid == "unknown"
257
261
  log.warn "Could not create or read PID file. " +
@@ -7,6 +7,7 @@ module Scout
7
7
  key = @args.first
8
8
  # TODO: this is an awkward way to force creation of the config directory. Could use a little refactoring.
9
9
  configuration_directory = config_dir
10
+ log.debug("Running Scout [#{Scout::VERSION}] on #{Socket.gethostname}") if log
10
11
  log.debug("Configuration directory is #{configuration_directory} ") if log
11
12
  # TODO: too much external logic of command doing things TO server. This should be moved into the server class.
12
13
  @scout = Scout::Server.new(server, key, history, log, server_name, @http_proxy, @https_proxy)
data/lib/scout/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Scout
2
- VERSION = "5.5.4"
2
+ VERSION = "5.5.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.5.4
4
+ version: 5.5.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-02-24 00:00:00.000000000 Z
14
+ date: 2012-07-03 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: elif
18
- requirement: &2156074720 !ruby/object:Gem::Requirement
18
+ requirement: &2157262900 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,7 +23,7 @@ dependencies:
23
23
  version: '0'
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *2156074720
26
+ version_requirements: *2157262900
27
27
  description: ! 'Scout makes monitoring and reporting on your web applications as flexible
28
28
  and simple as possible.
29
29
 
@@ -38,7 +38,7 @@ files:
38
38
  - CHANGELOG
39
39
  - Gemfile
40
40
  - LICENSE
41
- - README
41
+ - README.markdown
42
42
  - Rakefile
43
43
  - bin/scout
44
44
  - data/cacert.pem
data/README DELETED
@@ -1,74 +0,0 @@
1
- = ReadMe
2
-
3
- Scout by Highgroove Studios
4
-
5
- == Description
6
-
7
- The easier way to monitor servers and web applications.
8
-
9
- Scout makes monitoring and reporting on your web applications
10
- as flexible and simple as possible.
11
-
12
- Scout is a product of Highgroove Studios.
13
- Please visit http://scoutapp.com for more information.
14
-
15
- == Installing
16
-
17
- Install the Scout gem:
18
-
19
- $ sudo gem install scout
20
-
21
- Then simply run:
22
-
23
- $ scout
24
-
25
- to run the installation wizard. You'll need your server key to continue. Get the server key from your account at http://scoutapp.com
26
-
27
- == Running the Scout Client
28
-
29
- The Scout client has several modes of operation and commands. The normal, intended usage is through a scheduled interval with no output.
30
-
31
- Normal checkin with server:
32
- $ scout [OPTIONS] SERVER_KEY
33
- ... OR ...
34
- $ scout [OPTIONS] run SERVER_KEY
35
-
36
- Install:
37
- $ scout
38
- ... OR ...
39
- $ scout [OPTIONS] install
40
-
41
- Local plugin testing:
42
- $ scout [OPTIONS] test PATH_TO_PLUGIN [PLUGIN_OPTIONS]
43
-
44
-
45
- SERVER_KEY is the identification key assigned by your account at http://scoutapp.com
46
-
47
- PATH_TO_PLUGIN is the file system path to a Ruby file
48
- that contains a Scout plugin.
49
-
50
- PLUGIN_OPTIONS are one or more options in the form:
51
- key1=val1 key2=val2
52
- These options will be used for the plugin run.
53
-
54
-
55
- == Setting up in cron
56
-
57
- Configure Scout to run every minute. Typically, this will look like:
58
-
59
- * * * * * deploy /usr/bin/scout SERVER_KEY
60
-
61
- It's often helpful to log the output to a file. To do so:
62
-
63
- * * * * * deploy /usr/bin/scout SERVER_KEY > /path/to/anywhere/scout.out 2>&1
64
-
65
-
66
- For additional help, please visit http://scoutapp.com
67
-
68
- == Credits / Contact
69
-
70
- Contact support@scoutapp.com with questions.
71
-
72
- Primary maintainers: Andre Lewis (andre@scoutapp.com) and Derek Haynes (derek@scoutapp.com)
73
-
74
- Many thanks to James Edward Gray II, Charles Brian Quinn, and Matt Todd for early work on the Scout agent!