I'm looking at building a monitor for our node.js server. Was thinking of having a Perl client watching what comes out of the node.js pipeline and having that alert nagios if things aren't kosher.
The node.js server responds fine to regular websocket connections from the browser, that part has been working for months, I'm just looking to add monitoring.
Using the sample code in the Perl module AnyEvent::WebSocket::Client, the server logs this message and closes the connection
warn - unknown transport: "undefined"
which is coming from node_modules/socket.io/lib/manager.js
:
if (!~this.get('transports').indexOf(data.transport)) {
this.log.warn('unknown transport: "' + data.transport + '"');
req.connection.end();
return;
}
I don't see any more documentation on setting "transport" in the Perl client, or on setting anything else for that matter. It doesn't seem to be a query parameter in the url. Can anybody offer any suggestions or pointers as to what I might be missing? Should that sample code work?
Taking a shot over the bough have you already tried
npm install nagios