Request Blinker

Some folks have a zen garden on their desk in the office. I have a Raspberry PI. What to do when you need a break and get your mind off something? Make something.

Today it was a something to tie in to some of our web servers to watch requests and blink LEDs based on HTTP status code.

I wrote a Node.js script which SSH’s into a few of our application servers, which then stream the application log output parsing requests for the response status code and url path, so the blinker can report on a particular route or set of routes. Event counts would get aggregated over one second and the LED’s would get blinked accordingly. This way, multiple servers can be counted to get a better idea of simultaneous flow rate across the platform.

I only had one suitable resistor in the office, so the LED’s would appear to get stuck when trying to blink. This was fixed later by ensuring each LED had its own resistor.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.