Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue Mar 28, 2017 1:14 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: [SOLVED] Allow |query_ifSpeed| for upper limit
PostPosted: Wed Aug 29, 2007 9:38 am 
Offline

Joined: Mon Nov 27, 2006 1:24 pm
Posts: 19
If |query_ifSpeed| is used as the upper limit on a graph, it is not replaced with the appropriate number, rather the following error is given:

Code:
CMDPHP: Poller[0] ERROR: SQL Exec Failed "update graph_templates_graph set Upper Limit='|query_ifSpeed|' where local_graph_id=5"


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 29, 2007 10:39 am 
Offline
Developer/Forum Admin
User avatar

Joined: Mon Nov 17, 2003 6:35 pm
Posts: 5939
Location: Michigan, USA
What happens if the upper limit changes when the device is re-quered?

It's not a simple answer, hence we haven't implemented it yet.

_________________
Tony Roman
Experience is what causes a person to make new mistakes instead of old ones.
There are only 3 way to complete a project: Good, Fast or Cheap, pick two.
With age comes wisdom, what you choose to do with it determines whether or not you are wise.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 29, 2007 10:45 am 
Offline

Joined: Mon Nov 27, 2006 1:24 pm
Posts: 19
Aha! I see your point. Thanks for explaining. I just assumed it was an oversight.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 29, 2007 10:49 am 
Offline
Developer/Forum Admin
User avatar

Joined: Mon Nov 17, 2003 6:35 pm
Posts: 5939
Location: Michigan, USA
Btw, I must admit I like the idea...

Just hard to track it, and do you update the data source as well? If so, we need to update the rrdtool file, which currently does not happen.

_________________
Tony Roman
Experience is what causes a person to make new mistakes instead of old ones.
There are only 3 way to complete a project: Good, Fast or Cheap, pick two.
With age comes wisdom, what you choose to do with it determines whether or not you are wise.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 29, 2007 11:21 am 
Offline

Joined: Mon Nov 27, 2006 1:24 pm
Posts: 19
rony wrote:
Btw, I must admit I like the idea...

Just hard to track it, and do you update the data source as well? If so, we need to update the rrdtool file, which currently does not happen.


Ok, since you're interested, let's think about this.

So, we allow |query_ifSpeed| as an upper limit. We add a second option, a checkbox, "Upper Limit Never Changes". If checked, that addresses all the above and we ignore a new upper limit if it changes. There are practical reasons for this.

If that box is unchecked, then we will have a few choices.

1) If the ifSpeed decreases, we may want to consider keeping upper limit where it is for historical graphing purposes. We can give the user this option somewhere in a configuration.
2) If the ifSpeed increases, we can increase the upper limit. Yeah, you'd have to change it in the RRD. It's been a while so I'm not sure if this can be done or not. If not, your workaround is to dump to XML, make changes to the XML file, then pull your XML file into a "new" RRD. I used to have an algorithm to accomplish the above, albeit in perl, but it's long-gone. It's simple enough to do though.
3) Maybe go a step further and note that if the ifSpeed changes X times in Y amount of time (3 changes in 2 months maybe), we just dump the upper limit altogether. Of course, make this user-configurable.

I dunno, I'm just thinking of things off the top of my head at this point.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 04, 2008 10:46 am 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
Support for |query_*| variables for upper/lower limit is impleneted in SVN. Targeted release is 088. Awaiting code verification
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 22, 2008 9:43 am 
Offline
Cacti User

Joined: Wed Aug 13, 2008 8:08 am
Posts: 73
gandalf,
Quote:
Support for |query_*| variables for upper/lower limit is impleneted in SVN. Targeted release is 088.


I would like to be able to use the |query_ifSpeed| for my upper limit, do you know when 8.8 will be released? Or do you know of a way to do this in 8.7b?

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 02, 2009 7:43 am 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
expect 088 in the first half of this year (btw: Happy New Year to all of you!), at least as a beta. If I remember correctly, backporting would be time cinsuming. It is not planned for 087c
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 26, 2009 7:14 pm 
Offline
Cacti User

Joined: Fri Oct 05, 2007 5:34 pm
Posts: 170
I made a patch for 0.8.7 beta 4 a while ago that I am still using today. If you can't wait for 0.8.8.

http://bugs.cacti.net/view.php?id=1030


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 27, 2009 1:28 pm 
Offline
Cacti User

Joined: Wed Aug 13, 2008 8:08 am
Posts: 73
Quote:
I made a patch for 0.8.7 beta 4 a while ago that I am still using today. If you can't wait for 0.8.8.


Thank you! I am very excited to try this out. I should have some time within the next week to apply it.

B


Top
 Profile  
 
 Post subject: Re: [SOLVED] Allow |query_ifSpeed| for upper limit
PostPosted: Tue Mar 24, 2015 12:49 pm 
Offline

Joined: Fri Apr 12, 2013 7:25 am
Posts: 23
Attachment:
graph_image.png
graph_image.png [ 8.22 KiB | Viewed 4235 times ]

Attachment:
Capturar.PNG
Capturar.PNG [ 36.23 KiB | Viewed 4235 times ]


So, ifSpeed is detected correctly, but when using it as upper limit, I just get 1 on the graph.


Top
 Profile  
 
 Post subject: Re: [SOLVED] Allow |query_ifSpeed| for upper limit
PostPosted: Tue Mar 24, 2015 3:35 pm 
Offline

Joined: Fri Apr 12, 2013 7:25 am
Posts: 23
RRDTool Command:
C:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Switch 9-6 - Traffic - GigabitEthernet1/0/1" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--upper-limit="|query_ifSpeed|" \
--lower-limit="0" \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a="C\:/inetpub/wwwroot/cacti/rra/108/3925.rrd":"traffic_in":MAX \
DEF:b="C\:/inetpub/wwwroot/cacti/rra/108/3925.rrd":"traffic_out":MAX \
CDEF:cdefa="a,8,*" \
CDEF:cdefe="b,8,*" \
AREA:cdefa#00CF00FF:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefe#002A97FF:"Outbound" \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n"
RRDTool Says:


Attachments:
Capturar.PNG
Capturar.PNG [ 70.87 KiB | Viewed 4230 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

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