[mrtg] Re: Monitoring a MySQL DBMS

Wolfgang Fiedler fiedler at fiedler.vc-graz.ac.at
Thu Dec 2 16:26:04 MET 1999

Wolfgang Fiedler wrote:
> Hello all!
> As we all know, mrtg has a nice feature and can gather
> information from external programs.
> I want to monitor some information from my MySQL database server
> i.e.: number of querys, number of connectrions, number of running
> threads,...

Hello !

For anyone who is interested in monitoring a MySQL Database:

I played a litte bit with awk (you remember the first time ......
...with awk? ;-) )  and came up with this one-liner

mysqladmin extended-status -u root -pxxxxx | awk '/Questions/ { print $4
; print $4 ; print "a very long time" ; print "myhost.domain.at" }'

xxxxx should be the MySQL password of the user.
If you are interested in any other value, then substitute /Questions/
with  /Connections/ or /Threads_running/ or whatever...

If you use this in a production environment, then i suggest that you
create a MySQL User with only process privileges and don't use the
MySQL superuser account.


	wolfgang fiedler

Wolfgang Fiedler http://fiedler.vc-graz.ac.at mailto:wfiedler at iicm.edu
Student of Telematics at Graz University of Technology, Austria, Europe
Institute f. Information Processing & Computer Supported New Media

* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg

More information about the mrtg mailing list