Comment posted Monitoring and restart server services (Apache, Mysql, Bind) with Monit to prevent server downtimes by .
Recent comments by
Tags: Bind) with Monit to prevent server downtimes, Monitoring and restart server services (Apache, Mysql
Wednesday, 8th May 2024
Comment posted Monitoring and restart server services (Apache, Mysql, Bind) with Monit to prevent server downtimes by .
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
Tags: Bind) with Monit to prevent server downtimes, Monitoring and restart server services (Apache, Mysql
This entry was posted on Wednesday, May 8th, 2024 at 5:35 am and is filed under Linux, System Administration. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.
But Samuel ministered before the LORD, being a child, girded with
a linen ephod.
-- 1 Samuel 2:18
M | T | W | T | F | S | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
☩ Walking in Light with Christ – Faith, Computing, Diary 2006-2020 Powered by:
Pc Freak Solutions and Comments (RSS).
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
Copyright (C) 2020 by Georgi Georgiev - Website Privacy Policy
Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Safari/531.2+ Debian/squeeze/sid () Epiphany/2.29.92
I have to say that the /etc/monit/monitrc configuration for apache is configured in a way that a request is made each time to /monit/token and if Apache is not responding it is predetermined to restart Apache. This kind of check could prevent many oddities when your Apache will be able to bind a TCP socket but won’t return any content to the client.
View CommentView CommentMozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.9.0.2) Gecko/2008092313 Ubuntu/9.25 (jaunty) Firefox/3.8
I am changing vocations and would like to be a Network Administrator of some variety. I have a knight bachelor degree, non IT, I was wondering the best route to take to take Some kind of Certification course, or is a degree program necessary? Thank all the best all the best.
View CommentView CommentMozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
excelenta enticos de centinso y pladeis con ssemo froglo. umpra a aramoss y amombralo onicalt con cotos tameria!
View CommentView CommentMozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
monit rulz 🙂
View CommentView CommentMozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
One little note to make here:
/var/run/apache2.pid
The monit rc config as explainedf in step 3 is configured to monitor (alert and restart) BIND (Named) DNS resolver server
If wherever you configure monit you have no don’t use bind, comment inside my sample monitrc:
View CommentView Commentcheck process named with pidfile /var/run/bind/run/named.pid
start program = "/etc/init.d/bind9 start"
stop program = "/etc/init.d/bind9 stop"
if failed host 127.0.0.1 port 53 type tcp protocol dns then restart
if failed host 127.0.0.1 port 53 type udp protocol dns then restart
if 5 restarts within 5 cycles then timeout
##check process named with pidfile /var/run/bind/run/named.pid
## start program = "/etc/init.d/bind9 start"
## stop program = "/etc/init.d/bind9 stop"
## if failed host 127.0.0.1 port 53 type tcp protocol dns then restart
## if failed host 127.0.0.1 port 53 type udp protocol dns then
restart
## if 5 restarts within 5 cycles then timeout
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Also as I just installed monit service on one host with Debian Squeeze I can confirm. Config is working fine with Debian Squeeze shipped monit version:
pcfreak:~# dpkg -l |grep ‘^ii monit’
View CommentView Commentii monit 1:5.1.1-1 A utility for monitoring and managing daemons or similar programs
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Also i’ve figured out later. This alerts as I configured in this article might be sometimes really annoying if you receive e-mails every few seconds. Hence it might be good idea to comment alerts in my monitrc sample conf:
To do so, remove or comment lines in Apache and MySQL monit config section:
## if cpu usage is greater than 80 percent for 3 cycles then alert
View CommentView Comment## if cpu is greater than 50% for 2 cycles then alert
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3
Also the monitrc config from my article is configured to check and report for “disk full” and low disk space on /dev/md0 which used to be a software mirror type RAID1. Therefore config in monitrc reads:
check device disk1 with path /dev/md0
On other non-RAIDed disks, usually the disk to monitor is /dev/sda1 or /dev/sdb1
Thus if you’re not using a hardware or software mirror probably this config section should be substituted with:
check device disk1 with path /dev/sda1, i.e.:
View CommentView Commentcheck device disk1 with path /dev/sda1
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0
If you have more than one server that you need to monitor, then you can use M/Monit– an extended version of Monit that provides a simple way to monitor multiple machines.
View CommentView Comment