|
|
| Author |
Message |
MaffooClock
Joined: 12 Jul 2006 Posts: 17
|
Posted: Tue Mar 13, 2007 10:49 pm Post subject: |
|
|
I hope I didn't miss a post on this same issue...
I've found that it takes well over 10 minutes to import the cacti_host_template_temysql_host-step300-heartbeat600.xml file (I had to temporarily increase the max_execution_time to more than 600 seconds). Is this normal?
|
|
| Back to top |
|
 |
MaffooClock
Joined: 12 Jul 2006 Posts: 17
|
Posted: Thu Mar 15, 2007 9:17 am Post subject: |
|
|
Just an observation:
I was having blank graphs, and I couldn't figure out why. I got sidetracked when I found other issues with Cacti (even found a bug!), and now I finally got back to this.
I was getting the following error:
| Code: |
03/15/2007 08:41:33 AM - CMDPHP: Poller[0] Host[19] DS[367] WARNING: Result from CMD not valid. Partial Result: Error: MySQL connect
|
Long story short: the account that was configured for SUPER and PROCESS permissions had a password with special characters (I always use bad-ass passwords), and evedently the PHP process was mis-interpreting the double-dollar signs inside the password, causing the mysql_stats.php script to fail. When I changed the password of the account to one much simpler, the script works fine.
My point: complex passwords may cause the script to fail. You may be able to surround the <password> with single quotes in the Input String of the Input Method, but I did not try that.
|
|
| Back to top |
|
 |
