The MySQL Graph Collection - Version 2.0!
Moderators: Developers, Moderators
Ok sorry, silly me for not reading all the comments but maybe some useful advice, include it in the README.txt?
There seems to still be a few people having problems with this and It would make more sense.. If not in the README.txt maybe in the first message of this topic?
Cheers and thanks for your efforts on this.
Regards
Byron
There seems to still be a few people having problems with this and It would make more sense.. If not in the README.txt maybe in the first message of this topic?
Cheers and thanks for your efforts on this.
Regards
Byron
Question about the Data Input Methods design
Looking at the way the data input methods are defined, there are currently 6 available all of which call the script slightly differently (namely the first parameter which specifies the type of statistics to grab).
Is cacti limited by design from just having one data input method that simply returns all variables displayed by (in this case) 'SHOW STATUS', instead of having N instances for N types of graphing templates? As it is now, cacti has to query the mysql server 6 times for the exact same data, the only difference is what it outputs.
In other words, if the input method returns 'var1:value1 var2:value2 .. varN:valueN' and you only care about 'var2' does that confuse cacti? The manual does not really say anything about this.
I'm pretty new to cacti and so far I'm pretty impressed!
Is cacti limited by design from just having one data input method that simply returns all variables displayed by (in this case) 'SHOW STATUS', instead of having N instances for N types of graphing templates? As it is now, cacti has to query the mysql server 6 times for the exact same data, the only difference is what it outputs.
In other words, if the input method returns 'var1:value1 var2:value2 .. varN:valueN' and you only care about 'var2' does that confuse cacti? The manual does not really say anything about this.
I'm pretty new to cacti and so far I'm pretty impressed!
Limit in the data sources need to be appropriately set
It looks like all the limits for each of the data sources are set to 10000000000, while the stats being displayed are based on a 32bit counter. Whenever you reset counters or reset the mysql daemon, the graphs will most likely have a very large jump. I just had that happen and it's quite a pain to go into the rrd files to correct this..
If you change the max to a 32 bit counter, 4294967296, it should handle counter resets.
If you change the max to a 32 bit counter, 4294967296, it should handle counter resets.
hi,
i'm getting the following error:
[cactiuser@cacti cactiuser]$ /usr/bin/php /var/www/html/cacti/poller.php
PHP Notice: Undefined index: query_cache_size in /var/www/html/cacti/scripts/mysql_stats.php on line 38
PHP Notice: Undefined index: Qcache_free_memory in /var/www/html/cacti/scripts/mysql_stats.php on line 38
PHP Notice: Undefined index: Qcache_free_memory in /var/www/html/cacti/scripts/mysql_stats.php on line 39
any ideas?
Mait
i'm getting the following error:
[cactiuser@cacti cactiuser]$ /usr/bin/php /var/www/html/cacti/poller.php
PHP Notice: Undefined index: query_cache_size in /var/www/html/cacti/scripts/mysql_stats.php on line 38
PHP Notice: Undefined index: Qcache_free_memory in /var/www/html/cacti/scripts/mysql_stats.php on line 38
PHP Notice: Undefined index: Qcache_free_memory in /var/www/html/cacti/scripts/mysql_stats.php on line 39
any ideas?
Mait
It's still 127.0.0.1 vs. localhost...
Since
is not working, but
is working, I've changed the script a little like this:
It generates a notice when run from the CLI, but it also give date to the RRDs
Since
Code: Select all
/usr/local/bin/php -q /usr/local/share/cacti/scripts/mysql_stats.php command 127.0.0.1 cactiuser password
Code: Select all
/usr/local/bin/php -q /usr/local/share/cacti/scripts/mysql_stats.php command localhost cactiuser password
Code: Select all
#$host = $_SERVER["argv"][2];
$host = localhost;
$username = $_SERVER["argv"][3];
$password = $_SERVER["argv"][4];
This is my sick nature...
i got this from log if i start the mysql_stats.php:
03/18/2005 02:25:50 AM - CMDPHP: Poller[0] Host[1] WARNING: Result from CMD not valid. Partial Result: Error: MySQL connect
03/18/2005 02:25:50 AM - CMDPHP: Poller[0] Host[1] WARNING: Result from CMD not valid. Partial Result: Error: MySQL connect
and i also got this error message if i start poller.php via commandline:
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
ERROR: Not enough arguments
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
ERROR: Not enough arguments
OK u:0.00 s:0.00 r:1.01
ERROR: Not enough arguments
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
ERROR: Not enough arguments
any idea what this could be?
i can connect to the database via commandline, i got no errors.
regards,
komaii
03/18/2005 02:25:50 AM - CMDPHP: Poller[0] Host[1] WARNING: Result from CMD not valid. Partial Result: Error: MySQL connect
03/18/2005 02:25:50 AM - CMDPHP: Poller[0] Host[1] WARNING: Result from CMD not valid. Partial Result: Error: MySQL connect
and i also got this error message if i start poller.php via commandline:
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
ERROR: Not enough arguments
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
ERROR: Not enough arguments
OK u:0.00 s:0.00 r:1.01
ERROR: Not enough arguments
OK u:0.00 s:0.00 r:1.01
OK u:0.00 s:0.00 r:1.01
ERROR: Not enough arguments
any idea what this could be?
i can connect to the database via commandline, i got no errors.
regards,
komaii
hmm it looks like the xml import is wrong or the script:
her the log output if i newly import the mysql xml`s:
sh: lt: command not found
sh: path_php_binarygt: command not found
sh: -q: command not found
sh: path_cactigt: command not found
sh: /scripts/mysql_stats.php: No such file or directory
sh: hostnamegt: command not found
sh: lt: command not found
sh: usernamegt: command not found
sh: lt: command not found
sh: passwordgt: command not found
does anyone know whats this is?
her the log output if i newly import the mysql xml`s:
sh: lt: command not found
sh: path_php_binarygt: command not found
sh: -q: command not found
sh: path_cactigt: command not found
sh: /scripts/mysql_stats.php: No such file or directory
sh: hostnamegt: command not found
sh: lt: command not found
sh: usernamegt: command not found
sh: lt: command not found
sh: passwordgt: command not found
does anyone know whats this is?
from http://dev.mysql.com/doc/mysql/en/serve ... ables.htmlchrigu wrote:There is a graph called "mysql questions". stupid question: what is a mysql question?
thanks,
chrigu
Questions
The number of queries that have been sent to the server.
-ec
I'm having some trouble under 0.8.6c. Some scripts work and some don't. For example, the connections data gets charted, but the command statistics script does not even create a .rrd file, so never generates a chart. When I run the script by hand, it appears to deliver appropriate data.
When I activate the data source for command statistics, poller.php thows this error:
PHP Warning: Compilation failed: range out of order in character class at offset 29 in /var/www/html/cacti-0.8.6c/lib/poller.php on line 215
The output from running the command by hand:
/usr/bin/php -q /var/www/html/cacti/scripts/mysql_stats.php command <ip> <user> <passwd>
change_db:1517531 delete:67708 insert:481203 select:8691064 update:1800654
When I activate the data source for command statistics, poller.php thows this error:
PHP Warning: Compilation failed: range out of order in character class at offset 29 in /var/www/html/cacti-0.8.6c/lib/poller.php on line 215
The output from running the command by hand:
/usr/bin/php -q /var/www/html/cacti/scripts/mysql_stats.php command <ip> <user> <passwd>
change_db:1517531 delete:67708 insert:481203 select:8691064 update:1800654
-
- Posts: 3
- Joined: Mon Mar 21, 2005 7:56 am
No rrd graph updated.
I got the same problem, but when I look into my cacti.log file I see the following:badger wrote: PHP Warning: Compilation failed: range out of order in character class at offset 29 in /var/www/html/cacti-0.8.6c/lib/poller.php on line 215
The output from running the command by hand:
/usr/bin/php -q /var/www/html/cacti/scripts/mysql_stats.php command <ip> <user> <passwd>
change_db:1517531 delete:67708 insert:481203 select:8691064 update:1800654
04/07/2005 11:35:02 AM - CACTID: Poller[0] Host[1] SCRIPT: /usr/bin/php -q /usr/local/cacti-0.8.6c/scripts/mysql_stats.php command localhost root mypasswd, output: change_db:13806 delete:2278693 insert:2296971 select:576136 update:94064
04/07/2005 11:35:02 AM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (1218,'','2005-04-07 11:35:02','change_db:13806 delete:2278693 insert:2296971 select:576136 update:94064')
There is no value for 'rrd_name'.
The ' MySQL - Single Statistics Input Method' works fine.
Ex for the Question statistic template :
04/07/2005 11:35:02 AM - CACTID: Poller[0] Host[1] SCRIPT: /usr/bin/php -q /usr/local/cacti-0.8.6c/scripts/mysql_stats.php status localhost root mypasswd Questions, output: 5369990
04/07/2005 11:35:02 AM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (1222,'questions','2005-04-07 11:35:02','5369990')
Any ideas???
Thank you
Who is online
Users browsing this forum: No registered users and 4 guests