Cheshire Cat Computing

Software support and information
It is currently Wed May 22, 2013 11:02 am

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: trend.cgi request
PostPosted: Fri Nov 18, 2005 11:48 am 
Offline
User

Joined: Tue Sep 06, 2005 2:33 am
Posts: 9
Location: Surprise, AZ
Is there any possibility that you can add (or show me how to add) a view to trend.cgi that will be based on "peak incoming traffic"?

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 18, 2005 1:32 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
This would require a small code change. The data retrieval currently pulls back the AVG consolidation faction - it would need to specify MAX instead.

If you feel up to hacking the code, just copy the trend.cgi module and make the change in the copy, then you can have two links - one for trending, one for max-trending.

Future versions I'll try and add this as a toggle option.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 19, 2005 7:56 am 
Offline
User

Joined: Tue Sep 06, 2005 2:33 am
Posts: 9
Location: Surprise, AZ
Thanks Steve, that worked perfect. Now is there any way to have the predictions not constrained by MaxBytes/AbsMax ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 22, 2005 9:51 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
Well, the code specifically constrains the predictions to AbsMax or MaxBytes because that is the behaviour of MRTG. It also calculates the time it expects the line to cross that boundary (or the zero line).

However, you can stop this. There is a test in the code that checks for zero or >{maxbytes} and sets the predicted value if so. You might end up with some weird graphs if you remove this, though - eg when the predicted line is too steep. It's there as a sanity check.

Is there any reason why you cant change the AbsMax or MaxBytes in your .cfg file? If these are really the hard limits of the value you are graphing, then why would you wantthe prediction line to go beyond them?

Look for this in the code:
Code:
        if($curvala > $interfaces{$target   }{maxbytes} and !$hita
            and !$interfaces{$target   }{noi}) {
            $curvala = $interfaces{$target   }{maxbytes}; $hita = 1;
            $$trenddelta[0]=0;
            push @info, "Max for ".$interfaces{$target   }{legendi}
                ." ".localtime($t)."\\l";
        }
        if($curvalb < 0 and !$hitb and !$interfaces{$target   }{noo}) {
            $curvalb = 0; $hitb = 1; $$trenddelta[1]=0;
            push @info, "Zero for ".$interfaces{$target   }{legendo}
                ." ".localtime($t)."\\l";
        }
        if($curvalb > $interfaces{$target   }{maxbytes} and !$hitb
            and !$interfaces{$target   }{noo}) {
            $curvalb = $interfaces{$target   }{maxbytes}; $hitb = 1;
            $$trenddelta[1]=0;
            push @info, "Max for ".$interfaces{$target   }{legendo}
                ." ".localtime($t)."\\l";
        }


The parts you need to remove are $curvala = $interfaces{$target}{maxbytes}; and $curvalb = $interfaces{$target}{maxbytes}; if you want to stop the prediction being capped at the max. I think you'll also need to remove the $$trenddelta[0]=0; and $$trenddelta[1]=0; if I remember rightly. This is being done from memory though...

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 23, 2005 5:21 am 
Offline
User

Joined: Tue Sep 06, 2005 2:33 am
Posts: 9
Location: Surprise, AZ
We have several circuits that have a "flex" cap so we use MaxBytes to set that cap and then AbsMax to set the circuit max. An example is below, if there is a better way to do this then I would rather just do that then mess with your code :)

Image

Thanks for your help!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 23, 2005 12:44 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
Ah, I see your point.

Maybe I can fix the next version so that while it gives you the time index of crossing MaxBytes, its doesnt cap until AbsMax?

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 12 hours [ DST ]


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:  
Powered by phpBB® Forum Software © phpBB Group