Skip to content

Instantly share code, notes, and snippets.

## Securecentos.com DirectAdmin.conf for Monit (Updated 12082009)
check process httpd with pidfile /var/run/httpd.pid
group apache
start program "/etc/init.d/httpd start"
stop program "/etc/init.d/httpd stop"
if failed host localhost port 80 protocol http
and request "/" then alert
if cpu is greater than 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart
if children > 250 then restart
## Securecentos.com mysql.cfg for Monit (Updated 12082009)
check process mysql with pidfile /var/run/mysqld/mysqld.pid
group mysql
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
if failed host 127.0.0.1 port 3306 protocol mysql then restart
if 5 restarts within 5 cycles then timeout
if failed unixsocket /var/run/mysqld/mysqld.sock protocol mysql then alert
check process denyhosts with pidfile /var/lock/subsys/denyhosts
group denyhosts
start program = "/etc/init.d/denyhosts start"
stop program = "/etc/init.d/denyhosts stop"
depends on denyhosts_rc
depends on denyhosts_bin
check file denyhosts_rc with path /etc/init.d/denyhosts
group denyhosts
if failed checksum then unmonitor
SYNC_SERVER = http://xmlrpc.denyhosts.net:9911
SYNC_INTERVAL = 1d
SYNC_UPLOAD = no
SYNC_DOWNLOAD = yes
SYNC_DOWNLOAD_THRESHOLD = 3
RESET_ON_SUCCESS = yes
LOCK_FILE = /var/run/denyhosts.pid
sshd: 78.105.0.112 94.195.193.160
TraceEnable Off
ServerTokens Prod
KeepAlive On
KeepAliveTimeout 5
Listen 80
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/CLIENTNAME
ServerName SERVERNAMEHERE
ErrorLog /var/www/logs/SERVERNAME-error_log
CustomLog /var/www/logs/SERVERNAME-access_log common
</VirtualHost>
SecDataDir /var/www/logs/msa
CHECK_ONLY=yes
skip-innodb
skip-bdb #mayneed to be disabled if mysqld version is >= 5.1
thread_cache_size = 8
table_cache = 64
join_buffer_size = 153600
query_cache_size = 8192000