Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Jul 27, 2017 7:48 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: MySQL Slow Query Log Analysis Plugin
PostPosted: Tue Sep 07, 2010 10:54 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
All,

Pleased to announce a new Science Project plugin for those who make analyzing MySQL a part of their daily lives. It's not the end all, do all, but it sure helped me out.

You may obtain the plugin here:

http://docs.cacti.net/plugin:slowlog

I have attached some 'fancy' graphs and images below with actual data.

TheWitness


Attachments:
SlowLogByMethod.png
SlowLogByMethod.png [ 182.46 KiB | Viewed 9694 times ]
SlowLogByTable.png
SlowLogByTable.png [ 196.8 KiB | Viewed 9694 times ]
SlowLogSummary.png
SlowLogSummary.png [ 55.84 KiB | Viewed 9694 times ]
SlowLogImport.png
SlowLogImport.png [ 102.69 KiB | Viewed 9694 times ]
SlowLogDetails.png
SlowLogDetails.png [ 100.04 KiB | Viewed 9694 times ]
SlowLogQueryDetails.png
SlowLogQueryDetails.png [ 60.92 KiB | Viewed 9694 times ]

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository
Top
 Profile  
 
 Post subject: Re: MySQL Slow Query Log Analysis Plugin
PostPosted: Fri Sep 30, 2011 1:53 pm 
Offline

Joined: Tue Mar 15, 2011 2:38 pm
Posts: 2
Thanks for this, though it doesn't work. Maybe I missed something but the plugin installs alright but it seems like the chdir statement in slowlog.php is screwing things up, the plugin keeps checking for stuff within */cacti/plugins as well as */cacti and apache is reporting the following errors because of it:



[Fri Sep 30 13:50:34 2011] [error] [client 172.31.0.78] File does not exist: /var/www/cacti/plugins/slowlog/include, referer: http://zeta.officemax.int/cacti/plugins/slowlog/slowlog.ph[Fri Sep 30 13:50:34 2011] [error] [client 172.31.0.78] File does not exist: /var/www/cacti/plugins/slowlog/plugins, referer: http://zeta.officemax.int/cacti/plugins/slowlog/slowlog.ph
[Fri Sep 30 13:50:34 2011] [error] [client 172.31.0.78] File does not exist: /var/www/cacti/plugins/slowlog/include, referer: http://zeta.officemax.int/cacti/plugins/slowlog/slowlog.ph[Fri Sep 30 13:50:34 2011] [error] [client 172.31.0.78] File does not exist: /var/www/cacti/plugins/slowlog/plugins, referer: http://zeta.officemax.int/cacti/plugins/slowlog/slowlog.ph
[Fri Sep 30 13:50:34 2011] [error] [client 172.31.0.78] File does not exist: /var/www/cacti/plugins/slowlog/images/tab_graphs.gif, referer: http://zeta.officemax.int/cacti/plugins/slow[Fri Sep 30 13:50:34 2011] [error] [client 172.31.0.78] File does not exist: /var/www/cacti/plugins/slowlog/images/transparent_line.gif, referer: http://zeta.officemax.int/cacti/plugin
[Fri Sep 30 13:50:34 2011] [error] [client 172.31.0.78] File does not exist: /var/www/cacti/plugins/slowlog/images/shadow_gray.gif, referer: http://zeta.officemax.int/cacti/plugins/slo[Fri Sep 30 13:50:34 2011] [error] [client 172.31.0.78] File does not exist: /var/www/cacti/plugins/slowlog/images/cacti_backdrop2.gif, referer: http://zeta.officemax.int/cacti/plugins
[Fri Sep 30 13:50:34 2011] [error] [client 172.31.0.78] File does not exist: /var/www/cacti/plugins/slowlog/images/tab_console.gif, referer: http://zeta.officemax.int/cacti/plugins/slo[Fri Sep 30 13:50:34 2011] [error] [client 172.31.0.78] File does not exist: /var/www/cacti/plugins/slowlog/images/shadow.gif, referer: http://zeta.officemax.int/cacti/plugins/slowlog/
[Fri Sep 30 13:50:34 2011] [error] [client 172.31.0.78] File does not exist: /var/www/cacti/plugins/slowlog/images/arrow.gif, referer: http://zeta.officemax.int/cacti/plugins/slowlog/s[Fri Sep 30 13:50:34 2011] [error] [client 172.31.0.78] File does not exist: /var/www/cacti/plugins/slowlog/images/favicon.ico


EDIT: Got it, incorrect $url_path - one question though, how did you set up the pretty graph/pictures?


Top
 Profile  
 
 Post subject: Re: MySQL Slow Query Log Analysis Plugin
PostPosted: Sat Oct 01, 2011 2:28 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
Once you import a mysql-slow.log file, you simply have to edit it and select the various tabs.

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Re: MySQL Slow Query Log Analysis Plugin
PostPosted: Mon Oct 03, 2011 2:15 pm 
Offline

Joined: Tue Mar 15, 2011 2:38 pm
Posts: 2
Yeah that's what I thought based on your screen shots. It's showing the actual log data but I get no graphs from any of the tabs. Logs show nothing relevant to resolving the issue as far as I can see. Any suggestions?

Haha nevermind, I'm a retard. I did a dist-upgrade to Ubuntu's beta and it has no flash-plugin yet. We're all good thanks a lot.


Top
 Profile  
 
 Post subject: Re: MySQL Slow Query Log Analysis Plugin
PostPosted: Mon Oct 03, 2011 4:43 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
Your welcome... Any bugs, let us know.

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Re: MySQL Slow Query Log Analysis Plugin
PostPosted: Tue Mar 19, 2013 3:57 pm 
Offline

Joined: Tue Mar 19, 2013 3:54 pm
Posts: 1
Thanks for this plugin. One question, is there a way to automatically pull in the slowquery log say every hour? We can do it via a cronjob or something. Let me know as that is what we are looking for. Thanks.


Top
 Profile  
 
 Post subject: Re: MySQL Slow Query Log Analysis Plugin
PostPosted: Fri May 15, 2015 5:37 pm 
Offline

Joined: Mon Apr 13, 2015 5:53 pm
Posts: 44
FYI on 0.8.8c this plugin lose all the overall web structure, i.e. you lose all the "tab" and the ability to navigate in the Cacti UI.


Attachments:
File comment: Missing top navigation tab and other Cacti UI elements.
mysql.png
mysql.png [ 53.44 KiB | Viewed 4177 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group