Forum Discussion
andrew_waldvoge
Nimbostratus
Jan 23, 2007mysql monitoring
I'm looking for a way to configure monitoring for a mysql database.
Currently we have the following rule in place which monitors the database indirectly through the URL, but whenever apache or tomcat are off-line the monitor fails and the pool member is down.
monitor ADMIN_RCOM {
defaults from http
recv "HTTP/1.1 200 OK"
send "GET /rcom-us/do/keepAlive HTTP/1.1
Host: 216.35.67.138
Connection: close
."
Is there a way to monitor mysql directly, perhaps sending a simple sql select query?
Any help/advice would be greatly appreciated, thanks.
- Richard__HarlanHistoric F5 AccountI guess I am not getting what you want to do. Is the MySQL server in a pool behind the LTM? If so you could use a perl script on another computer to probe the MySQL database then up iControl to mark the server up or down.
- neil_66356
Nimbostratus
Hunter32 writes: "I guess I am not getting what you want to do. Is the MySQL server in a pool behind the LTM? If so you could use a perl script on another computer to probe the MySQL database then up iControl to mark the server up or down." - Chris_Phillips
Nimbostratus
the issue hunter32 was getting at is that if you are using tomcat or something then you're clearly *not* monitoring a database, you're monitoring an http server... his monitor, as yours is, is clearly http based. if your send string just so happens to call something on the server which triggers a database connection on the back end of tomcat, and that's great, but that's not monitoring the database as far as the F5 box is concerned. the recieve string should contain the entire tcp payload, so you should have the full response to play with. if you don't know what it looks like, try using curl to see the entire payload yourself. ideally you would craft a page which returns a string on the successful completion, then it's much clearer all round. - JRahm
Admin
If you're looking for a binary state (ie, up or down), then your best bet would be an external monitor. Write a shell or perl script to log into the database, do whatever checking you need to do, and if all is good, return a 1, otherwise, return a 0. In fact, there are plenty of monitor script out there that you could customize to meet your needs, the url to one is below: - JRahm
Admin
Where's the edit button on my posts?
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects