|
|
| Author |
Message |
pestilence Cacti User
Joined: 25 Jul 2003 Posts: 207 Location: Athens/Greece
|
Posted: Wed Jan 31, 2007 4:01 am Post subject: |
|
|
| 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
|
Posted: Wed Jan 31, 2007 6:58 am Post subject: |
|
|
| 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
|
Posted: Wed Jan 31, 2007 8:29 am Post subject: |
|
|
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
|
Posted: Thu Feb 01, 2007 6:52 am Post subject: |
|
|
| 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
|
Posted: Thu Feb 01, 2007 7:03 am Post subject: |
|
|
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
|
Posted: Fri Feb 02, 2007 9:03 am Post subject: |
|
|
| 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
|
Posted: Fri Feb 02, 2007 10:36 am Post subject: |
|
|
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
|
Posted: Mon Mar 05, 2007 1:09 pm Post subject: Bugfix - dataquery times |
|
|
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
|
Posted: Tue Mar 06, 2007 3:05 pm Post subject: Re: Bugfix - dataquery times |
|
|
| 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
|
Posted: Tue Mar 06, 2007 4:54 pm Post subject: |
|
|
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
|
Posted: Fri Mar 23, 2007 10:25 am Post subject: |
|
|
| 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
|
|
| Back to top |
|
 |
pbickerdyke
Joined: 18 Jun 2008 Posts: 6
|
Posted: Wed Sep 17, 2008 8:56 am Post subject: |
|
|
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 |
|
 |
|