Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


The MySQL Graph Collection - Version 2.0!
Goto page Previous  1, 2, 3 ... 9, 10, 11
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
alinux
Cacti User


Joined: 16 Jul 2007
Posts: 53

PostPosted: Wed Feb 04, 2009 7:22 am    Post subject: Reply with quote

Well same here I did apply it and I tested the mysql connection from the cacti host to the remote host all is fine..however the graphs dont show any data...only 0

any help please ?

Thanks
Back to top
alinux
Cacti User


Joined: 16 Jul 2007
Posts: 53

PostPosted: Wed Feb 04, 2009 7:27 am    Post subject: Reply with quote

Adding to the above I tried

php -q mysqli_stats.php cache xxxxxxxx user sdfsdaf

I did not get any reply
Back to top
xero



Joined: 11 Jun 2009
Posts: 3

PostPosted: Thu Jun 11, 2009 4:35 am    Post subject: Re: MYSQL MULTI running more than 1 mysql on same ip Reply with quote

jbreault wrote:
Is there somebody that can add to the script mysql port support ? we have about 16 mysql db running on different port and since cacti add by ping if host is alive before to try to graph, we cant use anymore HOST:PORT as host...


I was thinking about this too. As I don't have time to add the port support in the templates (which should be done pretty quick with some knownledge of cacti), I implemented a hotfix.

This is only working, if your hostnames are different (i.e. not 127.0.0.1 for a stunnel connection on different ports).

Open the mysql(i)_stats.php and search for the following line:
$password = $_SERVER["argv"][4];

After that line, add the following line for every host which is using a different port (replace "mysqlhostname.com" with the hostname or IP address you are using in cacti):
Code:

if($host == "mysqlhostname.com") {
     $host .= ":3307";
}


This way you can setup a different port for every unique hostname you are using.

This is only a hotfix, if you don't have time to implement directly in cacti. Be sure to keep a note in the notes field of your host, so you don't run in to problems, when the port is changing back to 3306.

If you have the knowledge of implementing it in cacti, do it there and repost the file. That would be great.

OttoB: Wouldn't it be good to release the zip files on a seperate web page with a link to this thread? This way users don't have to go through the whole thread to find the latest version. Also the latest fixes could be on a single page.
Back to top
xero



Joined: 11 Jun 2009
Posts: 3

PostPosted: Thu Jun 11, 2009 4:49 am    Post subject: Question about graph units Reply with quote

As I don't wanted to mix up this question with my last post, I'm going to ask it seperately.

I'm not sure about the unit "m" in the graph. This is probably a thing about rrdtool but in the end I'm not sure how to interpret the mysql_stats values.

What exactly means "m" (i.e. "30.00 m" in the attached image)? Is that milli and how is this calculated? Is this the average per minute, so if I there's only one action within 3 minutes for example?



mysql-handler.png
 Description:
MySQL Handler Statistics
 Filesize:  54.6 KB
 Viewed:  2326 Time(s)

mysql-handler.png


Back to top
mintoy



Joined: 07 Apr 2009
Posts: 7
Location: India

PostPosted: Tue Jun 30, 2009 5:10 am    Post subject: Acess denied in Mysql Reply with quote

when i execute this command C:\mysql\bin>php -q c:\auntie\cacti\scripts\mysql_stats.php command localhost cactiuser cactipw

i get the message access is denied. pls help me to solve the issue.
Back to top
xero



Joined: 11 Jun 2009
Posts: 3

PostPosted: Tue Jun 30, 2009 5:20 am    Post subject: Re: Acess denied in Mysql Reply with quote

mintoy wrote:
when i execute this command C:\mysql\bin>php -q c:\auntie\cacti\scripts\mysql_stats.php command localhost cactiuser cactipw

i get the message access is denied. pls help me to solve the issue.


Did you use the "GRANT PROCESS..." command to add cactiuser to your database?

Check the first pages of this thread or the README included in the package to see how a user is added.
Back to top
mintoy



Joined: 07 Apr 2009
Posts: 7
Location: India

PostPosted: Tue Jun 30, 2009 6:19 am    Post subject: Reply with quote

yes I have done that grant process to the database.
Back to top
mintoy



Joined: 07 Apr 2009
Posts: 7
Location: India

PostPosted: Tue Jun 30, 2009 6:35 am    Post subject: Reply with quote

I have done the grant process to particular user and still I get the message Acess denied. Pls help me to solve the issue.
Back to top
hahnn



Joined: 03 Feb 2009
Posts: 25

PostPosted: Thu Nov 12, 2009 11:02 am    Post subject: Thread and Handler graphs have NaN values only Reply with quote

Hi,

OS: RHEL 5
kernel: 2.6.18-128
RAM: 32 Gb
Processors: 8 cores
Database: MySQL cluster 7.0.6 on 2 nodes
PHP: 5.2.1
Cacti: 0.8.7e
PA: 2.4
plugins: a lot of cacti plugins installed
Spine: 0.8.7e
apache: 2.2.3-22

My Problem:

I've installed mysqli_stats to be able to graph usefull data from my MySQL cluster nodes.

All graphs are working fine except the Threads one, and the Handler one.

Enabling debuging, RRDTool status is OK everywhere.

Testing mysqli_stats.php under shell to have handler and threads data give correct results. See here below for mysqli_stats.php handler localhost XXXXX XXXXX:
delete:141103091 read_first:7893 read_key:422346295 read_next:265394247 read_prev:0 read_rnd:92875384 read_rnd_next:110791284115 update:471787032 write:652298529

THe problem is that RRDtool files for those two graphs (handler and threads) contains only NaN values.

I don't know why.

Please note that the maximum value for each data of the handler template is set to 1000000000000.

Any help would be greatly appreciated.

best regards
Nicolas
Back to top
stevewalsh



Joined: 15 Apr 2007
Posts: 2

PostPosted: Fri Jan 08, 2010 2:58 am    Post subject: fix for blank graphs Reply with quote

Hahnn

I had the same problem and used the results from razzle dazzle earlier in this thread, take a look at http://forums.cacti.net/post-96562.html&highlight=#96562, you'll need to edit the mysql_stats.php file

Thanks!
Back to top
sergefonville



Joined: 18 Jan 2010
Posts: 1

PostPosted: Mon Jan 18, 2010 10:58 am    Post subject: Reply with quote

I just installed mysql_stats.
I like it a lot, especially I can read any value with it.

I created a graph that shows 'Key_read_requests'
I created it as a COUNTER (which made the most sense to me)
The weird thing is, it shows:
min: 70.67 max: 393.39 current: 119.84

How does it come to these values?
Are they divided or something?
I checked for myself and this value changes by about 8000 per 5 minutes.

Thanks a lot
Back to top
rixxie



Joined: 08 Feb 2010
Posts: 1

PostPosted: Mon Feb 08, 2010 6:40 am    Post subject: Reply with quote

If you're using MySQL5, edit mysql_stats.php and replace the following lines

Code:
$result_stat = @mysql_query("SHOW STATUS");

to
Code:
$result_stat = @mysql_query("SHOW GLOBAL STATUS");


and

Code:
$result_var = @mysql_query("SHOW VARIABLES");

to
Code:
$result_var = @mysql_query("SHOW GLOBAL VARIABLES");


This would give your graph a system wide statistics.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page Previous  1, 2, 3 ... 9, 10, 11
Page 11 of 11

 



Powered by phpBB © 2001, 2005 phpBB Group