Cactiquery 0.8.6c (NEW PLEASE HELP TEST)

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

Post Reply
User avatar
pestilence
Cacti User
Posts: 207
Joined: Fri Jul 25, 2003 10:37 am
Location: Athens/Greece
Contact:

Cactiquery 0.8.6c (NEW PLEASE HELP TEST)

Post by pestilence »

Finally after a long wait (again sorry) i think i found the problem. It seems the problem was caused due to the updated version of rrd which required a small modification inside the query itself. This was impossible for me to see since i was not running the latest version of the rrdtool.
I don't know if this will work for the newer cacti version (0.8.6d) but i will try to check it as well.
Attachments
cactiquery-0.8.6c.zip
(43.78 KiB) Downloaded 408 times
/* * Oops. The kernel tried to access some bad page. We'll have to * terminate things with extreme prejudice. */ die_if_kernel("Oops", regs, error_code);
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi pestilence

nice to hear from you :D

I've modified the files to work with Cacti 0.8.6d, and so far it seems to be working (dumping to the browser and to the CSV file).

The only thing that I can't get to work is querying a graph wich values are taken from different RRD databases : I only get the first value displayed.

Thanks again for this add-on !
Attachments
cactiquery-0.8.6c_modified_for_cacti086d.tar.gz
(40.54 KiB) Downloaded 459 times
[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]
User avatar
pestilence
Cacti User
Posts: 207
Joined: Fri Jul 25, 2003 10:37 am
Location: Athens/Greece
Contact:

Post by pestilence »

fmangeant wrote:Hi pestilence

nice to hear from you :D

I've modified the files to work with Cacti 0.8.6d, and so far it seems to be working (dumping to the browser and to the CSV file).

The only thing that I can't get to work is querying a graph wich values are taken from different RRD databases : I only get the first value displayed.

Thanks again for this add-on !
Yap that is known issue (i haven't tryed to find a solution yet) so this is normal behaviour :)
Thanks for the changes :)
/* * Oops. The kernel tried to access some bad page. We'll have to * terminate things with extreme prejudice. */ die_if_kernel("Oops", regs, error_code);
sgraham
Posts: 4
Joined: Mon May 09, 2005 4:29 pm

Post by sgraham »

Would someone be kind enough to email this file to me? I can't seem to download it from the msg board.

cactiquery-0.8.6c_modified_for_cacti086d.tar.gz
sgraham
Posts: 4
Joined: Mon May 09, 2005 4:29 pm

Post by sgraham »

nevermind, I found that my browser is saving the d/l as a php file....I just had to rename it to the correct extension.
sgraham wrote:Would someone be kind enough to email this file to me? I can't seem to download it from the msg board.

cactiquery-0.8.6c_modified_for_cacti086d.tar.gz
aboyz

what does cacti query do?

Post by aboyz »

hi,

was wondering what does cacti query do??
User avatar
pestilence
Cacti User
Posts: 207
Joined: Fri Jul 25, 2003 10:37 am
Location: Athens/Greece
Contact:

Post by pestilence »

It allows you to query a specific graph and it returns you the raw values (something like the fetch command of the rrdtool).
It works the same way with the zoom tool.
/* * Oops. The kernel tried to access some bad page. We'll have to * terminate things with extreme prejudice. */ die_if_kernel("Oops", regs, error_code);
sgraham
Posts: 4
Joined: Mon May 09, 2005 4:29 pm

Post by sgraham »

Could anyone please give me a hand and recommend what to look for to troubleshoot this?

I have successfully installed on 0.8.6d - I have a host setup with some data showing in a interface usage graph, and I can see the data fine in the top level graphs, however if I click the arrow/query icon..I see no data. I *do* see the "dump to csv" link, and when I click on it I get the following errors displayed on the page:

Notice: Undefined variable: fp_index in C:\cacti\lib\rrd.php on line 880

Notice: Undefined variable: valine in C:\cacti\lib\rrd.php on line 880

Warning: fwrite(): supplied argument is not a valid stream resource in C:\cacti\lib\rrd.php on line 880

