Dataquery (ex cactiquery) 1.0a released

Announcements concerning Plugins for Cacti

Moderators: Moderators, Developers

Author
Message
shakey_1
Posts: 42
Joined: Thu Feb 16, 2006 12:49 pm

#16 Post by shakey_1 » Thu Nov 02, 2006 11:08 am

I am also seeing the "Notice: Undefined index: dataquery.php:query in /var/www/html/lib/functions.php on line 1420" message after installing dataquery. This is running on CactiEZ CD v0.2 Beta with version 1.0 of the plugin architecture. Beyond that, when I perform a data query, the output seems offset as shown in the image below.

Image

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

#17 Post by pestilence » Thu Nov 02, 2006 2:50 pm

Thanks for the feedback everyone, i will be checking the problems tomorrow.
/* * 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
pestilence
Cacti User
Posts: 207
Joined: Fri Jul 25, 2003 10:37 am
Location: Athens/Greece
Contact:

#18 Post by pestilence » Fri Nov 03, 2006 8:07 am

New updated release posted today (0.1.3a):

http://cactiusers.org/forums/viewtopic.php?p=2215#2215
/* * 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);

shakey_1
Posts: 42
Joined: Thu Feb 16, 2006 12:49 pm

#19 Post by shakey_1 » Fri Nov 03, 2006 8:54 am

Thanks for such a quick fix pestilence. Just put the new version in place and everything is working perfectly.

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

#20 Post by pestilence » Fri Nov 03, 2006 9:02 am

There is going to be a new version as well just got a report for a small minor bugs again. :(
/* * 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
pestilence
Cacti User
Posts: 207
Joined: Fri Jul 25, 2003 10:37 am
Location: Athens/Greece
Contact:

#21 Post by pestilence » Fri Nov 03, 2006 10:04 am

New version (0.1.4a) uploaded.
/* * 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
egarnel
Cacti Pro User
Posts: 703
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

#22 Post by egarnel » Fri Nov 03, 2006 10:06 am

Quick question..

Should the dataquery follow the Associated RRAs (daily, weekly, etc) as the graphs do?

It shows the timestamp when the rrd file was created and times from 8:05 am to 9:05am regardless of which graph I click on
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey

User avatar
egarnel
Cacti Pro User
Posts: 703
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

#23 Post by egarnel » Fri Nov 03, 2006 10:07 am

egarnel wrote:Quick question..

Should the dataquery follow the Associated RRAs (daily, weekly, etc) as the graphs do?

It shows the timestamp when the rrd file was created and times from 8:05 am to 9:05am regardless of which graph I click on

Damn, you are a faster typer than I am... I just read your latest post right after I submitted mine.. :lol:
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey

User avatar
fmangeant
Cacti Guru User
Posts: 2326
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

#24 Post by fmangeant » Fri Nov 03, 2006 10:58 am

Hi

I had the same error... See this thread : http://cactiusers.org/forums/viewtopic.php?p=2258#2258
[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]

wriley
Posts: 16
Joined: Fri May 19, 2006 1:17 pm
Location: Lake St Louis, MO USA
Contact:

#25 Post by wriley » Mon Nov 13, 2006 12:32 pm

In the pre-plugin version the CSV download link would work even if your cacti directory was not under DocumentRoot.

For example, I have cacti installed in /opt/cacti and my DocumentRoot is /var/www/html. The download link links to the full filesystem path of /opt/cacti/plugins/dataquery/csv/filename.csv rather than /cacti/plugins/dataquery/csv/filename.csv

Here is a patch against 0.1.4a to restore that feature. Great plugin!

Code: Select all

--- view/queryview.php  2006-11-13 12:14:45.000000000 -0500
+++ view/queryview.php.wlr      2006-11-13 12:27:48.000000000 -0500
@@ -166,10 +166,11 @@ class QueryView
        {
                global $config;
                $filename = basename($this->queryObj->filename);
-               $csv_path = read_config_option('path_csv_export');
-               $root_dir = $_SERVER{'DOCUMENT_ROOT'};
-               $dir = str_replace($root_dir, "", $csv_path);
-               $filename = $dir . $filename;
+               $dw_path = read_config_option("path_csv_export");
+               preg_match("/(.+)\/(.+)$/",$dw_path,$matches);
+               $dw_path = $matches[2];
+               $file_dw = basename($filename);
+               $filename = $dw_path."/".$file_dw;
                print '<table class="dump_link" align="center">';
                print '<tr class="download_link_tr">';
                print '<td class="download_link_header" align="center">File download link:</td>';

blackakashi
Posts: 11
Joined: Mon Feb 13, 2006 7:51 am

#26 Post by blackakashi » Wed Nov 15, 2006 5:04 am

Hi !

I have a small problem on the plugin :
I found this error message when i try to make a query :

Notice: Undefined index: data in E:\wwwroot\cacti\plugins\dataquery\view\queryview.php on line 61

The debug mode is activated but i don't know where to find the result :(

Greetings.
Boris

torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

#27 Post by torstentfk » Wed Nov 15, 2006 5:19 am


blackakashi
Posts: 11
Joined: Mon Feb 13, 2006 7:51 am

#28 Post by blackakashi » Wed Nov 15, 2006 5:41 am

Thans for the speed answer but i don't get it !
Need i to modify the setup.php ?

Greetings
Boris

torstentfk
Cacti User
Posts: 367
Joined: Tue Apr 05, 2005 9:52 am
Location: Munich, Germany

#29 Post by torstentfk » Wed Nov 15, 2006 6:02 am

blackakashi wrote:Thans for the speed answer but i don't get it !
Need i to modify the setup.php ?

Greetings
Boris
yes - you need to add the return-statement into the mentioned function.

blackakashi
Posts: 11
Joined: Mon Feb 13, 2006 7:51 am

#30 Post by blackakashi » Wed Nov 15, 2006 8:27 am

I've found 'nav' but there is already a returng function :
Need i to add an another one?
Can you explain a litte bit, i don't really get it ?
Sorry..

Code: Select all

"}

function dataquery_draw_navigation_text ($nav) {
	$nav["dataquery.php"] = array("title" => "Dataquery |current_graph_title|", "mapping" => "index.php:", "url" => "dataquery.php", "level" => "1");
	$nav["dataquery.php:query"] = array("title" => "Dataquery |current_graph_title|", "mapping" => "index.php:", "url" => "dataquery.php", "level" => "1");
	$nav["dataquery.php:dump"] = array("title" => "Dataquery dumping |current_graph_title|", "mapping" => "index.php:", "url" => "dataquery.php", "level" => "1");
	$nav["dataquery.php:clean"] = array("title" => "Dataquery Clean", "mapping" => "index.php:", "url" => "dataquery.php", "level" => "1");
	return $nav
}
[code]

Post Reply