Sorry kind of new to using the features. I did monit -v so I found there is nt log file enabled. If you notice I have now changed it to 127.0.0.1. So what will be on the look for this file right /var/run/mysqld/mysqld.pid ? Say when I stop mysql will this file will be gone. So then what will monit do run the stop is it? Then run the start? Can I ask for run and stop to be service mysqld stop and service mysqld start? Kind of confuse with these statement "with timeout 5 seconds and retry 0 time(s) 1 times within 1 cycle(s) then restart else if succeeded 1 times within 1 cycle(s) then alert" What is the 1 times within 1 cycle is it within the 1 minute of polling? Thank you.
monit -v
monit: Debug: Adding host allow 'localhost'
monit: Debug: Skipping redundant host 'localhost'
monit: Debug: Skipping redundant host 'localhost'
monit: Debug: Skipping redundant host 'localhost'
monit: Debug: Skipping redundant host 'localhost'
monit: Debug: Skipping redundant host 'localhost'
monit: Debug: Adding credentials for user 'admin'.
monit: Adding PAM group 'monit'.
monit: Adding PAM group 'users'.
Runtime constants:
Control file = /etc/monit.conf
Log file = (not defined)
Pid file = /var/run/monit.pid
Id file = /var/monit/id
Debug = True
Log = False
Use syslog = False
Is Daemon = True
Use process engine = True
Poll time = 60 seconds with start delay 0 seconds
Expect buffer = 256 bytes
Mail server(s) = smtp.gmail.com:587(ssl) with timeout 30 seconds
Mail from = (not defined)
Mail subject = (not defined)
Mail message = (not defined)
Start monit httpd = True
httpd bind address = localhost
httpd portnumber = 2812
httpd signature = True
Use ssl encryption = False
httpd auth. style = Basic Authentication and Host/Net allow list
Alert mail to = address@hidden
Alert on = All events
Alert mail to = address@hidden
Alert on = All events
The service list contains the following entries:
Process Name = mysqld
Pid file = /var/run/mysqld/mysqld.pid
Monitoring mode = active
Start program = '/etc/init.d/mysqld start' timeout 30 second(s)
Stop program = '/etc/init.d/mysqld stop' timeout 30 second(s)
Existence = if does not exist 1 times within 1 cycle(s) then restart else if succeeded 1 times within 1 cycle(s) then alert
Pid = if changed 1 times within 1 cycle(s) then alert
Ppid = if changed 1 times within 1 cycle(s) then alert
Port = if failed [
127.0.0.1:3306 [MYSQL via TCP] with timeout 5 seconds and retry 0 time(s) 1 times within 1 cycle(s) then restart else if succeeded 1 times within 1 cycle(s) then alert
Timeout = If restarted 5 times within 5 cycle(s) then unmonitor
System Name = localhost.localdomain
Monitoring mode = active
-------------------------------------------------------------------------------
monit daemon with PID 8592 awakened