Notice: Undefined variable: fp_index in C:\cacti\lib\rrd.php on line 881

Warning: fclose(): supplied argument is not a valid stream resource in C:\cacti\lib\rrd.php on line 881

Viewing Query for 'testmachine.test.com - Traffic - 10.0.4.16 (3Com 3C90x Ethe)'

Writting to file: c:/cacti/csv/testmachine.test.com-InterfaceTrafficbitssecthPercentile.csv


There is no csv file generated at all. I have double checked file permissions, lowered browser security, and have defined the path for csv file dump in settings.
sgraham
Posts: 4
Joined: Mon May 09, 2005 4:29 pm

Post by sgraham »

A bit more helpful info, when I query a graph in cacti, IE displays an informational error icon with the following data (if I open it):

Line: 291
Char: 2
Error: Object required
Code: 0
URL: http://localhost/graph.php?action=query ... 1116479062



If I view source on this page and look at line 291 it reads:
gUrlObj = new urlObj(this.imgObject.src);


I don't know if this has anything to do with it but hopefully it helps.
RickL
Posts: 3
Joined: Tue Jun 07, 2005 11:16 am

Post by RickL »

sgraham wrote:Could anyone please give me a hand and recommend what to look for to troubleshoot this?

I have successfully installed on 0.8.6d - I have a host setup with some data showing in a interface usage graph, and I can see the data fine in the top level graphs, however if I click the arrow/query icon..I see no data. I *do* see the "dump to csv" link, and when I click on it I get the following errors displayed on the page:

Notice: Undefined variable: fp_index in C:\cacti\lib\rrd.php on line 880

Notice: Undefined variable: valine in C:\cacti\lib\rrd.php on line 880

Warning: fwrite(): supplied argument is not a valid stream resource in C:\cacti\lib\rrd.php on line 880

Notice: Undefined variable: fp_index in C:\cacti\lib\rrd.php on line 881

Warning: fclose(): supplied argument is not a valid stream resource in C:\cacti\lib\rrd.php on line 881

Viewing Query for 'testmachine.test.com - Traffic - 10.0.4.16 (3Com 3C90x Ethe)'

Writting to file: c:/cacti/csv/testmachine.test.com-InterfaceTrafficbitssecthPercentile.csv


There is no csv file generated at all. I have double checked file permissions, lowered browser security, and have defined the path for csv file dump in settings.
I get this exact same error, no matter what version of the patch I apply.

This is Cacti 0.8.6D on Debian Sarge, installed manually (not via apt-get).

I've tried turning on the global variables in php.ini with no change, so I am back to the normal config on that.

Any ideas?
RickL
Posts: 3
Joined: Tue Jun 07, 2005 11:16 am

Post by RickL »

As I mentioned on this post: http://forums.cacti.net/viewtopic.php?p=34349#34349 it now works inside the browser (Firefox) but the dump to csv option still gives me the same errors.

Ideas?

Rick
hank42
Posts: 8
Joined: Sun Apr 03, 2005 9:45 pm

Fix for "invalid Object error"

Post by hank42 »

in zoom.js:

change:

gUrlObj = new urlObj(this.imgObject.src);

to:

if(this.imgObject) {
gUrlObj = new urlObj(this.imgObject.src);
} else { return;}



and: near line 570:

change:


graphStart = parseInt(gUrlObj.getUrlParameterValue("graph_start"));
graphEnd = parseInt(gUrlObj.getUrlParameterValue("graph_end"));



to:


if(gUrlObj){
graphStart = parseInt(gUrlObj.getUrlParameterValue("graph_start"));
graphEnd = parseInt(gUrlObj.getUrlParameterValue("graph_end"));
} else { return;}







Works, without harm to anything. It's just an extra error check.
hank42
Posts: 8
Joined: Sun Apr 03, 2005 9:45 pm

Even better fix....

Post by hank42 »

Forget about editing zoom.js...


just edit graph.php - at the end of the "case query" secion, there is an
"include zoom.js" funciton. remove that and it won't load the javascript for that is causing the errors. Same geos for the case 'dump' seciont.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests