The MySQL Graph Collection - Version 2.0!
Moderators: Developers, Moderators
-
- Cacti User
- Posts: 51
- Joined: Tue Apr 27, 2004 11:43 am
- Location: Duesseldorf, Germany
- Contact:
The MySQL Graph Collection - Version 2.0!
Hi,
Scott is maintaining these scripts now here: "The MySQL Graph Collection - Version 2.0.1!"
Please don't use this topic anymore. Many thanks! Otto
Hi all out there,
its time for an upgrade of the mysql-graph collection. Read the README file inside the zip-archive for more information.
changelog:
- added MySQL traffic graph
- only one php-script file for easier upgrades
- improved colors
- fixes some issues due php installation etc.
have fun!
otto
Scott is maintaining these scripts now here: "The MySQL Graph Collection - Version 2.0.1!"
Please don't use this topic anymore. Many thanks! Otto
Hi all out there,
its time for an upgrade of the mysql-graph collection. Read the README file inside the zip-archive for more information.
changelog:
- added MySQL traffic graph
- only one php-script file for easier upgrades
- improved colors
- fixes some issues due php installation etc.
have fun!
otto
- Attachments
-
- screenshots
- mysql_stats.gif (71.22 KiB) Viewed 145568 times
-
- mysql_stats.zip
- contains all files needed
- (24.72 KiB) Downloaded 22214 times
Last edited by ottob on Wed Apr 06, 2011 3:00 pm, edited 1 time in total.
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
Many many thanks
I've just modified the data templates to check "Use Per-Data Source Value" for "Database Host", allowing me to graph my local MySQL server on 127.0.0.1
Regards,
Frédéric

I've just modified the data templates to check "Use Per-Data Source Value" for "Database Host", allowing me to graph my local MySQL server on 127.0.0.1
Regards,
Frédéric
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Looks like a great script, but I'm getting an error:
C:\>php -q c:\www\cacti\scripts\mysql_stats.php localhost cactiuser@localhost cactipw Connections
Error: MySQL connect failed. Check MySQL parameters (host/login/password)
I've tried several combos of the cactiuser@localhost, my computer name, IP addy, etc. all which don't work.
I've granted cactiuser PROCESS rights via phpmyadmin
What am I missing?
C:\>php -q c:\www\cacti\scripts\mysql_stats.php localhost cactiuser@localhost cactipw Connections
Error: MySQL connect failed. Check MySQL parameters (host/login/password)
I've tried several combos of the cactiuser@localhost, my computer name, IP addy, etc. all which don't work.
I've granted cactiuser PROCESS rights via phpmyadmin
What am I missing?
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
Hi
by default (at least on my Gentoo Linux installation) MySQL binds to localhost only ; I have this in /etc/mysql/my.cnf :
Have you tried to query your loopback IP address ?
by default (at least on my Gentoo Linux installation) MySQL binds to localhost only ; I have this in /etc/mysql/my.cnf :
Code: Select all
# keep secure by default!
bind-address = 127.0.0.1
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
-
- Cacti User
- Posts: 51
- Joined: Tue Apr 27, 2004 11:43 am
- Location: Duesseldorf, Germany
- Contact:
hi,
phpmyadmin is no problem, but after setting the rights in the mysql tables you must use the mysql-command "flush privileges;" or restart the server to apply the right changes...
have you used the "grant" command as described in the readme, or the phpmyadmin built-in right functions?
please post the cactiuser entry in your mysql.user table...
phpmyadmin is no problem, but after setting the rights in the mysql tables you must use the mysql-command "flush privileges;" or restart the server to apply the right changes...
have you used the "grant" command as described in the readme, or the phpmyadmin built-in right functions?
please post the cactiuser entry in your mysql.user table...
I had the same problem... if I ran it with 127.0.0.1 it failed, but when I ran it with localhost it passed.
I think you need to set the permissions in mysql to be user@'localhost' and another one with user@'127.0.0.1' for it to work... since it probably depends on the Host name you are monitoring.
-P
I think you need to set the permissions in mysql to be user@'localhost' and another one with user@'127.0.0.1' for it to work... since it probably depends on the Host name you are monitoring.
-P
uname -a

