bloopletech-webstats 0.2.0 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -1,27 +1,39 @@
1
1
  Webstats
2
2
  ========
3
3
 
4
- Webstats is a server and clients that monitors your servers performance (CPU usage, memory usage, disk usage) and allows you to get notifications on your computer when the server is having problems, as well as showing (http://kimag.es/share/91090734.png) the current performance stats for the server on a web page.
4
+ Webstats is a server and clients that monitors your servers performance (CPU usage, memory usage, disk usage, disk activity, url load time) and allows you to get notifications on your computer when the server is having problems, as well as showing (http://kimag.es/share/91090734.png) the current performance stats for the server on a web page.
5
5
 
6
6
  Webstats has 2 components: the _server_ and one or more _clients_.
7
7
 
8
8
  Server
9
9
  ------
10
- The server runs on the computer whose performance you want to monitor; the server application's job is to (1) monitor the computer's performance and (2) report these performance statistics through a webserver that the server app runs.
10
+ The server runs on the computer whose performance you want to monitor; the server application's job is to (1) monitor the computer's performance and (2) report these performance statistics through a webserver that the server application runs.
11
11
 
12
12
  See Installation below for install instructions.
13
13
 
14
- The server app executes in the background and starts a tiny webserver on port 9970. You can view the performance stats for your server by going to http://<server's hostname>:9970/, for example if my server was under the domain name bloople.net, I would go to http://bloople.net:9970/ to see my performance stats. The statistics on this page automatically update every 5 seconds. You may need to open port 9970 if you have a firewall on your server. Note that the various clients get their data via the webserver the server app runs, just like the built-in stats page.
14
+ The server application executes in the background and starts a tiny webserver on port 9970. You can view the performance stats for your server by going to http://<server's hostname>:9970/, for example if my server was under the domain name bloople.net, I would go to http://bloople.net:9970/. The statistics on this page automatically update every 5 seconds. You may need to open port 9970 if you have a firewall on your server. Note that the various clients get their data via the webserver the server application runs, just like the built-in stats page.
15
+
16
+ The statistic provided by the server application are:
17
+
18
+ * CPU usage and load average
19
+ * Memory (RAM) usage, with free, free - buffers, and total counts
20
+ * Disk usage by mount point
21
+ * Disk activity for reads and writes
22
+ * URL monitoring, to load URL's you specify to ensure they work
23
+
24
+ The server application will warn you of any of these statistics indicate a problem on the server - for example if you've have < 5MB free RAM for the last 12 seconds, that indicates a potential problem on your server that needs looking at. If you're looking at the performance statistics web page, the warnings will be presented by higlighting the perf stat that's causing the warning; when you're using a client application, it will present warnings to you as it sees fit.
25
+
26
+ You can configure at what thresholds the warnings get generated, as well as the URL's to monitor, by editing ~/.webstats. This file is generated the first time you run webstats, so it's pre-filled with sensible defaults; but you can change them as you see fit.
15
27
 
16
28
  You can prevent public access to your webstats by invoking the server application with a single argument (e.g. ruby webstats.rb <password>). Then, when you visit the webstats, you'll be prompted for a username and password; the username is always 'webstats', and the password is the password specified just above.
17
29
 
18
- The server application requires Linux kernel 2.6+, will not work in *BSD or OS X; the server application requires only Ruby; it does not rely on rubygems or any external libraries that aren't included with Ruby; the server application uses very little RAM, approximately 7MB.
30
+ The server application requires Linux kernel 2.6+, will not work in *BSD or OS X; the server application requires only Ruby; it does not rely on rubygems or any external libraries that aren't included with Ruby; the server application uses very little RAM, approximately 10MB.
19
31
 
20
32
  All the client applications depend on the server application being run to work.
21
33
 
22
34
  Clients
23
35
  -------
24
- If all you want to do is be able to view the performance stats for your server in a web browser, then you don't need to use any of these clients; going to http://<server's hostname>:9970/ will do just fine. But if you want to have Growl or email notification when something goes wrong, without having to look at a web page all the time, then you'll want one of the client applications that come with Webstats.
36
+ If all you want to do is be able to view the performance statistics for your server in a web browser, then you don't need to use any of these clients; going to http://<server's hostname>:9970/ will do just fine. But if you want to have Growl or email notification when something goes wrong, without having to look at a web page all the time, then you'll want one of the client applications that come with Webstats.
25
37
 
26
38
  Right now there's only one client application available, which is a Growl notifier. The Growl notifier only works on OS X, with RubyCocoa installed. This application runs in the background and monitors the server; if the server goes under high CPU load for more than a few seconds, or if the server is nearly out of memory, you'll get a Growl notification saying what the problem is. This way, you can just set and forget, knowing that Webstats will report any problems.
27
39
 
@@ -59,13 +71,9 @@ To run the server app, ssh into the computer you want to monitor. then run:
59
71
 
60
72
  Todo
61
73
  ----
62
- * (DONE) (Coming soon) Add disk space remaining, with warnings / danger signals.
63
- * (DONE) (Coming soon) Add optional authentication to server application.
64
- * (Coming soon) Make webstats configurable.
65
74
  * Add email notifier to client applications.
66
75
  * More client applications.
67
76
  * Extend server to work on *BSD (including OS X).
68
77
  * Make webstats server optionally install itself to run at boot.
69
78
  * Make client applications optionally install themselves at boot, where suitable.
70
- * (DONE) Make into a gem?
71
79
  * (Maybe) Move all server code into it's own module and make code work without running the web server, so you can use it to just grab stats in your own code.
data/Rakefile CHANGED
@@ -11,8 +11,8 @@ begin
11
11
  s.date = Date.today.strftime("%Y-%m-%d")
12
12
  s.description = s.summary = %q{Display server CPU/Memory/Disk Usage on a web page, suitable for remote performance monitoring.}
13
13
  s.email = %q{i@bloople.net}
14
- s.files = Dir['**/*'].reject { |fn| fn =~ /(\.o|\.so|Makefile)$/ }
15
- s.executables = ['webstats']
14
+ s.files = Dir['**/*'].reject { |fn| fn =~ /(\.o|\.so|Makefile|\.gem)$/ }
15
+ s.executables = ['webstats', 'webstats_growl_notifier']
16
16
  s.extensions = ["server/data_providers/extconf.rb"]
17
17
  s.has_rdoc = false
18
18
  s.homepage = %q{http://github.com/bloopletech/webstats}
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 2
4
- :patch: 0
4
+ :patch: 3
@@ -0,0 +1 @@
1
+ require File.dirname(__FILE__) + '/../clients/growl_notifier/growl_notifier'
data/server/webstats.rb CHANGED
@@ -84,7 +84,7 @@ module DataProviders
84
84
  DATA_SOURCES_CLASSES = {}
85
85
  DATA_SOURCES = {}
86
86
  def self.preload
87
- Dir.glob("#{File.dirname(__FILE__)}/data_providers/*.rb").each { |file| load file }
87
+ Dir.glob("#{File.dirname(__FILE__)}/data_providers/*.rb").each { |file| load file unless file =~ /extconf.rb$/ }
88
88
  DataProviders.constants.each do |c|
89
89
  c = DataProviders.const_get(c)
90
90
  DATA_SOURCES_CLASSES[c.to_s.gsub(/^DataProviders::/, '').underscore] = c if c.is_a? Class
data/webstats.gemspec CHANGED
@@ -2,15 +2,14 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{webstats}
5
- s.version = "0.2.0"
5
+ s.version = "0.2.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Brenton Fletcher"]
9
- s.date = %q{2009-04-25}
10
- s.default_executable = %q{webstats}
9
+ s.date = %q{2009-04-27}
11
10
  s.description = %q{Display server CPU/Memory/Disk Usage on a web page, suitable for remote performance monitoring.}
12
11
  s.email = %q{i@bloople.net}
13
- s.executables = ["webstats"]
12
+ s.executables = ["webstats", "webstats_growl_notifier"]
14
13
  s.extensions = ["server/data_providers/extconf.rb"]
15
14
  s.extra_rdoc_files = [
16
15
  "LICENSE",
@@ -22,6 +21,7 @@ Gem::Specification.new do |s|
22
21
  "Rakefile",
23
22
  "VERSION.yml",
24
23
  "bin/webstats",
24
+ "bin/webstats_growl_notifier",
25
25
  "clients/email_notifier/email_notifier.rb",
26
26
  "clients/growl_notifier/Growl.rb",
27
27
  "clients/growl_notifier/growl_notifier.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bloopletech-webstats
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brenton Fletcher
@@ -9,14 +9,15 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-25 00:00:00 -07:00
13
- default_executable: webstats
12
+ date: 2009-04-27 00:00:00 -07:00
13
+ default_executable:
14
14
  dependencies: []
15
15
 
16
16
  description: Display server CPU/Memory/Disk Usage on a web page, suitable for remote performance monitoring.
17
17
  email: i@bloople.net
18
18
  executables:
19
19
  - webstats
20
+ - webstats_growl_notifier
20
21
  extensions:
21
22
  - server/data_providers/extconf.rb
22
23
  extra_rdoc_files:
@@ -28,6 +29,7 @@ files:
28
29
  - Rakefile
29
30
  - VERSION.yml
30
31
  - bin/webstats
32
+ - bin/webstats_growl_notifier
31
33
  - clients/email_notifier/email_notifier.rb
32
34
  - clients/growl_notifier/Growl.rb
33
35
  - clients/growl_notifier/growl_notifier.rb