Dataquery (ex cactiquery) 1.0a released
Moderators: Developers, Moderators
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.
- pestilence
- Cacti User
- Posts: 207
- Joined: Fri Jul 25, 2003 10:37 am
- Location: Athens/Greece
- Contact:
- pestilence
- Cacti User
- Posts: 207
- Joined: Fri Jul 25, 2003 10:37 am
- Location: Athens/Greece
- Contact:
- pestilence
- Cacti User
- Posts: 207
- Joined: Fri Jul 25, 2003 10:37 am
- Location: Athens/Greece
- Contact:
- pestilence
- Cacti User
- Posts: 207
- Joined: Fri Jul 25, 2003 10:37 am
- Location: Athens/Greece
- Contact:
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
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
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
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..
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
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
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
[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]
[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]
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!
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>';
-
- Posts: 11
- Joined: Mon Feb 13, 2006 7:51 am
-
- Cacti User
- Posts: 367
- Joined: Tue Apr 05, 2005 9:52 am
- Location: Munich, Germany
-
- Posts: 11
- Joined: Mon Feb 13, 2006 7:51 am
-
- Cacti User
- Posts: 367
- Joined: Tue Apr 05, 2005 9:52 am
- Location: Munich, Germany
-
- Posts: 11
- Joined: Mon Feb 13, 2006 7:51 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..
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]
Code: Select all
Who is online
Users browsing this forum: No registered users and 0 guests