In case the service was restarted very often and theġ32 # problem remains, it is possible to disable monitoring using the TIMEOUTġ33 # statement. If the process is not running, monit will restartġ31 # it by default. Check its resource usage such as cpu and memory,ġ30 # and number of children. The service mayġ14 # be grouped using the GROUP option.ġ16 check file apache_bin with path /usr/sbin/apache2ġ18 # expect the sum 8f7f419955cefa0b33a2ba316cba3659 then unmonitorġ19 if failed permission 755 then unmonitorġ24 } with the mail-format ġ28 # Check that a process is running, in this case Apache, and that it respondġ29 # to HTTP and HTTPS requests. In additionġ12 # to alert recipients in the global section, customized alert will be sent toġ13 # additional recipients by specifying a local alert handler. You can limit the maximal queueĤ3 # size using the SLOTS option (if omitted, the queue is limited by spaceĤ4 # available in the back end filesystem).Ĥ7 # basedir /var/monit # set the base directory where events will be storedĤ8 # slots 100 # optionaly limit the queue sizeĥ1 # Monit by default uses the following alert mail format:ġ07 if cpu usage (system) > 30% then alertġ11 # Check a file for existence, checksum, permissions, uid and gid. ![]() The base directory where undelivered alerts will beĤ2 # stored is specified by the BASEDIR option. By default monit uses port 25 - thisģ2 # is possible to override with the PORT option.ģ4 set mailserver bhaskar-laptop # primary mailserverģ5 # port 10025, # backup mailserver on port 10025ģ9 # By default monit will drop alert events if no mail servers are available.Ĥ0 # If you want to keep the alerts for a later delivery retry, you can use theĤ1 # EVENTQUEUE statement. Multiple servers may beģ1 # specified using comma separator. If you want to log toĢ5 # a stand alone log file instead, specify the path to a log fileĢ7 set logfile syslog facility log_daemonģ0 # Set the list of mail servers for alert delivery. If the FACILITY option isĢ4 # omitted, monit will use 'user' facility by default. Forĩ # information about the control file, a complete list of statements andġ0 # options please have a look in the monit manual.ġ3 #ġ5 #ġ7 # Start monit in the background (run as a daemon) and check services atĢ3 # Set syslog logging with the 'daemon' facility. All path's MUST BE FULLY QUALIFIED, starting with '/'.Ĩ # Below you will find examples of some frequently used statements. We should be concerned about the configuration file it.Because we need to define everything in this file to get noticed by it.I changed into /etc/monit dir ,where I found the config file named monitrc.Let’s have a view of Nov 16:~> cd Nov 16:/etc/monit> Nov 16:/etc/monit> sudo vim monitrcģ #ĥ # Comments begin with a '#' and extend through the end of the line. Monit: /usr/sbin/monit /etc/monit /usr/share/man/man1/monit.1.gz It seems it’s there.Ok,now it has deflated lot of file in the system and as I am not going to mention those in details,but should show you where it kept Nov 16:~> whereis monit * An http interface with optional SSL support to make monit HTTP, FTP, SMTP, POP, IMAP, NNTP, SSH, DWP, * Flexible and customizable email alert messages * Alert notification for program timeout, restart, checksum, stop * MD5 checksum for programs started and stopped by monit * Alert, stop or restart a process based on its characteristics ![]() * Runtime and TCP/IP port checking (tcp and udp) * Configuration - comprehensive controlfile * Monitoring modes - active, passive or manual * Daemon mode - poll programs at a specified interval If they are not running and restart programs not responding. Monit is a utility for monitoring and managing daemons or similar etc/init.d/monit 3c19420528fdb85fd2669f6f7257a552ĭescription: A utility for monitoring and managing daemons or similar programs ![]() I am on Debian Lenny to implement those two tools.So the first thing first get those software in the system.Here we go:īefore try to install it I tried to query the existing package database to whether it installed or not(or I might have installed some time Nov 16:/etc/monit> sudo dpkg -s monitĭepends: libc6 (>= 2.7-1), libssl0.9.8 (>= 0.9.8f-5) For that I am going to use two tools to do the job for you those are monit and munin. In this article I am going to show your how you can keep an eye on your server/desktop/laptop visually through web browser.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |