UpdateÑ The MySQL Graph Collection - Version 2.5.0!
Moderators: Developers, Moderators
UpdateÑ The MySQL Graph Collection - Version 2.5.0!
Just updated the code to include the query cache hits template!!! Thanks Kyle and
All, Otto is no longer has time to support this template, so I inherited it! Let me know of any changes that might need done. I fixed a few problems with the graphs and now everything works again on 0.8.7g. I also plan to add a port option and some documentation on how to use this template with the cacit CLI.
The code is now here if anybody wants to help with it:
http://code.google.com/p/crunchtools/so ... ysql_stats
Best Regards
Scott M
All, Otto is no longer has time to support this template, so I inherited it! Let me know of any changes that might need done. I fixed a few problems with the graphs and now everything works again on 0.8.7g. I also plan to add a port option and some documentation on how to use this template with the cacit CLI.
The code is now here if anybody wants to help with it:
http://code.google.com/p/crunchtools/so ... ysql_stats
Best Regards
Scott M
- Attachments
-
- graph_mysql_stats.zip
- (35.2 KiB) Downloaded 1504 times
-
- mysql_stats.gif (71.22 KiB) Viewed 19498 times
Last edited by scottevil on Wed May 30, 2012 2:09 pm, edited 2 times in total.
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com
Re: The MySQL Graph Collection - Version 2.0.1!
Thanks for the share and to continue the work in this template
These files have been exported to a recent version of cacti, more recent than 0.8.7e
Can you convert it ?
These files have been exported to a recent version of cacti, more recent than 0.8.7e
Can you convert it ?
Cacti Version - 0.8.8a
Plugin Architecture - 3.1
Poller Type - spine
Server Info - Linux
Web Server - Apache/2.2.22 (Ubuntu)
PHP - 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
MySQL - 5.5.29-0ubuntu0.12.04.2
RRDTool - 1.4.7
Plugin Architecture - 3.1
Poller Type - spine
Server Info - Linux
Web Server - Apache/2.2.22 (Ubuntu)
PHP - 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
MySQL - 5.5.29-0ubuntu0.12.04.2
RRDTool - 1.4.7
Re: The MySQL Graph Collection - Version 2.0.1!
Oh, that is a problem now. Do you know if there is any easier way to convert them, than to install an older version of cacti and export them from that? I think I could take the originals, patch them and export them in an older version, but not sure if that is the only path.
Best Regards
Scott M
Best Regards
Scott M
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com
Re: The MySQL Graph Collection - Version 2.0.1!
Original templates seemed to be exported from Cacti 0.8.7g.
Let's try replacing hash code to your version,
e.g. "hash_xx0021" -> "hash_xx0019".
See also: http://docs.cacti.net/howto:determine_cacti_template_version
For example, converting for 0.8.7e by traditional(?) sed method:
(when imported modified 'cacti_graph_template_mysql_command_statistics.xml')
But I'm not sure whether if this converted templates will work (or not) at older version of Cacti.
Let's try replacing hash code to your version,
e.g. "hash_xx0021" -> "hash_xx0019".
See also: http://docs.cacti.net/howto:determine_cacti_template_version
For example, converting for 0.8.7e by traditional(?) sed method:
or, more simply:% sed -i.bak -e 's/\([<\/*|>|\|]\)hash_\(..\)0021/\1hash_\20019/g' graph_mysql_stats/*.xml
Import results:% sed -i.bak -e 's/hash_\(..\)0021/hash_\10019/g' graph_mysql_stats/*.xml
(when imported modified 'cacti_graph_template_mysql_command_statistics.xml')
But I'm not sure whether if this converted templates will work (or not) at older version of Cacti.
Re: The MySQL Graph Collection - Version 2.0.1!
Whaou great, thanks for the tips
I test it !
I test it !
Cacti Version - 0.8.8a
Plugin Architecture - 3.1
Poller Type - spine
Server Info - Linux
Web Server - Apache/2.2.22 (Ubuntu)
PHP - 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
MySQL - 5.5.29-0ubuntu0.12.04.2
RRDTool - 1.4.7
Plugin Architecture - 3.1
Poller Type - spine
Server Info - Linux
Web Server - Apache/2.2.22 (Ubuntu)
PHP - 5.3.10-1ubuntu3.6 with Suhosin-Patch (cli)
MySQL - 5.5.29-0ubuntu0.12.04.2
RRDTool - 1.4.7
Re: The MySQL Graph Collection - Version 2.0.1!
Hello,
I tried to create the graphs for my MySQL Server, but only the Query Cache is shown correctly, all the other graphs are not displayed (the image is missing).
I tried to run the script by hand, and it works fine :
But, only the Query Cache graph is shown... Do you have an idea of what can be the problem ?
Thank you
I tried to create the graphs for my MySQL Server, but only the Query Cache is shown correctly, all the other graphs are not displayed (the image is missing).
I tried to run the script by hand, and it works fine :
Code: Select all
/usr/bin/php -q /var/www/cacti/scripts/mysql_stats.php cache XxX.com cacti_stats XxXx
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mhash.so' - /usr/lib/php5/20060613+lfs/mhash.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Cannot load module 'pdo_sqlite' because required module 'pdo' is not loaded in Unknown on line 0
used:17728 available:67091136
/usr/bin/php -q /var/www/cacti/scripts/mysql_stats.php traffic XxX cacti_stats XxXx
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mhash.so' - /usr/lib/php5/20060613+lfs/mhash.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Cannot load module 'pdo_sqlite' because required module 'pdo' is not loaded in Unknown on line 0
in:85 out:73
Thank you
Re: The MySQL Graph Collection - Version 2.0.1!
What version are you running? Do you know if you are getting data in the RRD files?
Best Regards
Best Regards
Kedare wrote:Hello,
I tried to create the graphs for my MySQL Server, but only the Query Cache is shown correctly, all the other graphs are not displayed (the image is missing).
I tried to run the script by hand, and it works fine :
But, only the Query Cache graph is shown... Do you have an idea of what can be the problem ?Code: Select all
/usr/bin/php -q /var/www/cacti/scripts/mysql_stats.php cache XxX.com cacti_stats XxXx PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mhash.so' - /usr/lib/php5/20060613+lfs/mhash.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: Cannot load module 'pdo_sqlite' because required module 'pdo' is not loaded in Unknown on line 0 used:17728 available:67091136 /usr/bin/php -q /var/www/cacti/scripts/mysql_stats.php traffic XxX cacti_stats XxXx PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mhash.so' - /usr/lib/php5/20060613+lfs/mhash.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: Cannot load module 'pdo_sqlite' because required module 'pdo' is not loaded in Unknown on line 0 in:85 out:73
Thank you
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com
Re: The MySQL Graph Collection - Version 2.0.1!
I'm running Version 0.8.7e. (I can't upgrade for now)
How can I know if the RDD files are getting data ?
How can I know if the RDD files are getting data ?
Re: The MySQL Graph Collection - Version 2.0.1!
That is probably your problem, let me try and install 0.8.7e first and translate this thing, so that it will work with older versions. I will let you know when I am done.
Kedare wrote:I'm running Version 0.8.7e. (I can't upgrade for now)
How can I know if the RDD files are getting data ?
Scott McCarty
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com
Solutions Architect/Open Source Evangelist
Twitter: @fatherlinux
URL: http://crunchtools.com
Re: The MySQL Graph Collection - Version 2.0.1!
This works fine on my local server but fails when connecting to a remote server.
I can connect to the remote via cli:
mysql -h remoteip -user=dbuser --password=dbpw
and run the same commands the script runs:
SHOW STATUS; and SHOW VARIABLES;.
But I cannot connect the remote host using the php script:
$ /usr/bin/php /var/www/html/scripts/mysql_stats.php status remoteip dbuser dbpw Connections
Error: MySQL connect failed. Check MySQL parameters (host/login/password)
I know that my parameters are correct.
select version(); returns:
local MySQL version: 5.0.77
remote MySQL version: 5.0.54a-enterprise-log
Anybody have any idea how to get this to work?
I can connect to the remote via cli:
mysql -h remoteip -user=dbuser --password=dbpw
and run the same commands the script runs:
SHOW STATUS; and SHOW VARIABLES;.
But I cannot connect the remote host using the php script:
$ /usr/bin/php /var/www/html/scripts/mysql_stats.php status remoteip dbuser dbpw Connections
Error: MySQL connect failed. Check MySQL parameters (host/login/password)
I know that my parameters are correct.
select version(); returns:
local MySQL version: 5.0.77
remote MySQL version: 5.0.54a-enterprise-log
Anybody have any idea how to get this to work?
Re: The MySQL Graph Collection - Version 2.0.1!
When performed this command, what do you see?
If nothing returned (and nothing recorded in your php error log), perhaps it succeeded.
If not so, hmm..
Code: Select all
$ /usr/bin/php -r 'mysql_connect("remoteip", "dbuser", "dbpw");'
If not so, hmm..
Re: The MySQL Graph Collection - Version 2.0.1!
This is what was returned:noname wrote:When performed this command, what do you see?If nothing returned (and nothing recorded in your php error log), perhaps it succeeded.Code: Select all
$ /usr/bin/php -r 'mysql_connect("remoteip", "dbuser", "dbpw");'
If not so, hmm..
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
I can't find the php error log.
'find / -name php.errors' returned nothing.
Re: The MySQL Graph Collection - Version 2.0.1!
If the following line exists in your php.ini, then comment out.jt555 wrote:PHP Warning: Module 'mysql' already loaded in Unknown on line 0
Code: Select all
extension=mysql.so --> ;extension=mysql.so
Probably your PHP binary have already linked MySQL library.
Code: Select all
% ldd /usr/bin/php | grep mysql
libmysqlclient.so.15 => /usr/lib/libmysqlclient.so.15
Re: The MySQL Graph Collection - Version 2.0.1!
noname wrote:If the following line exists in your php.ini, then comment out.jt555 wrote:PHP Warning: Module 'mysql' already loaded in Unknown on line 0
After that, restart Apache (and Mysql).Code: Select all
extension=mysql.so --> ;extension=mysql.so
Probably your PHP binary have already linked MySQL library.Code: Select all
% ldd /usr/bin/php | grep mysql libmysqlclient.so.15 => /usr/lib/libmysqlclient.so.15
extension=mysql.so is not in my php.ini.
ldd /usr/bin/php | grep mysql returned nothing.
Re: The MySQL Graph Collection - Version 2.0.1!
It works now without making any changes other than a MySQL restart. I think it was a problem with our MySQL server all along.extension=mysql.so is not in my php.ini.
ldd /usr/bin/php | grep mysql returned nothing.
Thanks for your help.
Who is online
Users browsing this forum: No registered users and 2 guests