Simon icon Simon
Flexible server monitoring

Can Simon restart a Mac OS X Server on failure?

If Simon fails on a http request, which indicates that the webserver is not answering can Simon then restart the machine and how? (mac os x server)

David Sinclair's picture

Re: Can Simon restart a Mac OS X Server on failure?

Yes, you could use a notifier based on the SSH one (or a custom Script-based notifier) one connect to the machine and use the sudo reboot command. See Mac OS X Hints for an example.

You could also restart the web server, if you prefer.

Re: Can Simon restart a Mac OS X Server on failure?

Does 'real life examples' exist.

My mission is for Simon to Restart server or web-service from the same machine (not from a remote machine).

David Sinclair's picture

Re: Can Simon restart a Mac OS X Server on failure?

You should be able to restart your local web server via the following script; add this as a Script-based service, and use a custom variable to replace the password:

echo "password" | sudo -S /usr/sbin/apachectl restart