Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Jun 27, 2019 6:03 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 170 posts ]  Go to page 1, 2, 3, 4, 5 ... 12  Next
Author Message
 Post subject: The MySQL Graph Collection - Version 2.0!
PostPosted: Tue Jan 18, 2005 8:55 am 
Offline
Cacti User

Joined: Tue Apr 27, 2004 11:43 am
Posts: 51
Location: Duesseldorf, Germany
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


Attachments:
File comment: contains all files needed
mysql_stats.zip [24.72 KiB]
Downloaded 20473 times
File comment: screenshots
mysql_stats.gif
mysql_stats.gif [ 71.22 KiB | Viewed 138951 times ]


Last edited by ottob on Wed Apr 06, 2011 3:00 pm, edited 1 time in total.
Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 18, 2005 11:37 am 
Offline
Cacti Guru User
User avatar

Joined: Fri Sep 19, 2003 8:36 am
Posts: 2326
Location: Sophia-Antipolis, France
Many many thanks :D

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

_________________

HOWTOs :
Templates :


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 18, 2005 6:45 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12160
Location: USA
Looks like a great script, but I'm getting an error:

C:\>php -q c:\www\cacti\scripts\mysql_stats.php localhost [email protected] cactipw Connections
Error: MySQL connect failed. Check MySQL parameters (host/login/password)

I've tried several combos of the [email protected], my computer name, IP addy, etc. all which don't work.

I've granted cactiuser PROCESS rights via phpmyadmin

What am I missing?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 19, 2005 2:18 am 
Offline
Cacti User

Joined: Tue Apr 27, 2004 11:43 am
Posts: 51
Location: Duesseldorf, Germany
Hi,

try to use only "cactiuser" (not "[email protected]") as database user...
in any case there must be a problem with the mysql-rights.

otto


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 19, 2005 3:11 am 
Offline
Cacti Guru User
User avatar

Joined: Fri Sep 19, 2003 8:36 am
Posts: 2326
Location: Sophia-Antipolis, France
Hi

by default (at least on my Gentoo Linux installation) MySQL binds to localhost only ; I have this in /etc/mysql/my.cnf :
Code:
# keep secure by default!
bind-address    = 127.0.0.1

Have you tried to query your loopback IP address ?

_________________

HOWTOs :
Templates :


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 19, 2005 12:03 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12160
Location: USA
ottob wrote:
try to use only "cactiuser" (not "[email protected]") as database user... in any case there must be a problem with the mysql-rights.
otto

I've tried that too with the same result.

How else can I check the rights? Wouldn't Phpmyadmin work?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 19, 2005 12:26 pm 
Offline
Cacti User

Joined: Tue Apr 27, 2004 11:43 am
Posts: 51
Location: Duesseldorf, Germany
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...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 19, 2005 12:44 pm 
Offline
Cacti User

Joined: Fri Sep 05, 2003 9:20 am
Posts: 150
Location: London
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 [email protected]'localhost' and another one with [email protected]'127.0.0.1' for it to work... since it probably depends on the Host name you are monitoring.

-P

_________________
uname -a


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 19, 2005 5:16 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12160
Location: USA
Image

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:
mysql> GRANT PROCESS ON * TO [email protected]'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


What the heck is with the '> prompt where I can't seemingly do anything?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 20, 2005 2:33 am 
Offline
Cacti Guru User
User avatar

Joined: Fri Sep 19, 2003 8:36 am
Posts: 2326
Location: Sophia-Antipolis, France
Here are the installation instructions (http://www.cacti.net/downloads/docs/html/install_unix.html) :

Code:
shell> mysql --user=root mysql
mysql> GRANT ALL ON cacti.* TO [email protected] IDENTIFIED BY 'somepassword';
mysql> flush privileges;

Could you try to rerun these commands ?

_________________

HOWTOs :
Templates :


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 20, 2005 7:13 am 
Offline
Cacti User

Joined: Fri Sep 05, 2003 9:20 am
Posts: 150
Location: London
BSOD2600 wrote:

This is what I got when I tried the grant thing on my cacti/mysql machine:
Code:
mysql> GRANT PROCESS ON * TO [email protected]'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


What the heck is with the '> prompt where I can't seemingly do anything?


The problem was with yur sql. You have TO cactiuser' IDENTIFIED when you needed TO 'cactiuser' IDENTIFIED - i.e. missing a ' .

Try adding another user 'catiuser'@'127.0.0.1' with the same password as your otherone...

That worked for me.

-P

_________________
uname -a


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 20, 2005 10:39 am 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12160
Location: USA
Code:
mysql> GRANT ALL ON cacti.* TO '[email protected]' 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 '[email protected]' IDENTIFIED by 'cactipw';
ERROR 1045: Access denied for user: '@localhost' (Using password: NO)


Would someone please show me what their Cacti user looks like with PHPmyadmin? Obviously, there is something not right.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 20, 2005 11:01 am 
Offline
Cacti User

Joined: Tue Apr 27, 2004 11:43 am
Posts: 51
Location: Duesseldorf, Germany
looks like you dont have root access to mysql... is it your own machine?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 20, 2005 11:31 am 
Offline
Cacti User

Joined: Fri Sep 05, 2003 9:20 am
Posts: 150
Location: London
BSOD2600 wrote:
Code:
mysql> GRANT ALL ON cacti.* TO '[email protected]' 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 '[email protected]' IDENTIFIED by 'cactipw';
ERROR 1045: Access denied for user: '@localhost' (Using password: NO)


Would someone please show me what their Cacti user looks like with PHPmyadmin? Obviously, there is something not right.


How did you log into mysql?

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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 20, 2005 2:46 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 12160
Location: USA
Yes, I own this mysql machine

Code:
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 '[email protected]' IDENTIFIED by 'cactipw';
ERROR 1145: The host or user argument to GRANT is too long
mysql> GRANT PROCESS ON * TO '[email protected]' 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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 170 posts ]  Go to page 1, 2, 3, 4, 5 ... 12  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group