Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Dataquery (ex cactiquery) 1.0a released
Goto page Previous  1, 2, 3, 4, 5
 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin Announcements
Author Message
pestilence
Cacti User


Joined: 25 Jul 2003
Posts: 207
Location: Athens/Greece

PostPosted: Wed Jan 31, 2007 4:01 am    Post subject: Reply with quote

TheWitness wrote:
Pestilence,

I need to revise your plugin. Do you have an issue with that? Changes will be subtile but significant.

TheWitness


Hey there, sorry for the late reply (damn work) it's ok with the revision
Back to top
TFC
Cacti Pro User


Joined: 09 Apr 2003
Posts: 617
Location: Izmir/Turkey

PostPosted: Wed Jan 31, 2007 6:58 am    Post subject: Reply with quote

Does still this plugin run on 0.8.6i and after?
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9736
Location: MI, USA

PostPosted: Wed Jan 31, 2007 8:29 am    Post subject: Reply with quote

Same here. Only difference is that I appear to be obsessed. Need to go and either see a Doctor or get a life.

TheWitness
Back to top
pestilence
Cacti User


Joined: 25 Jul 2003
Posts: 207
Location: Athens/Greece

PostPosted: Thu Feb 01, 2007 6:52 am    Post subject: Reply with quote

TheWitness wrote:
Same here. Only difference is that I appear to be obsessed. Need to go and either see a Doctor or get a life.

TheWitness


#define life?
LOL
Darn this is what happens when you start getting involved in everything LOL
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9736
Location: MI, USA

PostPosted: Thu Feb 01, 2007 7:03 am    Post subject: Reply with quote

Pestilence,

What I was thinking was the end all for Data Query was to take the Graph Syntax and remove all of the AREA, LINE, GPRINT, etc from the syntax and then export the results and display them. I would use the rrdtool export function to perform this. Then the results would appear in XML format, so it would simply be a matter of reformatting (in this version of Cacti) and displaying the results.

Is this what you are currently doing?

TheWitness
Back to top
pestilence
Cacti User


Joined: 25 Jul 2003
Posts: 207
Location: Athens/Greece

PostPosted: Fri Feb 02, 2007 9:03 am    Post subject: Reply with quote

TheWitness wrote:
Pestilence,

What I was thinking was the end all for Data Query was to take the Graph Syntax and remove all of the AREA, LINE, GPRINT, etc from the syntax and then export the results and display them. I would use the rrdtool export function to perform this. Then the results would appear in XML format, so it would simply be a matter of reformatting (in this version of Cacti) and displaying the results.

Is this what you are currently doing?

TheWitness


The plugin queries the datasource for the values of a specified time period, then it takes the output and formats it to a spreadsheet compatible format, adding a title, timestamp, and the datasources available.
So i suppose it does do the same thing you are mentioning although in a different manner.
I would be interested to see that version, so be my guest
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9736
Location: MI, USA

PostPosted: Fri Feb 02, 2007 10:36 am    Post subject: Reply with quote

Ok, time permitting. Working with Gilles on Manage at the moment.

Larry
Back to top
rbecker



Joined: 12 Feb 2007
Posts: 26
Location: Bay Area, CA

PostPosted: Mon Mar 05, 2007 1:09 pm    Post subject: Bugfix - dataquery times Reply with quote

I noticed when using this that on "normal" i.e. not zoomed graph pages, it doesn't pick up the time range correctly. Here's a patch to make it do that.

I did a bit of digging into why it doesnt show all the datasources on a graph. It turns out that the dataquery picks up all the datasources for a graph, but it sets a single variable to be the last datasource it found, and generates the view based on that. I think the correct solution is that the controller should iterate both the dataquery's datasource processing and the view processing of each datasource. That way if we want to redo the logic on processing multiple datasources, we're only messing with the controller level.

What I'm really interested in getting from this is the ability to look at the data being graphed prior to graph pages being generated. If we can do that, we can sort graphs on a page based on the data they contain. Once I fix the datasource issue, I'll probably start in on that

Code:

--- setup.php.old       2006-11-03 06:58:03.000000000 -0800
+++ setup.php   2007-03-05 09:56:21.000000000 -0800
@@ -131,18 +131,26 @@
        {
                $start=$_REQUEST["graph_start"];
        } else {
-               $_REQUEST["graph_start"] = "";
-               $start = time() - 3600;
+        if ( !empty($_SESSION["sess_current_date1"]) ) {
+          $start = strtotime( $_SESSION["sess_current_date1"] );
+        } else {
+                 $_REQUEST["graph_start"] = "";
+                 $start = time() - 3600;
+        }
        }

        if ((isset($_REQUEST["graph_end"])) && (!empty($_REQUEST["graph_end"])))
        {
                $end=$_REQUEST["graph_end"];
        } else {
-               $_REQUEST["graph_end"] = "";
-               $end = time();
+        if ( !empty($_SESSION["sess_current_date1"]) ) {
+          $end = strtotime( $_SESSION["sess_current_date2"] );
+        } else {
+                 $_REQUEST["graph_end"] = "";
+                 $end = time();
+        }
        }
        print '<a href="' .  $config['url_path'] . 'plugins/dataquery/dataquery.php?action=query&local_graph_id='.$local_graph_id.'&rra_id='.$rra_id.'&view_type='.$view_type.'&graph_start=' . $start . '&graph_end=' . $end . '"><img src="' . $config['url_path'] . 'plugins/dataquery/images/graph_query.png" border="0" alt="Query Graph" title="Query Graph" style="padding: 3px;"></a><br>';
 }

