I recently had the desire to start monitoring some FastCGI servers using monit. Richard Wallman has a recipe posted here which seems to work for people, but it wasn't working for me, so I wrote something else.
The script below (downloadable directly here) is a very small implementation of just enough of the FastCGI protocol to connect to a server and verify that it appears to be working—or at least responding to requests. Since there didn't seem to be anything else out there that did this, I'm posting it for general use.
Invoke the program with a single argument, a hostname (or IP address) and port, separated by a colon. The exit code will be zero if everything worked well, and nonzero otherwise.
The script requires node, and if you wish to use it with monit, it requires version 5.3 of that program.