On 1/4/2012 1:38 PM, Mike Zupan wrote: > I have the following > > check process app_thin_8101 with pidfile > /data/app/current/tmp/pids/thin.8101.pid > start = "/etc/init.d/thin start 8101" > stop = "/etc/init.d/thin stop 8101" > if totalmem > 500.0 MB for 3 cycles then restart > if failed host 127.0.0.1 port 8101 protocol http for 3 cycles then restart > if 9 restarts within 9 cycles then timeout > > The issue is it keeps restarting that thin process. I can curl > 127.0.0.1:8101 just fine. The issue might be / is a 404 in our app. Is > there a way to tell monit a 404 is ok or have it hit a url?
Yes, a 404 response is considered an error if you specify "protocol http". You can use "request" to specify a file on the server if failed host 127.0.0.1 port 8101 protocol http request '/path/to/some/file' for 3 cycles then restart "hostheader" is also handy if you need to check a specific virtual host name. or delete the "protocol http" part to just see if the port is open. if failed host 127.0.0.1 port 8101 for 3 cycles ... -- Noel Jones -- To unsubscribe: https://lists.nongnu.org/mailman/listinfo/monit-general