-?>
\ No newline at end of file
+?>
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12604
Location: Muenster, Germany

PostPosted: Tue Mar 06, 2007 3:05 pm    Post subject: Re: Bugfix - dataquery times Reply with quote

rbecker wrote:
I noticed when using this that on "normal" i.e. not zoomed graph pages, it doesn't pick up the time range correctly. Here's a patch to make it do that....
This was on purpose. I discussed this effect some time ago with the developer ...
Reinhard
Back to top
rbecker



Joined: 12 Feb 2007
Posts: 26
Location: Bay Area, CA

PostPosted: Tue Mar 06, 2007 4:54 pm    Post subject: Reply with quote

Hrmm. On purpose?

Too bad it wasn't documented, and nor was how to get the full information. Without documentation, I think the intuitive route is much more appropriate.

I'm not sure I see the reason to return partial information.
Back to top
pestilence
Cacti User


Joined: 25 Jul 2003
Posts: 207
Location: Athens/Greece

PostPosted: Fri Mar 23, 2007 10:25 am    Post subject: Reply with quote

rbecker wrote:
Hrmm. On purpose?

Too bad it wasn't documented, and nor was how to get the full information. Without documentation, I think the intuitive route is much more appropriate.

I'm not sure I see the reason to return partial information.


There is a reason...leave your timespan to a huge period and watch the system resources go down
I left it intentional like that to avoid this kind of behaviour, i accidently had this done once and my cacti server just crawled.
Back to top
super-hornet
Cacti User


Joined: 27 May 2007
Posts: 144

PostPosted: Fri Jul 04, 2008 2:00 am    Post subject: Reply with quote

First of all.. thanks for this wonderful plugin.

I now using:
Cacti Version - 0.8.7b
Plugin Architecture - 2.1
OS - openSUSE 10.3
Dataquery (dataquery - v0.1.4a)

But I found a few bugs that I not sure anyone reported it already or not.
Bugs are:
1. Dataquery version is wrong when display in "Host Info". It stated Dataquery (dataquery - v0.1.2a)
2. The suppose to be returning to cacti main page link is wrong in "[Dump to CSV ] [ Return ]".
3. The "File download link" still cannot work for virtual path in apache.

For #1 and #2 bug, I modified the existing v0.1.4a files of "setup.php" and "view/queryview.php"

For #3 bug, the situation is like this:
URL link to cacti is (e.g): http://123.123.123.123/cacti
Actual path for cacti in that system is (e.g): /usr/share/cacti
CSV Export Path in settings are (e.g.): /usr/share/cacti/plugins/dataquery/csv/

By configuring the above setting, I can see the "Dump to CSV" and also can see the actual file store in:
/usr/cacti/plugins/dataquery/csv/
But when click "Download", the Apache reject that link because it actually link to the actual directory path instead. (It became http://123.123.123.123/usr/share/cacti/plugins/dataquery/csv/TheFile.csv

I tried configure the CSV path to: "/cacti/plugins/dataquery/csv/", and it is worse because I can't see the "[Dump to CSV ] [ Return ]".

Thus, to walk around this problem, I do this:
1. I create a symbolic link of "ln -s /usr/cacti /cacti"
2. Configure CSV Export Path to "/cacti/plugins/dataquery/csv/"
and it work

SH



0.1.4a_Modified.zip
 Description:

Download
 Filename:  0.1.4a_Modified.zip
 Filesize:  4.09 KB
 Downloaded:  72 Time(s)

Back to top
pbickerdyke



Joined: 18 Jun 2008
Posts: 6

PostPosted: Wed Sep 17, 2008 8:56 am    Post subject: Reply with quote

Hi,

Is there a way to show multiple datasources?

I have the following graph:

Code:
/opt/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=-14400 \
--end=-300 \
--title="RGS WL App Connections" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/opt/cacti-0.8.7/rra/apache_to_weblogic_rgs_rgswebtoappconapp01_2251.rrd":RGSWebtoAppConapp01:AVERAGE \
DEF:b="/opt/cacti-0.8.7/rra/apache_to_weblogic_rgs_rgswebtoappconapp02_2252.rrd":RGSWebtoAppConapp02:AVERAGE \
DEF:c="/opt/cacti-0.8.7/rra/apache_to_weblogic_rgs_rgswebtoappconapp03_2253.rrd":RGSWebtoAppConapp03:AVERAGE \
DEF:d="/opt/cacti-0.8.7/rra/apache_to_weblogic_rgs_rgswebtoappconapp04_2254.rrd":RGSWebtoAppConapp04:AVERAGE \
LINE1:a#FF0000:"App01"  \
GPRINT:a:LAST:"%8.2lf %s"  \
LINE1:b#00CF00:"App02"  \
GPRINT:b:LAST:"%8.2lf %s"  \
LINE1:c#0000FF:"App03"  \
GPRINT:c:LAST:"%8.2lf %s"  \
LINE1:d#FF00FF:"App04"  \
GPRINT:d:LAST:"%8.2lf %s"


When I click the button for dataquery it only shows data for the first data source.

Is there a way to get it to show all of them?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin Announcements All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4, 5
Page 5 of 5

 



Powered by phpBB © 2001, 2005 phpBB Group