The MySQL Graph Collection - Version 2.0!
Moderators: Developers, Moderators
-
- Posts: 18
- Joined: Thu Oct 27, 2005 9:24 am
- Location: Germany, Bavaria
Hello and thanks for this nice script
I will use it in our local network on a Debian 3.1 Machine with MySql 4.1
and Cacti 0.8.6g. The Installation is complete and on the shell is everything allright:
But in Cacti is only an empty graph.
Here the Cacti Log.
The Cactid runs at this time with root for debug only.
Permissions should be right...
Has anybody an answer?
thx Hildebrand
I will use it in our local network on a Debian 3.1 Machine with MySql 4.1
and Cacti 0.8.6g. The Installation is complete and on the shell is everything allright:
Code: Select all
debian:/# /usr/bin/php -q /usr/local/share/cacti/scripts/mysql_stats.php cache localhost myuser mypassword
used:5839072 available:10938144debian:/#
debian:/# /usr/bin/php -q /usr/local/share/cacti/scripts/mysql_stats.php handler localhost myuser mypassword
delete:544514 read_first:23676 read_key:1667449 read_next:1648447 read_prev:13 read_rnd:269712 read_rnd_next:1751137 update:81865 write:670992debian:/#
Here the Cacti Log.
Code: Select all
11/16/2005 07:05:13 AM - SYSTEM STATS: Time:11.2628 Method:cactid Processes:1 Threads:1 Hosts:36 HostsPerProcess:36 DataSources:338 RRDsProcessed:188
11/16/2005 07:05:02 AM - CACTID: Poller[0] Host[1] DS[294] WARNING: Result from SCRIPT not valid. Partial Result: ...
11/16/2005 07:05:02 AM - CACTID: Poller[0] Host[1] DS[293] WARNING: Result from SCRIPT not valid. Partial Result: ...
11/16/2005 07:05:02 AM - CACTID: Poller[0] Host[1] DS[292] WARNING: Result from SCRIPT not valid. Partial Result: ...
Permissions should be right...
Has anybody an answer?
thx Hildebrand
-
- Posts: 18
- Joined: Thu Oct 27, 2005 9:24 am
- Location: Germany, Bavaria
thanks for your post!
In the Data Input Method is the full path to the php binary set correctly.
The Permissions in MySQL are right, i copied the Data Input Method in the Shell an set the hostname,password and user manual and it works.
So i modified the Data Input in Cacti for debug without any Input Fields like:
But still this Problem:
Is there an Problem with the PHP Script??
On the Shell it works perfect but in Cacit there are no Data...
thx
Hildebrand
In the Data Input Method is the full path to the php binary set correctly.
Code: Select all
/usr/bin/php -q <path_cacti>/scripts/mysql_stats.php traffic <hostname> <username> <password>
So i modified the Data Input in Cacti for debug without any Input Fields like:
Code: Select all
/usr/bin/php -q /usr/local/share/cacti/scripts/mysql_stats.php command localhost myuser mypw
Code: Select all
11/17/2005 08:20:14 AM - SYSTEM STATS: Time:12.2821 Method:cactid Processes:1 Threads:1 Hosts:37 HostsPerProcess:37 DataSources:343 RRDsProcessed:193
11/17/2005 08:20:13 AM - CACTID: Poller[0] Host[50] DS[302] WARNING: Result from SCRIPT not valid. Partial Result: ...
On the Shell it works perfect but in Cacit there are no Data...
thx
Hildebrand
-
- Posts: 18
- Joined: Thu Oct 27, 2005 9:24 am
- Location: Germany, Bavaria
Hello,
there is Cacti 0.8.6g with CACTID 0.8.6f running.
Here is the output with the cmd.php poller.
Could not open input??
thx 4 Help!
Hildebrand
there is Cacti 0.8.6g with CACTID 0.8.6f running.
Here is the output with the cmd.php poller.
Code: Select all
11/18/2005 08:10:15 AM - SYSTEM STATS: Time:13.5015 Method:cmd.php Processes:1 Threads:N/A Hosts:37 HostsPerProcess:37 DataSources:343 RRDsProcessed:193
11/18/2005 08:10:14 AM - CMDPHP: Poller[0] Host[50] DS[295] WARNING: Result from CMD not valid. Partial Result: Could not open input
11/18/2005 08:10:14 AM - CMDPHP: Poller[0] Host[50] DS[302] WARNING: Result from CMD not valid. Partial Result: Could not open input
11/18/2005 08:10:14 AM - CMDPHP: Poller[0] Host[50] DS[301] WARNING: Result from CMD not valid. Partial Result: Could not open input
11/18/2005 08:10:14 AM - CMDPHP: Poller[0] Host[50] DS[299] WARNING: Result from CMD not valid. Partial Result: Could not open input
11/18/2005 08:10:13 AM - CMDPHP: Poller[0] Host[50] DS[297] WARNING: Result from CMD not valid. Partial Result: Could not open input
11/18/2005 08:10:13 AM - CMDPHP: Poller[0] Host[50] DS[300] WARNING: Result from CMD not valid. Partial Result: Could not open input
11/18/2005 08:10:12 AM - CMDPHP: Poller[0] Host[50] DS[298] WARNING: Result from CMD not valid. Partial Result: Could not open input
11/18/2005 08:10:11 AM - CMDPHP: Poller[0] Host[50] DS[296] WARNING: Result from CMD not valid. Partial Result: Could not open input
thx 4 Help!
Hildebrand
-
- Posts: 18
- Joined: Thu Oct 27, 2005 9:24 am
- Location: Germany, Bavaria
Allright - here it is
MySQL Connect Error?? Why?
Output: U ??
Here is the shell:
When i use "localhost" and NOT "127.0.0.1" it will work in the shell!
But not in Cacti
thx Hildebrand
Code: Select all
11/18/2005 04:30:09 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /usr/share/cacti/site/poller_export.php]
11/18/2005 04:30:09 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /usr/share/cacti/site/poller_commands.php]
11/18/2005 04:30:09 PM - SYSTEM STATS: Time:7.3851 Method:cmd.php Processes:1 Threads:N/A Hosts:37 HostsPerProcess:37 DataSources:343 RRDsProcessed:197
11/18/2005 04:30:09 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/mysqlserver_value_300.rrd --template value 1132327802:U
11/18/2005 04:30:09 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/mysqlserver_write_297.rrd --template 1132327802:U
11/18/2005 04:30:09 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/mysqlserver_questions_299.rrd --template questions 1132327802:U
11/18/2005 04:30:09 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/mysqlserver_traffic_in_302.rrd --template 1132327802:U
11/18/2005 04:30:09 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/mysqlserver_connected_301.rrd --template 1132327802:U
11/18/2005 04:30:09 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/site/rra/mysqlserver_delete_295.rrd --template 1132327802:U
11/18/2005 04:30:08 PM - CMDPHP: Poller[0] Time: 6.7512 s, Theads: N/A, Hosts: 36
11/18/2005 04:30:08 PM - PHPSVR: Poller[0] DEBUG: PHP Script Server Shutdown request received, exiting
11/18/2005 04:30:08 PM - CMDPHP: Poller[0] Host[50] DS[295] CMD: /usr/bin/php -q /usr/share/cacti/site/scripts/mysql_stats.php command 127.0.0.1 stats stats, output: U
11/18/2005 04:30:08 PM - CMDPHP: Poller[0] Host[50] DS[295] WARNING: Result from CMD not valid. Partial Result: Error: MySQL connect
11/18/2005 04:30:08 PM - CMDPHP: Poller[0] Host[50] DS[302] CMD: /usr/bin/php -q /usr/share/cacti/site/scripts/mysql_stats.php traffic 127.0.0.1 stats stats, output: U
11/18/2005 04:30:08 PM - CMDPHP: Poller[0] Host[50] DS[302] WARNING: Result from CMD not valid. Partial Result: Error: MySQL connect
11/18/2005 04:30:08 PM - CMDPHP: Poller[0] Host[50] DS[301] CMD: /usr/bin/php -q /usr/share/cacti/site/scripts/mysql_stats.php thread 127.0.0.1 stats stats, output: U
11/18/2005 04:30:08 PM - CMDPHP: Poller[0] Host[50] DS[301] WARNING: Result from CMD not valid. Partial Result: Error: MySQL connect
11/18/2005 04:30:08 PM - CMDPHP: Poller[0] Host[50] DS[299] CMD: /usr/bin/php -q /usr/share/cacti/site/scripts/mysql_stats.php status 127.0.0.1 stats stats Questions, output: U
11/18/2005 04:30:08 PM - CMDPHP: Poller[0] Host[50] DS[299] WARNING: Result from CMD not valid. Partial Result: Error: MySQL connect
11/18/2005 04:30:08 PM - CMDPHP: Poller[0] Host[50] DS[297] CMD: /usr/bin/php -q /usr/share/cacti/site/scripts/mysql_stats.php handler 127.0.0.1 stats stats, output: U
11/18/2005 04:30:08 PM - CMDPHP: Poller[0] Host[50] DS[297] WARNING: Result from CMD not valid. Partial Result: Error: MySQL connect
11/18/2005 04:30:08 PM - CMDPHP: Poller[0] Host[50] DS[300] CMD: /usr/bin/php -q /usr/share/cacti/site/scripts/mysql_stats.php status 127.0.0.1 stats stats, output: U
11/18/2005 04:30:08 PM - CMDPHP: Poller[0] Host[50] DS[300] WARNING: Result from CMD not valid. Partial Result: Error: MySQL connect
...
...
...
11/18/2005 04:30:02 PM - CMDPHP: Poller[0] PHP Script Server Started Properly
11/18/2005 04:30:02 PM - PHPSVR: Poller[0] PHP Script Server has Started - Parent is cmd
11/18/2005 04:30:02 PM - PHPSVR: Poller[0] DEBUG: FILENM: /usr/share/cacti/site/script_server.php
11/18/2005 04:30:02 PM - PHPSVR: Poller[0] DEBUG: DIRNAM: /usr/share/cacti/site
11/18/2005 04:30:02 PM - PHPSVR: Poller[0] DEBUG: GETCWD: /root
11/18/2005 04:30:02 PM - PHPSVR: Poller[0] DEBUG: SERVER: cmd
11/18/2005 04:30:02 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: /usr/bin/php, ARGS: -q /usr/share/cacti/site/cmd.php 0 50]
Output: U ??
Here is the shell:
Code: Select all
debian:/# /usr/bin/php -q /usr/share/cacti/site/scripts/mysql_stats.php command localhost stats stats
change_db:2212 delete:84737 insert:11338 select:33297 update:9930debian:/# /usr/bin/php -q /usr/share/cacti/site/scripts/mysql_stats.php command localhost statsdebian:/# /usr/bin/php -q /usr/share/cacti/site/scripts/mysql_stats.php command 127.0.0.1 stats stats
Error: MySQL connect failed. Check MySQL parameters (host/login/password)
debian:/# /usr/bin/php -q /usr/local/share/cacti/scripts/mysql_stats.php command localhost stats stats
But not in Cacti
thx Hildebrand
-
- Posts: 18
- Joined: Thu Oct 27, 2005 9:24 am
- Location: Germany, Bavaria
other problem with Mysql
Hi,
I have also some problems with the MySQL scripts. The connect works I think but I don't get any result in the graphs. I only get the following lines in the logfile (DEBUG modus) :
12/01/2005 10:15:13 PM - CMDPHP: Poller[0] Host[27] DS[374] WARNING: Result from CMD not valid. Partial Result:
12/01/2005 10:15:13 PM - CMDPHP: Poller[0] Host[27] DS[374] CMD: /usr/bin/php -q /usr/share/webapps/cacti/0.8.6f-r1/htdocs/scripts/mysqli_stats.php status hostname username password Questions, output: U
12/01/2005 10:15:14 PM - CMDPHP: Poller[0] Host[27] DS[375] WARNING: Result from CMD not valid. Partial Result:
12/01/2005 10:15:14 PM - CMDPHP: Poller[0] Host[27] DS[375] CMD: /usr/bin/php -q /usr/share/webapps/cacti/0.8.6f-r1/htdocs/scripts/mysqli_stats.php thread hostname username password, output: U
This are only some lines but each statistic has the same problem with "output: U". The hostname/username/password is crunched with normal words.
The hostname is in my case the real name of the host (like ix1266.domain.tld) and not localhost, but also with localhost the messages are the same.
I use the following system :
Gentoo 2005
PHP 4.4.0
Cacti 0.8.6f-r1
Apache 2.0.54-r31
MySql 4.1.14
So there isn't any problem with the rights I think because if there is anythink like this - as in the begin - there would be other error messages in the Debug-Log.
Maybe anyone can help me for this problem.
cu alex
I have also some problems with the MySQL scripts. The connect works I think but I don't get any result in the graphs. I only get the following lines in the logfile (DEBUG modus) :
12/01/2005 10:15:13 PM - CMDPHP: Poller[0] Host[27] DS[374] WARNING: Result from CMD not valid. Partial Result:
12/01/2005 10:15:13 PM - CMDPHP: Poller[0] Host[27] DS[374] CMD: /usr/bin/php -q /usr/share/webapps/cacti/0.8.6f-r1/htdocs/scripts/mysqli_stats.php status hostname username password Questions, output: U
12/01/2005 10:15:14 PM - CMDPHP: Poller[0] Host[27] DS[375] WARNING: Result from CMD not valid. Partial Result:
12/01/2005 10:15:14 PM - CMDPHP: Poller[0] Host[27] DS[375] CMD: /usr/bin/php -q /usr/share/webapps/cacti/0.8.6f-r1/htdocs/scripts/mysqli_stats.php thread hostname username password, output: U
This are only some lines but each statistic has the same problem with "output: U". The hostname/username/password is crunched with normal words.
The hostname is in my case the real name of the host (like ix1266.domain.tld) and not localhost, but also with localhost the messages are the same.
I use the following system :
Gentoo 2005
PHP 4.4.0
Cacti 0.8.6f-r1
Apache 2.0.54-r31
MySql 4.1.14
So there isn't any problem with the rights I think because if there is anythink like this - as in the begin - there would be other error messages in the Debug-Log.
Maybe anyone can help me for this problem.
cu alex
other problem with Mysql
Hello again,
so after a good night with some drinks I got the result ;o) The problem is if you use PHP 4.4 you MUST use the old mysql_stats.php script and not the new mysqli_stats.php
So be carefully :
PHP 4.x --> mysql_stats.php
PHP 5.x --> mysqli_stats.php
So now it works - thanks for the nice scripts
bye alex
so after a good night with some drinks I got the result ;o) The problem is if you use PHP 4.4 you MUST use the old mysql_stats.php script and not the new mysqli_stats.php
So be carefully :
PHP 4.x --> mysql_stats.php
PHP 5.x --> mysqli_stats.php
So now it works - thanks for the nice scripts
bye alex
Hey,
I'd like to use this script as mentioned earlier, when i try to paste the file or import the file the page just reloads without any errors or anything.
Is there a fix to this problem?
Thanks very much
Laurie
EDIT: Ignore this completly. Ubuntu has a really really old version in the apt-get. And now I've upgraded, which was apparently successful, but now viewgraph.php returns a blank page. Bugger.
I'd like to use this script as mentioned earlier, when i try to paste the file or import the file the page just reloads without any errors or anything.
Is there a fix to this problem?
Thanks very much
Laurie
EDIT: Ignore this completly. Ubuntu has a really really old version in the apt-get. And now I've upgraded, which was apparently successful, but now viewgraph.php returns a blank page. Bugger.
Unit
Hello,
Thanks for these graphic, work fine on my side.
What the lower case "m" unit mean in the mysql graph ? I guess this milli unit.
BTW what is a access units ?
I thought a access units was one select, one delete...
But how could we have decimal like 3.5 access units ? Does this mean a query was a half unit ? Doesn't make sense to me. Or maybe this because some query take more time to run from other ?
You could have a select who take 2.5 access unit and one who take 1 access unit.
Does someone can help me to understand this ?
Thanks again,
MoonZar
Thanks for these graphic, work fine on my side.
What the lower case "m" unit mean in the mysql graph ? I guess this milli unit.
BTW what is a access units ?
I thought a access units was one select, one delete...
But how could we have decimal like 3.5 access units ? Does this mean a query was a half unit ? Doesn't make sense to me. Or maybe this because some query take more time to run from other ?
You could have a select who take 2.5 access unit and one who take 1 access unit.
Does someone can help me to understand this ?
Thanks again,
MoonZar
Who is online
Users browsing this forum: No registered users and 6 guests