WRT Router Series Monit: Difference between revisions
mNo edit summary |
|||
| Line 30: | Line 30: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Configuration of Individual Service(s) Monitoring === | ===Configuration of Individual Service(s) Monitoring=== | ||
If configured in the manner described in the Configuration File(s) for Monit Service section, each of the following example can be placed in a separate text file in the /etc/monit.d directory. | If configured in the manner described in the Configuration File(s) for Monit Service section, each of the following example can be placed in a separate text file in the /etc/monit.d directory. | ||
Apache Example; | Apache Example (The below Apache example is very simple. It can also be configured to connect to a website and check for the existence of a specific file); | ||
<syntaxhighlight lang="text"> | <syntaxhighlight lang="text"> | ||
check process httpd with pidfile /tmp/run/apache2/httpd.pid | check process httpd with pidfile /tmp/run/apache2/httpd.pid | ||
| Line 59: | Line 59: | ||
if failed host 192.168.2.1 port 67 type udp then restart | if failed host 192.168.2.1 port 67 type udp then restart | ||
if 5 restarts within 5 cycles then timeout | if 5 restarts within 5 cycles then timeout | ||
</syntaxhighlight> | <nowiki></syntaxhighlight></nowiki> | ||
MySQL Example; | MySQL Example; | ||
<syntaxhighlight lang="text"> | <syntaxhighlight lang="text"> | ||