DEF problems with start/end time overrides

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
davis3792
Posts: 3
Joined: Fri Nov 25, 2005 11:35 pm

DEF problems with start/end time overrides

Post by davis3792 »

Before moving up to Cacti, I was hoping to have a decent grasp on rrdtool. But I've run into a road block that I've been unable to overcome.

According to the rrdtool graph man page:
======================================
DEF:<vname>=<rrdfile>:<ds-name>:<CF>[:step=<step>][:start=<time>][:end=<time>][:reduce=<CF>]

....The time span of this data is the same as for the graph by default, you can override this by specifying start and end."
======================================

Has anyone successfully implemented the start/end time feature of DEF? I'm using Perl on XP. I've also tried straight command line and get the same results. Seems like the DEF start/end times are basically ignored - although if you put something bogus in the time spec, rrdtool complains, so it's certainly not being ignored wholesale.

Any assistance would be much appreciated...
Thanks
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Both the timespan selector and the zoom features alter start and end time for the entire graph. This default behavior may negatively impact what you would like to do with your graphs.

This is the setting that would have to be over written from the rrdtool graph function:

[-s|--start time] [-e|--end time]

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Upon futher investigation, you may be in luck:
This command fetches data from an RRD file. The virtual name vname can then be used throughout the rest of the script. By default, an RRA which contains the correct consolidated data at an appropriate resolution will be chosen. The resolution can be overridden with the --step option. The resolution can again be overridden by specifying the step size. The time span of this data is the same as for the graph by default, you can override this by specifying start and end. Remember to escape colons in the time specification!
http://people.ee.ethz.ch/~oetiker/webto ... ta.en.html

The next question, how do you place these timespans in the DEF's. Certainly, the database does not currently provide a timespan override. This would have to exist in the GRAPH TEMPLATE or GRAPH creation page for the specific Data Sources. Sounds interesting though.

I can see a month to month overlay being somewhat interesting. If you need this as a feature, please goto http://bugs.cacti.net and add a feature request. In that feature request, please be specific as to WHY you want this feature. (aka Use Case). You can also follow-up here just to let me know you have done so.

Thanks,

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
davis3792
Posts: 3
Joined: Fri Nov 25, 2005 11:35 pm

Post by davis3792 »

ok...I'll do that...

What I want to do is to create a graph that (for instance) plots the current month AND last month on the same graph.

Any chance you or someone else could run a quick test with rrdtool to verify that the override actually works? I've spun it every way I can think of to no avail...

I'm about to the point of downloading the source to a unix box, compiling it with symbols and running it under a debugger.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Once you think you have the graph syntax right, you should be able to redirect the output to a static PNG file and compare. If the graph looks correct, then you should wave the flag ans say something like 'Yea, it works'. Then, we can work on making this fit inside of Cacti.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
davis3792
Posts: 3
Joined: Fri Nov 25, 2005 11:35 pm

Post by davis3792 »

The start/end times on the DEF statement are ignored if they're outside of the time range specified at the top level (rrdtool graph). And since the time range defaults to one day ago until now, any time window specified on the DEF statement prior to one day ago is ignored.

So I think the lesson is that if you use the overrides on the DEF statement, you still need to specify the time range at the global level.

Haven't found a way to show multiple time periods on the same graph yet (compare this month's CPU utilization to same time last year).
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Keep us posted on any developments relative to this support.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests