[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: install mysql check in monit
From: |
Maravelias Marios - Tophost Internal |
Subject: |
Re: install mysql check in monit |
Date: |
Sat, 17 Feb 2007 14:12:11 +0200 |
User-agent: |
Mozilla Thunderbird 1.5.0.9 (Windows/20061207) |
Here is the output:
root /# /usr/local/bin/monit -v
monit: Debug: Adding credentials for user 'admin'.
Runtime constants:
Control file = /etc/monitrc
Log file = syslog
Pid file = /var/run/monit.pid
Debug = True
Log = True
Use syslog = True
Is Daemon = True
Use process engine = True
Poll time = 60 seconds
Mail server(s) = localhost
Mail from = address@hidden
Mail subject = monit alert -- $EVENT $SERVICE
Mail message = $EVENT Service $SERV..(truncated)
Start monit httpd = True
httpd bind address = Any/All
httpd portnumber = 2828
httpd signature = True
Use ssl encryption = False
httpd auth. style = Basic Authentication
Alert mail to = address@hidden
Alert on = All events
The service list contains the following entries:
Process Name = httpd
Pid file = /var/run/httpd.pid
Monitoring mode = active
Start program = /etc/init.d/httpd start
Stop program = /etc/init.d/httpd stop
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 www.grserver.gr:80/index.php [HTTP via
TCP] with timeout 5 seconds 2 times within 2 cycle(s) then restart else
if passed 1 times within 1 cycle(s) then alert
Timeout = If 5 restart within 5 cycles then unmonitor else
if passed then alert
Process Name = mysqld
Group = mysql
Pid file = /var/run/mysqld/mysqld.pid
Monitoring mode = active
Start program = /etc/init.d/mysqld start
Stop program = /etc/init.d/mysqld stop
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 localhost:3306 [DEFAULT via TCP] with
timeout 5 seconds 1 times within 1 cycle(s) then restart else if passed
1 times within 1 cycle(s) then alert
Timeout = If 5 restart within 5 cycles then unmonitor else
if passed then alert
System Name = ***************
Monitoring mode = active
-------------------------------------------------------------------------------
Starting monit daemon with http interface at [*:2828]
root /#
tcpdump gives me this :
root /# tcpdump | grep 3306
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
14:03:24.203306 IP linux17.grserver.gr.http >
ppp028-211.dsl.hol.gr.62332: F 149:149(0) ack 543 win 6504
14:03:46.693306 IP linux17.grserver.gr.http > 85.75.215.248.51666: .
1461:2921(1460) ack 472 win 6432
O/H Martin Pala έγραψε:
Can you snoop/tcpdump the network traffic for localhost:3306/tcp, run
monit with -v option and send the output from both tcpdump and monit?
Thanks,
Martin
Maravelias Marios - Tophost Internal wrote:
Hi Martin,
yes the mysql server is listening to 3306 port. see this:
root /# telnet localhost 3306
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
8
4.1.20-logч|F&(8}4%,\#7+opf.P(t2Connection closed by foreign host.
O/H Martin Pala έγραψε:
You need to set the configuration according to your mysql
configuration (my.cnf) - is your mysql listening on
localhost:3306/tcp? Or maybe just on unix socket?
Martin
Maravelias Marios - Tophost Internal wrote:
Hello, I have monit running for check and monitoring http.
It works fine.
To day I tried to install monitor for mysql database too.
I added these lines at /etc/monitrc file:
check process mysqld with pidfile /var/run/mysqld/mysqld.pid
group mysql
start "/etc/init.d/mysqld start"
stop "/etc/init.d/mysqld stop"
if failed port 3306 then restart
if 5 restarts within 5 cycles then timeout
in the web interface I see this:
*Process*
*Status*
*Uptime*
*CPU*
*Memory*
mysqld <http://grserver.gr:2828/mysqld> Connection failed 37m 3.4%
5.8% [122288 kB]
Why do I get connection failed? how do I fix that?
Thank you.
ttp://lists.nongnu.org/mailman/listinfo/monit-general
--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general