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 yhbt.net/raindrops-demo/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 yhbt.net/raindrops-demo/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 yhbt.net/raindrops-demo/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 yhbt.net/raindrops-demo/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 yhbt.net/raindrops-demo/ The Raindrops::Middleware demo is also accessible at yhbt.net/raindrops-demo/_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://yhbt.net/raindrops-public/
	http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/raindrops-public 
	nntps://news.public-inbox.org/inbox.comp.lang.ruby.raindrops 
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.raindrops 
	imaps://yhbt.net/inbox.comp.lang.ruby.raindrops.0 
	imap://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.raindrops.0 
public: raindrops-public@yhbt.net
source code: git clone https://yhbt.net/raindrops.git
	torsocks git clone http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/raindrops.git