Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
Just delete, in the graph template the value of "Unit Grid Value (--unit/--y-grid)"
Look at the pic
Edit :
razzle dazzle wrote:I just spent a couple of hours looking why the "mysql command statistics" and "mysql traffic" graphs stayed empty and finally got it working.
The MySQL version I use is > 5.0.2, and the "SHOW STATUS" command seems to have changed from that version on:
mysql.com wrote:Before MySQL 5.0.2, SHOW STATUS returned global status values. Because the default as of 5.0.2 is to return session values, this is incompatible with previous versions. To issue a SHOW STATUS statement that will retrieve global status values for all versions of MySQL, write it like this:
SHOW /*!50002 GLOBAL */ STATUS;
So if you have MySQL 5.0.2 or later, you can fix your graphs by doing the following:
- Open the file <cacti-install-dir>/site/scripts/mysql_stats.php
- Search for the text "$result_stat = @mysql_query("SHOW STATUS");" (around line 19)
- On that line, replace the text SHOW STATUS by SHOW /*!50002 GLOBAL */ STATUS
After a few adjustments and a bit of permissioning work this script seems to run ok for me. However I do have a problem when trying to use spine as my poller.
Spine seems to run the mysql_stats.php file fine for several polling intervals, then for no apparent reason (at least to me) it starts giving me "Spine Encountered a Segmentation Fault (Spine thread)" errors in the Cacti log. Looking at the cacti cmd window when it runs on the server I can see everything seems to run fine however it is almost like the cacti poller isn't aware that the spine process is compelte as it just sits there spitting out a "waiting on 1/1 pollers" message until timeout. As soon as I use cmd.php poller everything runs just fine.
When i restart the mysql server, the graphes make a very hight peak... And the pics are broken. See examples (i didn't know the good words to explain, i'm french :s)
what can i do ? it's normal ?
Attachments
graph_image.php.png (20.13 KiB) Viewed 41240 times
I'm getting a PDO already loaded in Unknow on line 0 and pdo_mysql already loaded in Unknown on line 0 when I try to run the script from the command line. Any ideas on that?
-st
BTW ~ If you see this post in it's own topic, I'm sorry in advance.. Hit the button too quick...
When i restart the mysql server, the graphes make a very hight peak... And the pics are broken. See examples (i didn't know the good words to explain, i'm french :s)
what can i do ? it's normal ?
I've solved the problem.
Look at the attached file. The values are bigger than writed in the textbox will ignored. that's include the fuckin useless peaks.
Basically after you get your data collection working here is what you do. There are a few unrelated problems mentioned previously in the thread and I have encountered all of them also. At this point just the graph is not being displayed but the data is being retried correctly as can be verified in the Cacti log.
Go to Graph Templates -> MySQL - Command statistics -> Unit Grid Value (--unit/--y-grid)
Change the value from "access units" to "access-units" or "access_units"
Same for MySQL - Handler statistics
-----
Essentially the problem here is that the command line for the rrdtool graph method is not passed correctly with a space since the quotes are not used around the value when calling the command. (This is probably a bug with cacti)
-------
This info is current as of version Version 0.8.7b of cacti.
Hope this helps and saves a few hours for people as it did not for me.
I was troubleshooting the mysqli_stats.php script, when the script seem to return almost everything with zeros.
And it looks that it the guys from Mysql changed how the show status; command works, now it just returns values for the current session if your msyql server is 5.02 or higher.
Chekolyn: I didnt see any difference in the numbers between your SQL command and just plaint "SHOW GLOBAL STATUS". For what it's worth, I am running MySQL v5.0.22.
Finally! all is working! Someone should get those graph templates fixed! Stupid y-grid values!!
felix9x wrote:
Change the value from "access units" to "access-units" or "access_units"
Are you sure about that? Your tip didnt help my graphs appear. I had to remove those values completely and then everything worked liked it was supposed to. Aurelgadjo has it right. According the the RRDTool manual the y-grid is a number that defines the interval between lines across the Y axis, so putting a string there makes no sense (although there is an option for a label on each line, but even that makes no sense with what is appearing in these templates!).
but the traffic got some value:
cacti@SUSE10:~> php -q /usr/local/apache/htdocs/cacti/scripts/mysql_stats.php traffic 118.1.115.107 cactiuser "cactipasswd"
in:83 out:76cacti@SUSE10:~>
I'm having the same problem, I keep getting a '0' with some commands: 'command statistics' + 'handler statistics' + 'single statistics' + 'traffic' with mysql version '5.0.67-0ubuntu6'
Any ideas what's going on here?
thanks!