The MySQL Graph Collection - Version 2.0!
Moderators: Developers, Moderators
Re: MYSQL MULTI running more than 1 mysql on same ip
I was thinking about this too. As I don't have time to add the port support in the templates (which should be done pretty quick with some knownledge of cacti), I implemented a hotfix.jbreault wrote:Is there somebody that can add to the script mysql port support ? we have about 16 mysql db running on different port and since cacti add by ping if host is alive before to try to graph, we cant use anymore HOST:PORT as host...
This is only working, if your hostnames are different (i.e. not 127.0.0.1 for a stunnel connection on different ports).
Open the mysql(i)_stats.php and search for the following line:
$password = $_SERVER["argv"][4];
After that line, add the following line for every host which is using a different port (replace "mysqlhostname.com" with the hostname or IP address you are using in cacti):
Code: Select all
if($host == "mysqlhostname.com") {
$host .= ":3307";
}
This is only a hotfix, if you don't have time to implement directly in cacti. Be sure to keep a note in the notes field of your host, so you don't run in to problems, when the port is changing back to 3306.
If you have the knowledge of implementing it in cacti, do it there and repost the file. That would be great.
OttoB: Wouldn't it be good to release the zip files on a seperate web page with a link to this thread? This way users don't have to go through the whole thread to find the latest version. Also the latest fixes could be on a single page.
Question about graph units
As I don't wanted to mix up this question with my last post, I'm going to ask it seperately.
I'm not sure about the unit "m" in the graph. This is probably a thing about rrdtool but in the end I'm not sure how to interpret the mysql_stats values.
What exactly means "m" (i.e. "30.00 m" in the attached image)? Is that milli and how is this calculated? Is this the average per minute, so if I there's only one action within 3 minutes for example?
I'm not sure about the unit "m" in the graph. This is probably a thing about rrdtool but in the end I'm not sure how to interpret the mysql_stats values.
What exactly means "m" (i.e. "30.00 m" in the attached image)? Is that milli and how is this calculated? Is this the average per minute, so if I there's only one action within 3 minutes for example?
- Attachments
-
- MySQL Handler Statistics
- mysql-handler.png (54.6 KiB) Viewed 34382 times
Acess denied in Mysql
when i execute this command C:\mysql\bin>php -q c:\auntie\cacti\scripts\mysql_stats.php command localhost cactiuser cactipw
i get the message access is denied. pls help me to solve the issue.
i get the message access is denied. pls help me to solve the issue.
Re: Acess denied in Mysql
Did you use the "GRANT PROCESS..." command to add cactiuser to your database?mintoy wrote:when i execute this command C:\mysql\bin>php -q c:\auntie\cacti\scripts\mysql_stats.php command localhost cactiuser cactipw
i get the message access is denied. pls help me to solve the issue.
Check the first pages of this thread or the README included in the package to see how a user is added.
Thread and Handler graphs have NaN values only
Hi,
OS: RHEL 5
kernel: 2.6.18-128
RAM: 32 Gb
Processors: 8 cores
Database: MySQL cluster 7.0.6 on 2 nodes
PHP: 5.2.1
Cacti: 0.8.7e
PA: 2.4
plugins: a lot of cacti plugins installed
Spine: 0.8.7e
apache: 2.2.3-22
My Problem:
I've installed mysqli_stats to be able to graph usefull data from my MySQL cluster nodes.
All graphs are working fine except the Threads one, and the Handler one.
Enabling debuging, RRDTool status is OK everywhere.
Testing mysqli_stats.php under shell to have handler and threads data give correct results. See here below for mysqli_stats.php handler localhost XXXXX XXXXX:
delete:141103091 read_first:7893 read_key:422346295 read_next:265394247 read_prev:0 read_rnd:92875384 read_rnd_next:110791284115 update:471787032 write:652298529
THe problem is that RRDtool files for those two graphs (handler and threads) contains only NaN values.
I don't know why.
Please note that the maximum value for each data of the handler template is set to 1000000000000.
Any help would be greatly appreciated.
best regards
Nicolas
OS: RHEL 5
kernel: 2.6.18-128
RAM: 32 Gb
Processors: 8 cores
Database: MySQL cluster 7.0.6 on 2 nodes
PHP: 5.2.1
Cacti: 0.8.7e
PA: 2.4
plugins: a lot of cacti plugins installed
Spine: 0.8.7e
apache: 2.2.3-22
My Problem:
I've installed mysqli_stats to be able to graph usefull data from my MySQL cluster nodes.
All graphs are working fine except the Threads one, and the Handler one.
Enabling debuging, RRDTool status is OK everywhere.
Testing mysqli_stats.php under shell to have handler and threads data give correct results. See here below for mysqli_stats.php handler localhost XXXXX XXXXX:
delete:141103091 read_first:7893 read_key:422346295 read_next:265394247 read_prev:0 read_rnd:92875384 read_rnd_next:110791284115 update:471787032 write:652298529
THe problem is that RRDtool files for those two graphs (handler and threads) contains only NaN values.
I don't know why.
Please note that the maximum value for each data of the handler template is set to 1000000000000.
Any help would be greatly appreciated.
best regards
Nicolas
-
- Posts: 3
- Joined: Sun Apr 15, 2007 6:43 am
fix for blank graphs
Hahnn
I had the same problem and used the results from razzle dazzle earlier in this thread, take a look at http://forums.cacti.net/post-96562.html ... ght=#96562, you'll need to edit the mysql_stats.php file
Thanks!
I had the same problem and used the results from razzle dazzle earlier in this thread, take a look at http://forums.cacti.net/post-96562.html ... ght=#96562, you'll need to edit the mysql_stats.php file
Thanks!
-
- Posts: 1
- Joined: Mon Jan 18, 2010 10:48 am
I just installed mysql_stats.
I like it a lot, especially I can read any value with it.
I created a graph that shows 'Key_read_requests'
I created it as a COUNTER (which made the most sense to me)
The weird thing is, it shows:
min: 70.67 max: 393.39 current: 119.84
How does it come to these values?
Are they divided or something?
I checked for myself and this value changes by about 8000 per 5 minutes.
Thanks a lot
I like it a lot, especially I can read any value with it.
I created a graph that shows 'Key_read_requests'
I created it as a COUNTER (which made the most sense to me)
The weird thing is, it shows:
min: 70.67 max: 393.39 current: 119.84
How does it come to these values?
Are they divided or something?
I checked for myself and this value changes by about 8000 per 5 minutes.
Thanks a lot
If you're using MySQL5, edit mysql_stats.php and replace the following lines
to
and
to
This would give your graph a system wide statistics.
Code: Select all
$result_stat = @mysql_query("SHOW STATUS");
Code: Select all
$result_stat = @mysql_query("SHOW GLOBAL STATUS");
Code: Select all
$result_var = @mysql_query("SHOW VARIABLES");
Code: Select all
$result_var = @mysql_query("SHOW GLOBAL VARIABLES");
i found solution:klim wrote:Hello, i have a problem:
mysql> GRANT PROCESS ON * TO cactiuser@'some ip' IDENTIFIED by 'cactipasswd';
ERROR 1046 (3D000): No database selected
The mysql server (witch i want to monitoring) located on different of cacti server.
Also i want to monitoring whole server instead specific db
mysql> GRANT PROCESS ON *.* TO cactiuser@'some ip' IDENTIFIED by 'cactipasswd';
Query OK, 0 rows affected (0.00 sec)
Who is online
Users browsing this forum: No registered users and 4 guests