Hacker News new | ask | show | jobs
by jacquesm 6159 days ago
A buddy of mine is on a holiday and asked me to monitor his pages for him. Little did I know that his goes off a bit more frequently than I like :) One of the problems I've traced back to a java process that hangs with some regularity. Because I don't want to go and mess with it beyond my current understanding of the system and the system seems to come back up reliably after restarting the service I figured that a quick & dirty way to guarantee a good nights sleep would be to auto-restart the process on failure to retrieve a url due to time-out or other connect issues.

Nagios will do the job but it's total overkill. Ideally a simple solution such as:

    ./monitor http://localhost:someport/ 60 "/etc/init.d/someservice restart" 
should do the trick (resource, checkinterval, action)
1 comments

If you already know how Nagios works or have set it up previously, then you and your friend may be better off if you go with it even if it is "overkill". You could probably have it done in 20 minutes and when your friend gets back they'll have something standard and easy to maintain or extend.