monitoring MySQL

21 views
Skip to first unread message

John Joseph Bachir

unread,
Feb 21, 2008, 4:30:10 PM2/21/08
to god...@googlegroups.com
I would like to use god to monitor MySQL. Currently, god is running on
a different server from the DB server. Ideally I would be able to poll
the port on the DB server to see if MySQL is still up, and then send a
notification if it is not (without attempting to restart the server).
Is it possible to do such a port poll? It seems like most or all of
the logic required for such a feature would be already written for the
:http_response_code condition.

Thanks,
John

--
John Joseph Bachir
http://blog.johnjosephbachir.org
http://lyceum.ibiblio.org
http://dissent.cc
http://jjb.cc

Bertg

unread,
Mar 4, 2008, 8:53:19 AM3/4/08
to god.rb
I'm curently messing around in god, and would like to write such a
condition to monitor MySQL connections.

I would have the module connect to the server and keep a session open.
When on a check (polling interval) the connection died, it should be
recreated. If it fails X amount of times, see it as failed.

This could be extended to check if a database is still available (you
never know things go wrong) and has correct layout maybe (for the tin
foil hats people) ?

Seems like a plan?

-Bert

On Feb 21, 10:30 pm, "John Joseph Bachir" <johnjosephbac...@gmail.com>
wrote:

John Joseph Bachir

unread,
Mar 4, 2008, 10:45:29 AM3/4/08
to god...@googlegroups.com
On Tue, Mar 4, 2008 at 8:53 AM, Bertg <bertgo...@gmail.com> wrote:
> I would have the module connect to the server and keep a session open.
> When on a check (polling interval) the connection died, it should be
> recreated. If it fails X amount of times, see it as failed.

> Seems like a plan?

Sounds great. Let me/us know how it goes and I'll be happy to test and
contribute on my end.

Bertg

unread,
Mar 4, 2008, 5:45:45 PM3/4/08
to god.rb
Hey,

I started working on it.
You should be able to see the progress on http://github.com/Bertg/god/tree/mysql

I'm building it so tat other monitoring of other Databases should be
fairly straightforward.

You know, ActiveRecord is a big help in this :)

Comments, info, patches.. all is welcome :)

On Mar 4, 4:45 pm, "John Joseph Bachir" <johnjosephbac...@gmail.com>
wrote:
> On Tue, Mar 4, 2008 at 8:53 AM, Bertg <bertgoeth...@gmail.com> wrote:
> >  I would have the module connect to the server and keep a session open.
> >  When on a check (polling interval) the connection died, it should be
> >  recreated. If it fails X amount of times, see it as failed.
> >  Seems like a plan?
>
> Sounds great. Let me/us know how it goes and I'll be happy to test and
> contribute on my end.
>
> --
Reply all
Reply to author
Forward
0 new messages