Class | Raindrops::Watcher |
In: |
lib/raindrops/watcher.rb
(CVS)
|
Parent: | Object |
Raindrops::Watcher is a stand-alone Rack application for watching any number of TCP and UNIX listeners (all of them by default).
It depends on the Aggregate RubyGem
In your Rack config.ru:
run Raindrops::Watcher(options = {})
It takes the following options hash:
Raindrops::Watcher is compatible any thread-safe/thread-aware Rack middleware. It does not work well with multi-process web servers but can be used to monitor them. It consumes minimal resources with the default :delay.
Returns an HTML summary listing of all listen interfaces watched on
Returns a plain text summary + histogram with X-* HTTP headers for active connections.
e.g.: curl raindrops-demo.bogomips.org/active/0.0.0.0%3A80.txt
Returns an HTML summary + histogram with X-* HTTP headers for active connections.
e.g.: curl raindrops-demo.bogomips.org/active/0.0.0.0%3A80.html
Returns a plain text summary + histogram with X-* HTTP headers for queued connections.
e.g.: curl raindrops-demo.bogomips.org/queued/0.0.0.0%3A80.txt
Returns an HTML summary + histogram with X-* HTTP headers for queued connections.
e.g.: curl raindrops-demo.bogomips.org/queued/0.0.0.0%3A80.html
Resets the active and queued statistics for the given listener.
Streams chunked a response to the client. Interval is the preconfigured +:delay+ of the application (default 1 second)
The response is plain text in the following format:
ISO8601_TIMESTAMP LISTENER_NAME ACTIVE_COUNT QUEUED_COUNT LINEFEED
Query parameters:
The following headers are only present if X-Count is greater than one.
There is a server running this app at raindrops-demo.bogomips.org/ The Raindrops::Middleware demo is also accessible at raindrops-demo.bogomips.org/_raindrops
The demo server is only limited to 30 users, so be sure not to abuse it by using the /tail/ endpoint too much.