Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon May 22, 2017 11:54 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 72 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: Dataquery (ex cactiquery) 1.0a released
PostPosted: Tue Oct 31, 2006 7:15 pm 
Offline
Cacti User
User avatar

Joined: Fri Jul 25, 2003 10:37 am
Posts: 207
Location: Athens/Greece
Its my joy to announce you the initial release of the dataquery plugin.
Dataquery is the predecesor of the old cactiquery addon, it has been ported to the plugin architecture for easy installation and troubleshooting.

_________________
/* * 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);


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 31, 2006 7:16 pm 
Offline
Cacti User
User avatar

Joined: Fri Jul 25, 2003 10:37 am
Posts: 207
Location: Athens/Greece
Forgot to include the link:
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);


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 01, 2006 12:27 pm 
Offline
Cacti Pro User
User avatar

Joined: Thu Nov 21, 2002 8:55 am
Posts: 703
Location: Austin, TX
Cool, thanks for bringing this back. It is an awesome util

One quick fix, however:

In the file queryview.php under <cacti dir>/plugins/dataquery/view

Line 169 needs a trailing slash after csv

before:
Code:
$filename = $config['url_path'] . 'plugins/dataquery/csv


after:
Code:
$filename = $config['url_path'] . 'plugins/dataquery/csv[b]/[/b]


Took me a little bit to figure out how to use the plugin until I realized that there was a new icon next to the graphs

_________________
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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 01, 2006 4:47 pm 
Offline
Cacti User
User avatar

Joined: Fri Jul 25, 2003 10:37 am
Posts: 207
Location: Athens/Greece
Thanks for mentioning, i have uploaded an updated version.

_________________
/* * 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);


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 01, 2006 6:37 pm 
Offline
Cacti User
User avatar

Joined: Fri Jul 25, 2003 10:37 am
Posts: 207
Location: Athens/Greece
Site for cactiquery:

http://pestilence.insert.gr

The webdev.insert.gr is not yet online.

_________________
/* * 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);


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 01, 2006 6:38 pm 
Offline
Cacti User

Joined: Wed Jul 13, 2005 4:50 pm
Posts: 135
Hi Pestilence. Thanks for your work on pluginizing cactiquery!

I have found it actually requires plugin architecture 1.0 : I had Plugin Architecture 0.9, and as soon as I enable dataquery in config.php, I have this little error showing up in each page of cacti :
Code:
Notice: Undefined index: graph.php:zoom in /usr/share/cacti/site/lib/functions.php on line 1357

which is
Code:
/* find the current page in the big array */
        $current_array = $nav{$current_page . ":" . $current_action};


the part "graph.php:zoom" of the error change depending on the page I am browsing in Cacti, but the error is always located in this line 1357 of function.php. The tab "dataquery" next to the "misc" tab in the settings page was ok.

When upgraded to plugin arch 1.0, the error vanish and the little icon for querying graph appear :) I think you use one of the few hooks added between 0.9 and 1.0.
Well, it was time for to upgrade to 1.0 anyway ;)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 02, 2006 3:12 am 
Offline
Cacti User
User avatar

Joined: Fri Jul 25, 2003 10:37 am
Posts: 207
Location: Athens/Greece
Gonna check your reportings.
Thanks for the feedback.

_________________
/* * 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);


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 02, 2006 3:59 am 
Offline
Cacti User
User avatar

Joined: Fri Jul 25, 2003 10:37 am
Posts: 207
Location: Athens/Greece
New version has been uploaded (0.1.2a)

_________________
/* * 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);


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 02, 2006 4:05 am 
Offline
Cacti User
User avatar

Joined: Fri Jul 25, 2003 10:37 am
Posts: 207
Location: Athens/Greece
Exo7 wrote:
Hi Pestilence. Thanks for your work on pluginizing cactiquery!

I have found it actually requires plugin architecture 1.0 : I had Plugin Architecture 0.9, and as soon as I enable dataquery in config.php, I have this little error showing up in each page of cacti :
Code:
Notice: Undefined index: graph.php:zoom in /usr/share/cacti/site/lib/functions.php on line 1357

which is
Code:
/* find the current page in the big array */
        $current_array = $nav{$current_page . ":" . $current_action};


the part "graph.php:zoom" of the error change depending on the page I am browsing in Cacti, but the error is always located in this line 1357 of function.php. The tab "dataquery" next to the "misc" tab in the settings page was ok.