sscott
Joined: 03 Jul 2007 Posts: 3
|
Posted: Tue Jul 03, 2007 11:48 am Post subject: Re: Username/Password Woes |
|
|
The easiest way is only set the variable to the default if no argument was passed. That way you can have a global default but still be able to overide individual graphs if need be....
| Code: |
if ($_SERVER["argc"] == 5 || ($_SERVER["argv"][1] == "status" && $_SERVER["argc"] == 6)) {
$host = isset($_SERVER["argv"][2]) ? $_SERVER["argv"][2] : 'localhost';
$username = isset($_SERVER["argv"][3]) ? $_SERVER["argv"][3] : 'cactiuser';
$password = isset($_SERVER["argv"][4]) ? $_SERVER["argv"][4] : 'cactipassword';
|
| philovivero wrote: | It seems the username/password support in Cacti is causing others woes. Believe me, it caused me woes, too.
Another work-around is to not enter any username/password at all, make no changes to the XML files (as Gleam suggests), but instead to modify the PHP stats gathering script like this:
| Code: |
if ($_SERVER["argc"] == 3 || $_SERVER["argc"] == 5 || ($_SERVER["argv"][1] == "status" && $_SERVER["argc"] == 6)) {
$host = $_SERVER["argv"][2];
$username = $_SERVER["argv"][3];
$password = $_SERVER["argv"][4];
$username = "cacti";
$password = "yourcactipassword";
|
What this'll do is let a 3-argument call succeed, then it'll just hardcode username/password to be cacti/yourcactipassword. This is actually what I'm doing at Digg now because I started using a browser !Firefox, and it wouldn't let me enter the username/password so easily anymore.
It'd be super-cool if some PHP guru could suggest how to elegently make the script take "--username=XXX --password=XXX --host=XXX" sort of calling convention. If I ever have to digg into this too much, I'll just rewrite it in Perl. :)
Hmm. The more I ponder this, the more I think I should just make this the default script behaviour. Anyone have opinions on this matter? |
|
|
| Back to top |
|
 |
windowsrefund
Joined: 05 Jul 2007 Posts: 11
|
Posted: Fri Jul 13, 2007 3:54 pm Post subject: Everything works except graphs show no data |
|
|
Everything installed as per the docs. Database permissions are fine and I've verified using mysql_stats.php from a shell.
Everything is good with the exception of the graphs not showing any data. Any ideas? Perhaps I'm just not waiting long enough? It's been about 20 minutes already.
Thanks
|
|
| Back to top |
|
 |
lucky Cacti User
Joined: 30 Sep 2002 Posts: 62 Location: Germany
|
Posted: Tue Jul 17, 2007 10:57 am Post subject: |
|
|
great work.
it works!
i would like to monitor the response time (for INSERT, SELECT, DELETE and UPDATE) of a database at my provider. i've there only one database and have no supersuser privileges on the database server.
is ist possible with some modification on this script?
THX
|
|
| Back to top |
|
 |
sumsum Cacti User
Joined: 26 Apr 2004 Posts: 60 Location: Switzerland
|
Posted: Sun Jul 29, 2007 4:46 pm Post subject: |
|
|
the template is amazing. thank you. works fine here.
the only thing which is missing (maybe as a enhancement request)
- vertical legend of the units is missing sometimes
- general legend on the bottom of each graph would be helpfull.
|
|
| Back to top |
|
 |
khoch3
Joined: 07 Aug 2007 Posts: 10
|
Posted: Fri Aug 10, 2007 9:27 am Post subject: |
|
|
| I am seeing the same problem, did you ever fix this? Thanks!
|
|
| Back to top |
|
 |
FoggeR
Joined: 11 Aug 2007 Posts: 1 Location: Finland
|
Posted: Sat Aug 11, 2007 1:08 pm Post subject: Re: Everything works except graphs show no data |
|
|
| windowsrefund wrote: | Everything installed as per the docs. Database permissions are fine and I've verified using mysql_stats.php from a shell.
Everything is good with the exception of the graphs not showing any data. Any ideas? Perhaps I'm just not waiting long enough? It's been about 20 minutes already.
Thanks |
Same problem here. Everything looking good at logs and i can get data manually by running mysql_stats.php.
Some version info below.
Cacti: 0.8.6j
PHP: 5.2.3-1+b1 + eAccelerator
MySQL: 5.0.45-Debian_1
|
|
| Back to top |
|
 |
knebb Cacti User
Joined: 19 Sep 2006 Posts: 82
|
Posted: Mon Sep 10, 2007 12:43 pm Post subject: Re: Username/Password Woes |
|
|
Yohoo!
On my site it's working really fine. Except one think I realized today:
Since I'm logging my MySQL database, my server is swapping a lot. Lets have a look at this graph. The first is the swap usage the second is the swap activity of this server. You can see a hughe raising between week 30 and 31. If you like I can post an image of the MySQL stuff as well, but you will see it starts at the same day when the swapping occurs.
The only think I can explain would be the fact that this is a lightly used server. So perhaps the MySQL has been in swap and never used. Now the only usage is from the script and this causes the MySQL part being swapped out and in....
Are theses statistic scripts are being suspect to this behavior? What else could it be?
| Description: |
|
| Filesize: |
24.47 KB |
| Viewed: |
7429 Time(s) |

|
| Description: |
|
| Filesize: |
31.58 KB |
| Viewed: |
7429 Time(s) |

|
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 15639 Location: Muenster, Germany
|
Posted: Mon Sep 10, 2007 1:53 pm Post subject: |
|
|
I suppose that you memory settings for mysql are to huge for the physical memory ogf your server. You may have to tune them to avoid swapping
Reinhard
|
|
| Back to top |
|
 |
knebb Cacti User
Joined: 19 Sep 2006 Posts: 82
|
Posted: Mon Sep 10, 2007 2:01 pm Post subject: |
|
|
| gandalf wrote: | I suppose that you memory settings for mysql are to huge for the physical memory ogf your server. You may have to tune them to avoid swapping
|
Obviously, you can be right. But this means that the cacti stuff itself causes a higher load on the MySQL server- I expected the scripts only collect some statistics, but not to do some deep digging into the databases itself. On this lightly used server it isn't really an issue. But what would happen to a MySQL server with a high load?
The other point of view about your posting could mean: There is enough memory available to this server (because it's not swapping at all before I implemented the scripts).
So how is this cacti stuff realized to cause such a change in behavior?
Greets from Canada
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 15639 Location: Muenster, Germany
|
Posted: Tue Sep 11, 2007 12:03 pm Post subject: |
|
|
Please clarify, what applications are running on that server. Is cacti itself running there? The MySQL stats use MySQL variables only. Fetching them should be very fast.
But if the memory settings for mysql exceed the physical size to the system, mysql will perhaps try to get that amount of memory even if it is not physicaly backed and thus creating swap activity.
You may want to use mysql-admin or phpmyadmin to find hints related to performnace
Reinhard
|
|
| Back to top |
|
 |
knebb Cacti User
Joined: 19 Sep 2006 Posts: 82
|
Posted: Wed Sep 12, 2007 7:57 am Post subject: |
|
|
| gandalf wrote: | | Please clarify, what applications are running on that server. Is cacti itself running there? The MySQL stats use MySQL variables only. Fetching them should be very fast. |
I expected this, too. But in this case it looks like the mysql daemon is normaly sleeping. So fetching the variables wakes him up and pushes him back to memory....I dunno.
There ist running a postfix (with approx 100 mails/ day), an apache2 (with approx 20 visitors/day) and the mysql itself. So really light use. 1.5GB memory should be enough. And has been all the time before.
As a workaround I set the vm.swappiness in /etc/sysctl to 30 instead of 60. This helped out. Now the system is back to usual business
|
|
| Back to top |
|
 |
Primüs
Joined: 10 Oct 2007 Posts: 10
|
Posted: Thu Oct 11, 2007 8:21 pm Post subject: |
|
|
HELP!
I have installed this script on one machine at home, using the poller.php interval every 5 minutes, ran the script used the .xml files with the changes in the filename, and thats graphing fine, but our production cacti here at work when i install it the exact same way, i get the graphs, devices list show it as up, i cant get any data INTO the graphs. This sounded like to me that im not using the special .xml templates for 5 min intervals but i definately am!
Any help appreciated!
|
|
| Back to top |
|
 |
khufure Cacti User
Joined: 24 Oct 2007 Posts: 203 Location: San Francisco, CA
|
Posted: Thu Oct 25, 2007 12:31 pm Post subject: |
|
|
| philovivero wrote: | | adrianmarsh wrote: | Ok, so I've got these running, but a few no-shows: InnoDB BufPgMem, I/O, InsBuffer and "No data found" in Query Cache and Replication.
I guess that my main problem is that I'm a MySql novice, so I don't really know what the stats are showing me. Anyone have a cheat-sheet/guide ? |
Did you do the GRANTs from the README? As for the no data found, are you using the Query Cache and is the machine you're pointing to a replication slave? |
Not very familiar with MySQL. I probably know just enough to get dangerous. I think I just missed something obvious. Can someone help?
I am running into the same INNODB problem. Here is the grants I used:
GRANT PROCESS ON *.* TO cacti@'%' IDENTIFIED by 'cactipasswd';
GRANT SUPER ON *.* TO cacti@'%' IDENTIFIED BY 'cactipasswd';
I then did a flush privileges;
# mysql -h 10.200.0.5 -u cacti -pcactipasswd
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5908 to server version: 5.0.45-community-log
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| test |
+--------------------+
2 rows in set (0.00 sec)
It seems cacti doesn't have access to mysql database. Should it?
|
|
| Back to top |
|
 |
|