
98
|
Chapter 4: An Initial Internet-Ready Environment
Notice in Figure 4-19 that the status of sshd shows that it is running and that the sys-
tem is monitoring it. Three lines from the bottom of the screen, you can see the
instructions on what to do if sshd fails:
If failed localhost:22 [SSH] with timeout 5 seconds then restart else if recovered
then alert
This policy simply restarts a failed service and sends a message when it successfully
restarts.
Finally, monit provides four buttons at the bottom of the page for manual interven-
tion. Now, let’s see how this system works.
Installing and Configuring monit
To install monit, you can either use your Linux system package manager or down-
load the tarball from http://www.tildeslash.com/monit. If you’re using the Debian
setup from Chapter 2, simply enter:
# apt-get install monit
After you’ve installed monit, edit /etc/monit/monitrc. The file created during installa-
tion contains lots of examples, and you can find more configuration examples at
http://www.tildeslash.com/monit/doc/examples.php. In our case, we want to:
Figure 4-19. Drilling down to sshd