Tracking MySQL threads?

David Johnson djohnson at jsatech.com
Tue Apr 11 19:18:43 CEST 2006


Nagios plugins are just scripts.

Write a bash script (or your favorite language) to do something like:

#!/bin/bash
/usr/local/Nagios/libexec/check_mysql -H mysql_host -u read_only -p
ro_passwd | grep Threads | awk "{ print $4 }" 

Etc.

Then you can just put into your check commands in your configuration file.
Let me know if that makes sense.


> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of JB Segal
> Sent: Tuesday, April 11, 2006 11:47 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Tracking MySQL threads?
> 
> So, the check_mysql plugin will tell me how many threads are running:
> 
> /usr/local/nagios/libexec/check_mysql -H mysql_host -u read_only -p
> ro_passwd
> Uptime: 4132404  Threads: 9  Questions: 2062339993  Slow queries: 770
> Opens: 3766477  Flush tables: 12  Open tables: 512  Queries per second
> avg: 499.065
> 
> but as near as I can tell it won't let me alert on anything other than
> a simple up/down (response/no response) test.
> 
> Does anyone have a plugin that will alert on "Threads: nnn" >foo or
> <bar, or know of how to get check_mysql to do that? (What I want is
> check_procs, but for a single monolithic binary.)
> 
> Thanks!
> JB
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting
> language
> that extends applications into web and mobile media. Attend the live
> webcast
> and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list