East of the Sun, West of the Moon



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:
    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                                                                                             
    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)


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