East of the Sun, West of the Moon

2005/8/12

Statistics

Filed under: Software — Erwin @ 11:48 am

For work it seemed useful to graph how busy our MySQL servers are, so after a quick check on the web, I put together the following pieces of gum and rope:

  • A query script to get the desired value, let’s call it snmp_helper:
    #!/bin/sh
    
    mysqladmin status | awk {'print $'$1}
    
  • Two entries in our /etc/snmp/snmpd.conf file so that it can be accessed from the host that does the actual graphing:
    exec        mysql-queries <path-to-snmp_helper>/snmp_helper  6
    exec        mysql-slow    <path-to-snmp_helper>/snmp_helper  9
    
  • Entries in the /etc/mrtg.cfg file that look roughly like this:
    LegendI[_]:             Queries&nbsp;
    LegendO[_]:             Slow&nbsp;
    Legend1[_]:             Queries
    Legend2[_]:             Slow queries
    YLegend[_]:             Queries
    ShortLegend[_]:         Q/s                                                                                             
    
    Target[mysql]:            1.3.6.1.4.1.2021.8.1.101.1&1.3.6.1.4.1.2021.8.1.101.2:community@mysqlserver
    options[mysql]:           growright nopercent
    Title[mysql]:             MySQL Stats
    PageTop[mysql]:           <h1>MySQL Stats</h1>
    RouterUptime[mysql]:      community@mysqlserver
    

Voila, another happy customer (me). 😉

Evanescence – Bring Me To Life (from Fallen)

Question?

Filed under: Humo(u)r — Erwin @ 12:12 am

My wife just asked me:

How do you keep a jackass in suspense?

Man, we must be really tired for that to make us laugh as much as it did!

Powered by WordPress