![]() ![]() You can check with service monit status or ps aux | grep monit.Īnother cool feature of monit is the web interface. ![]() Download and use this stylish icon if you reference Monit. From the web-interface you can start, stop and restart processes and disable or enable monitoring of services. If so, a call to service httpd stop should cause monit to restart apache. Monit has built-in a lightweight HTTP(S) interface you can use to browse the Monit server and check the status of all monitored services. All 'channels' are available to the System Administrator at time of installation. We can directly install Monit on Debian based systems (Debian, Ubuntu & Mint) but we have to enable EPEL Repository to install Monit on RPM based system (RHEL & CentOS). (CentOS mainly changes packages to remove upstream vendor branding and artwork.) We have decided not to follow the UOP's usage of Installation Codes. Go ahead and run the above line in the console to see if monit works. CentOS conforms fully with the upstream vendor's redistribution policy and aims to be 100 binary compatible. To start Monit at boot, edit vim /etc/rc.d/rc.local and add in the next line /usr/local/bin/monit -c /etc/monitrc -p /var/run/monit.pid -l /var/log/monit.log You may need to fix the line inside the above file thats pointing at /usr/bin/monit to /usr/local/bin/monit.Īfter this is in place you should have the service monit restart command available. Now setup the init.d file cp contrib/rc.monit /etc/init.d/monit Then change the set alert line to include your email. First change the set mailserver line to localhost (or your mailserver). To setup alerts go into the /etc/monitrc file and do 2 things. You can see in the above code we used alert. If cpu usage (system) > 80% for 3 cycles then alert If cpu usage (user) > 80% for 3 cycles then alert If 5 restarts within 5 cycles then timeout You can also create an RPM package for CentOS/RHEL/Fedora from the source code directly using rpmbuild: rpmbuild -tb monit-x.y.z.tar.gz. To change the default location use the -prefix option to. If failed host 127.0.0.1 port 80 protocol http By default Monit is installed in /usr/local/bin/ and the monit.1 man-file in /usr/local/man/man1/. Start program = "/etc/init.d/httpd start" with timeout 20 seconds # Also set the 'set daemon' line at the beginning to your preferred interval.Ĭreate the service files (this will repeat for every service you monitor) vi /etc/monit.d/apacheĬheck process httpd with pidfile /var/run/httpd.pid # At the end of monitrc add or uncomment: include /etc/monit.d/* configure (If this fails, fix as necessary, then re-unpack the tar and try again) Now run the htop monitoring tool by executing following command on the terminal.Other packes I needed for my box yum install pam-devel Script to Watch Disk Space Install Tripwire Intrusion Detection System (IDS) on Linux RedHat Lynis Linux Security Auditing tool in RHEL/CentOS 6.3/5.6. # rpm -ihv rpmforge-release*.rf.x86_64.rpm # rpm -ihv rpmforge-release*.rf.i686.rpm For RHEL, CentOS & Fedora 64-bit OS # For RHEL 5, CentOS 5 & Fedora # For RHEL, CentOS & Fedora 32-bit OS # For RHEL 5, CentOS 5 & Fedora # To do just install the following RPM for your architecture ( 32bit or 64bit). và cung cp mt chc nng giám sát tuyt vi và hu ích cho các qun tr viên h thng. Let us install Htop on RHEL 6.3/6.2/6.1/6/5.8, CentOS 6.3/6.2/6.1/6/5.8 and Fedora 17,16,15,14,13,12 Linux via the yum package manager, the rpmforge package repository must be installed on your system to retrieve and install. Cài t Monit trên CentOS Monit là mt công c mã ngun m và rt hu ích, giúp t ng theo dõi và qun lý tin trình máy ch, th mc, quyn, và dch v nh Apache, Nginx, MySQL, FTP, SSH, Sendmail, v.v. You can scroll vertically to view the full process list, and scroll horizontally to view the full command line of the process. We can interact with mouse those who love to play with mouse. It shows complete list of processes running and easy to use for normal tasks. ![]() Htop is an interactive and real time process monitoring application for Linux. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |