I am able to monitor MySQL on localhost (my computer) with this code:

 check process mysql with pidfile /var/run/mysqld/mysqld.pid
   group database
   start program = "/etc/init.d/mysql restart"
   stop program = "/etc/init.d/mysql stop"
   if failed host 127.0.0.1 port 3306 then restart
   if 5 restarts within 5 cycles then timeout


 So, should I be testing the remote host system in which I am trying to
monitor MySQL on?

Also, I installed monit using apt-get command and hence I did not install
ssl. Does it have anything to do with it?

Thanks.



On Thu, Jun 6, 2013 at 1:39 PM, Martin Pala <[email protected]> wrote:

> Maybe your mysql server is set to not accept TCP connections on the given
> address. You can use netstat/lsof to check whether mysql listens for
> connections and try to connect to the mysql server port for example using
> telnet to see, whether the connection can be established.
>
> Regards,
> Martin
>
>
> On Jun 6, 2013, at 8:54 AM, AswinRoy <[email protected]> wrote:
>
> > Hello,
> >
> > I am using monit to monitor MySQL on another system in my same network.
> The
> > ICMP echo request is established. But, monitoring ports ( MySQL ) doesn't
> > work. Error shown is cannot open connection to INET ( ip address) via TCP
> > when i checked the events through M/Monit. The code I use in monitrc
> file is
> > :
> >
> >   check host remotehost with address xxx.xxx.x.xxx
> >   if failed icmp type echo count 3 with timeout 3 seconds then alert
> >   if failed port 3306 protocol mysql with timeout 15 seconds then alert
> >
> > Should there be any change in the code? Or is it something regarding the
> > port? I tried disabling ipv6 firewall using:
> > sudo ufw disable
> >
> > Regards.
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> http://nongnu.13855.n7.nabble.com/Cannot-open-connection-via-TCP-tp168954.html
> > Sent from the monit-general mailing list archive at Nabble.com.
> >
> > --
> > To unsubscribe:
> > https://lists.nongnu.org/mailman/listinfo/monit-general
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general
>



-- 
Aswin Jose Roy
Computer Science and Engineering (2010-2014)
Govt. Model Engineering College
Cochin-21
+91 9746237979
[email protected]
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to