LICENSE NEWS README
Raindrops Aggregate Aggregate::LastDataRecv Aggregate::PMQ InetDiagSocket LastDataRecv Linux ListenStats Middleware Middleware::Proxy Struct TCP_Info Watcher

class Raindrops::Watcher

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.

HTTP endpoints

GET /

Returns an HTML summary listing of all listen interfaces watched on

GET /active/$LISTENER.txt

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

GET /active/$LISTENER.html

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

GET /queued/$LISTENER.txt

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

GET /queued/$LISTENER.html

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

POST /reset/$LISTENER

Resets the active and queued statistics for the given listener.

GET /tail/$LISTENER.txt?active_min=1&queued_min=1

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:

Response headers (mostly the same names as Raindrops::LastDataRecv)

The following headers are only present if X-Count is greater than one.

Demo Server

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.


Pages Classes Methods
mail archives: https://bogomips.org/raindrops-public/
	http://ou63pmih66umazou.onion/raindrops-public 
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.raindrops 
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.raindrops 
public: raindrops-public@bogomips.org
source code: git clone git://bogomips.org/raindrops.git
	git clone https://bogomips.org/raindrops.git