When upgraded to plugin arch 1.0, the error vanish and the little icon for querying graph appear :) I think you use one of the few hooks added between 0.9 and 1.0.
Well, it was time for to upgrade to 1.0 anyway ;)


Yes indeed the plugin makes use from one of the new hooks that where added to the graph page :)

_________________
/* * 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);


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 02, 2006 5:44 am 
Offline
Cacti User

Joined: Tue Apr 05, 2005 9:52 am
Posts: 367
Location: Munich, Germany
Hi,

I have plugin arch V1. and the newest dataquery:
Error:
On the graph Page at the top:
Notice: Undefined index: graph_view.php:tree in /var/www/html/cacti/lib/functions.php on line 1420
"
1419 /* find the current page in the big array */
1420 $current_array = $nav{$current_page . ":" . $current_action};
1421 $current_mappings = split(",", $current_array["mapping"]);
1422 $current_nav = "";
"

and:

After clicking the arrow near the graph to get into the query, I get serveral times:
Notice: A non well formed numeric value encountered in /var/www/html/cacti/plugins/dataquery/class_cactiquery.php on line 226
"
225 $this->_set_date_format();
226 $timestamp = date($this->graph_date, $timestamp);
227 $data = ($matches[1][$j] * (pow(10,(float)$matches[2][$j])));
228 if (isset($timestamp)
"
But the query works.

Where can I configure the timerange the query is using?

Torsten


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 02, 2006 5:48 am 
Offline
Cacti User

Joined: Tue Apr 05, 2005 9:52 am
Posts: 367
Location: Munich, Germany
Hi,

at the point to export to csv I get:

Notice: A non well formed numeric value encountered in /var/www/html/cacti/plugins/dataquery/class_cactiquery.php on line 226
class_cactiquery::_open_buffer: Could not open file: /var/www/html/cacti/csvdcimgt21-UnixProcesses.csv for writting
Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/html/cacti/plugins/dataquery/class_cactiquery.php on line 354

Warning: fclose(): supplied argument is not a valid stream resource in /var/www/html/cacti/plugins/dataquery/class_cactiquery.php on line 377

The CSV directory is empty.

Torsten


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 02, 2006 7:27 am 
Offline
Cacti User
User avatar

Joined: Fri Jul 25, 2003 10:37 am
Posts: 207
Location: Athens/Greece
Hmm i will try to debug, allthough its working correctly on 2 boxes...

_________________
/* * 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);


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 02, 2006 10:05 am 
Offline
Cacti Pro User
User avatar

Joined: Thu Nov 21, 2002 8:55 am
Posts: 703
Location: Austin, TX
torstentfk wrote:
Hi,

at the point to export to csv I get:

Notice: A non well formed numeric value encountered in /var/www/html/cacti/plugins/dataquery/class_cactiquery.php on line 226
class_cactiquery::_open_buffer: Could not open file: /var/www/html/cacti/csvdcimgt21-UnixProcesses.csv for writting
Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/html/cacti/plugins/dataquery/class_cactiquery.php on line 354

Warning: fclose(): supplied argument is not a valid stream resource in /var/www/html/cacti/plugins/dataquery/class_cactiquery.php on line 377

The CSV directory is empty.

Torsten

This sounds like a permissions issue. your web user (apache, nobody,etc) should have ownership & group on the dir typically 755

_________________
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 02, 2006 10:08 am 
Offline
Cacti User

Joined: Tue Apr 05, 2005 9:52 am
Posts: 367
Location: Munich, Germany
egarnel wrote:
torstentfk wrote:
Hi,

....
The CSV directory is empty.

Torsten

This sounds like a permissions issue. your web user (apache, nobody,etc) should have ownership & group on the dir typically 755


Hi,
ls -al
drwxrwxr-x 2 apache apache 4096 Nov 2 10:24 csv/

so the apache has all rights to do so.

Torsten


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 02, 2006 10:10 am 
Offline
Cacti Pro User
User avatar

Joined: Thu Nov 21, 2002 8:55 am
Posts: 703
Location: Austin, TX
torstentfk wrote:
egarnel wrote:
torstentfk wrote:
Hi,

....
The CSV directory is empty.

Torsten

This sounds like a permissions issue. your web user (apache, nobody,etc) should have ownership & group on the dir typically 755


Hi,
ls -al
drwxrwxr-x 2 apache apache 4096 Nov 2 10:24 csv/

so the apache has all rights to do so.

Torsten


what are the perms for the dataquery above csv?

_________________
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 72 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group