google-code-export / mysql-cacti-templates

Automatically exported from code.google.com/p/mysql-cacti-templates
GNU General Public License v2.0
1 stars 0 forks source link

No data in graphs - [ PHP Notice: Undefined offset ] #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I did a installation of mysql graphs of xaprb, following notes step by
step. Import XML ok, etc.
2. I can connect from bash command line of cacti server to mysql server
(that i wish to monitorize). I created the graphs without problem
3. No data is showed in graphs (INNOBD graphs) and cactierror.log show
errors like :
PHP Notice:  Undefined offset:  0 in
/path/to/cacti/scripts/ss_get_mysql_stats.php on line 130

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Version 0.8.7b. Linux Centos 5.

Please provide any additional information below.

Original issue reported on code.google.com by ROrtiz.B...@gmail.com on 14 May 2008 at 8:37

GoogleCodeExporter commented 9 years ago
OK, that code is:

            # The file is fresh enough to use.
            $arr = file($cache_file);
            run_query("SELECT RELEASE_LOCK('cacti_monitoring')", $conn);
            return $arr[0];

So for some reason the file caching isn't working right.  You may need to put 
some
debugging code around this or something so I can see why.  Is the file (by 
default
it's in /tmp/ and named something obvious) there, with readable privileges, and 
does
it have something in it?

Original comment by baron.schwartz on 22 May 2008 at 2:24

GoogleCodeExporter commented 9 years ago
If you can't figure out what is happening, don't sweat it -- just grab the 
latest
code and see if it works better for you.

Original comment by baron.schwartz on 22 May 2008 at 2:35

GoogleCodeExporter commented 9 years ago
Thanks to reply. I noticed that the txt file in /tmp had rw-r--r--, 644. I 
changed to
777. If is a permisssions case. But I don't understand your latest reply:

"If you can't figure out what is happening, don't sweat it -- just grab the 
latest
code and see if it works better for you."

Grab the code? So need I to change any piece of your code? I wait to see if the
change of permissions do something.

Greetings!

Original comment by ROrtiz.B...@gmail.com on 22 May 2008 at 7:48

GoogleCodeExporter commented 9 years ago
Dammit, i get the same error:

PHP Notice:  Undefined offset:  0 in 
/var/www/cacti/scripts/ss_get_mysql_stats.php on
line 130
PHP Notice:  Undefined offset:  0 in 
/var/www/cacti/scripts/ss_get_mysql_stats.php on
line 130

Ill try to debug the code to find what is happen. Do you have any additional 
solution?

Thanks

Original comment by ROrtiz.B...@gmail.com on 22 May 2008 at 8:03

GoogleCodeExporter commented 9 years ago
Permissions 644 should have been plenty.  It looks to me like the cache file is
getting created, but nothing is going into it for some reason.  Check the 
timestamp
-- is it updated recently?  Check the size -- is it zero size?  What is in the 
file?
 If it's empty, check the code where it's trying to write to the file -- does
anything look suspicious there?

I updated the code in r40 so at least you'll get some data, even if the caching
doesn't work right, but it would be good if you can figure out what's going 
wrong here.

Original comment by baron.schwartz on 22 May 2008 at 11:33

GoogleCodeExporter commented 9 years ago
php ./ss_get_mysql_stats.php host user pass
Error executing 'SHOW MASTER LOGS': You are not using binary logging

Is this expected behaviour if we haven't enabled log-bin ?

Original comment by bradstaone@gmail.com on 28 May 2008 at 12:30

GoogleCodeExporter commented 9 years ago
Ignore me, Issue 8 has the answer. Perhaps an update to the change log ?

Great program though, loved teMySQL.

Thanks and sorry for the spam.

Original comment by bradstaone@gmail.com on 28 May 2008 at 12:32

GoogleCodeExporter commented 9 years ago
"I updated the code in r40 so at least you'll get some data, even if the caching
doesn't work right, but it would be good if you can figure out what's going 
wrong here."

I don't understand. I get r40 version (i think) and I didn't get any data. the 
graphs
are always empty. 

Original comment by ROrtiz.B...@gmail.com on 29 May 2008 at 3:10

GoogleCodeExporter commented 9 years ago
"no data in graphs" is almost guaranteed not to be an issue with the templates, 
IMO.
 There are so many ways this can happen in Cacti that have nothing to do with the
templates or scripts :-)  That's why I tell people to look on the Cacti forums 
for
clues there.

If you execute the php script from the command line and don't see output, 
that's a
different matter.

Original comment by baron.schwartz on 1 Jun 2008 at 2:36

GoogleCodeExporter commented 9 years ago
No feedback on this issue for a long time, closing.

Original comment by baron.schwartz on 2 Nov 2008 at 10:23