I was fed up with the basic average QPS that was in the default UserParameter so I came up with something more accurate. You've probably noticed that mysql's show status QPS becomes less accurate the longer the mysql daemon runs.
I have attached my script. It was a quick hack, but works quite well.
Setup your agent config file such as:
UserParameter=mysql[qps],/usr/local/mrtg/mysql-qps.pl
Add an item through the GUI and you're good to go. The script auto-adjusts for the polling frequency, so it is not necessary to make any changes to the script. I use 5 minute polling interval, but the script will work with any because it knows the last time it ran and can calculate accordingly.
Enjoy.
I have attached my script. It was a quick hack, but works quite well.
Setup your agent config file such as:
UserParameter=mysql[qps],/usr/local/mrtg/mysql-qps.pl
Add an item through the GUI and you're good to go. The script auto-adjusts for the polling frequency, so it is not necessary to make any changes to the script. I use 5 minute polling interval, but the script will work with any because it knows the last time it ran and can calculate accordingly.
Enjoy.

Comment