That is what phpmyadmin shows. Is there something missing for cactiuser?
This is what I got when I tried the grant thing on my cacti/mysql machine:
Code: Select all
mysql> GRANT PROCESS ON * TO cactiuser@'localhost' IDENTIFIED by 'cactipw';
ERROR 1045: Access denied for user: '@localhost' (Using password: NO)
mysql> GRANT PROCESS ON * TO cactiuser' IDENTIFIED by 'cactipw';
'>
'>
'> ?
'> help
'> exit
'> Aborted
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
Here are the installation instructions (http://www.cacti.net/downloads/docs/htm ... _unix.html) :
Could you try to rerun these commands ?
Code: Select all
shell> mysql --user=root mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
mysql> flush privileges;
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
The problem was with yur sql. You have TO cactiuser' IDENTIFIED when you needed TO 'cactiuser' IDENTIFIED - i.e. missing a ' .BSOD2600 wrote:
This is what I got when I tried the grant thing on my cacti/mysql machine:What the heck is with the '> prompt where I can't seemingly do anything?Code: Select all
mysql> GRANT PROCESS ON * TO cactiuser@'localhost' IDENTIFIED by 'cactipw'; ERROR 1045: Access denied for user: '@localhost' (Using password: NO) mysql> GRANT PROCESS ON * TO cactiuser' IDENTIFIED by 'cactipw'; '> '> '> ? '> help '> exit '> Aborted
Try adding another user 'catiuser'@'127.0.0.1' with the same password as your otherone...
That worked for me.
-P
uname -a
Code: Select all
mysql> GRANT ALL ON cacti.* TO 'cactiuser@127.0.0.1' IDENTIFIED BY 'cactipw';
ERROR 1044: Access denied for user: '@localhost' to database 'cacti'
mysql> GRANT PROCESS ON * TO 'cactiuser' IDENTIFIED by 'cactipw';
ERROR 1045: Access denied for user: '@localhost' (Using password: NO)
mysql> GRANT PROCESS ON * TO 'cactiuser@127.0.0.1' IDENTIFIED by 'cactipw';
ERROR 1045: Access denied for user: '@localhost' (Using password: NO)
How did you log into mysql?BSOD2600 wrote:Would someone please show me what their Cacti user looks like with PHPmyadmin? Obviously, there is something not right.Code: Select all
mysql> GRANT ALL ON cacti.* TO 'cactiuser@127.0.0.1' IDENTIFIED BY 'cactipw'; ERROR 1044: Access denied for user: '@localhost' to database 'cacti' mysql> GRANT PROCESS ON * TO 'cactiuser' IDENTIFIED by 'cactipw'; ERROR 1045: Access denied for user: '@localhost' (Using password: NO) mysql> GRANT PROCESS ON * TO 'cactiuser@127.0.0.1' IDENTIFIED by 'cactipw'; ERROR 1045: Access denied for user: '@localhost' (Using password: NO)
You should have done it as root.
mysql -u root -p mysql
then get prompted for password....
This is the mysql root user password not the system root password... it should be the same as the user/password that you use in phpmyadmin to be able to add the user to the system in the first place. Now the thin is, in phpmyadmin - add a user cactiuser with the host of 127.0.0.1 ... grant process rights to that user and voila!
Maybe it's more complicated than that, but at least give it a try.
-P
uname -a
Yes, I own this mysql machine
Amazing, no one caught my mistakes this whole time with the wrong command to run the script...sheesh
Code: Select all
C:\mysql\bin>mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8837 to server version: 4.0.21-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> GRANT PROCESS ON * TO 'cactiuser@127.0.0.1' IDENTIFIED by 'cactipw';
ERROR 1145: The host or user argument to GRANT is too long
mysql> GRANT PROCESS ON * TO 'cactiuser@localhost' IDENTIFIED by 'cactipw';
ERROR 1145: The host or user argument to GRANT is too long
mysql> GRANT PROCESS ON * TO 'cactiuser' IDENTIFIED by 'cactipw';
Query OK, 0 rows affected (0.01 sec)
mysql> exit
C:\mysql\bin>php -q c:\auntie\cacti\scripts\mysql_stats.php localhost cactiuser cactipw Connections
Error: MySQL connect failed. Check MySQL parameters (host/login/password)
C:\mysql\bin>php -q c:\auntie\cacti\scripts\mysql_stats.php command localhost cactiuser cactipw
change_db:5553 delete:54254 insert:55861 select:231182 update:11474
C:\mysql\bin>
Amazing, no one caught my mistakes this whole time with the wrong command to run the script...sheesh
Who is online
Users browsing this forum: No registered users and 0 guests