|Source Repository:||Repository:Gentoo Portage Tree|
Summary: a utility for monitoring and managing daemons or similar programs running on a Unix system.
Project Unfork StatusHere's an update on Project Unfork, plus other neat things.
IP Space Migration ContinuesAll Funtoo user containers in the 8.28 IP space will be moving into our new IP space (172.97) over the next few days. If you have DNS set up -- be sure to watch your container and update to the new IP! container.host.funtoo.org DNS will be updated after the move.
Funtoo Hosting IP MoveFuntoo user containers with IPs in the 72.18.x.x range will be gradually migrating to new IP addresses this week. If you have DNS entries for your containers, please be aware that your DNS will need to be updated.
Monit is a utility for managing and monitoring processes, programs, files, directories and filesystems on a UNIX system.
To install Package:Monit:
# emerge monit
Config file of monit resides in /etc/monitrc. And there is a item to specify a config directory. Uncomment if needed.
## It is possible to include additional configuration parts from other files or ## directories. # # include /etc/monit.d/* #
Users added to the monit or users group will be able to manipulate monit through the web interface.
# gpasswd -a $USER monit
# gpasswd -a $USER users
passwords can be streamed to monits web interface, disable it all together after it is setup
for security purposes change this entry
this is the preferred method to run monit
ca:12345:ctrlaltdel:/sbin/shutdown -r now # Run monit in standard runlevels mo:2345:respawn:/usr/bin/monit -Ic /etc/monitrc # Used by /etc/init.d/xdm to control DM startup.
to start monit immediately after changing inittab
# telinit q
prefer inittab method over rc services
To start the service at boot.
# rc-update add monit default
To start the service immediately.
# /etc/init.d/monit start
This hourly cron script will check to make sure monit has not crashed. As this uses pgrep, make sure to not name it monit.
#!/bin/bash if ! pgrep monit >/dev/null;then rc-service monit restart fi
Monit relies upon pid files. For daemons that do not create a pidfile: a work around is needed.
Auto Restart Mysql
check process mysql with pidfile /var/run/mysqld/mysqld.pid start program = "/bin/bash -c 'rc-service mysql start'" stop program = "/bin/bash -c 'rc-service mysql stop'"
Navigate to http://localhost:2812/ & login using your edited configuration line or admin / monit if you have not changed it yet.