reportit with ifhighspeed

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
sh0x
Posts: 32
Joined: Thu Aug 30, 2007 6:12 pm
Location: California

reportit with ifhighspeed

Post by sh0x »

Hi, can I use internal variables with reportit? I'd like to calculate percent utilization based on ifHighSpeed. Thanks!

sh0x
User avatar
browniebraun
Developer
Posts: 791
Joined: Tue Jun 13, 2006 1:17 am
Location: Cologne, Germany

Re: reportit with ifhighspeed

Post by browniebraun »

Not directly, but ReportIt uses its own variables.
In that case you can calculate the utilization by using variable "maxValue" within your calculation formula.
Ensure that you use 0.7.2 or the current SVN.

Best regards
-Andreas-
Hat das Blümchen einen Knick, war der Schmetterling zu dick! ;)
reportit v0.7.5a
SNMPAgent v0.2.3
Download ReportIt | Download SNMPAgent | ReportIt SVN | ReportIt Templates | Wish list
sh0x
Posts: 32
Joined: Thu Aug 30, 2007 6:12 pm
Location: California

Re: reportit with ifhighspeed

Post by sh0x »

I don't have maxValue, only maxRRDvalue, which results in 0 since that's what is in my data template. I'd prefer to set maxRRDvalue to ifHighSpeed? I have different graph templates for different link speeds referencing this data template. I don't have this problem with ifSpeed since I can put |query_ifSpeed| in the data template but I have to use ifHighSpeed now and getting percent utilization has been a challenge since the magnitude is different, so I can't put that in the data template. So I tried using multiple data templates, each with a static maxValue, but then I can't use reportit to generate a report on interface utilization for all links. I get separate reports for each link speed. Thanks!
sh0x
sh0x
Posts: 32
Joined: Thu Aug 30, 2007 6:12 pm
Location: California

Re: reportit with ifhighspeed

Post by sh0x »

Maybe I can do something similar to this post to set maxRRDvalue the way I need it, unless there is a better way.
http://forums.cacti.net/viewtopic.php?f ... hp#p182292
sh0x
Posts: 32
Joined: Thu Aug 30, 2007 6:12 pm
Location: California

Re: reportit with ifhighspeed

Post by sh0x »

Looking at runtime.php, it appears the easiest change might be to make a simple modification below. I'll loose some functionality of maxRRDValue, but at the time I don't need it. I suppose the if statement above it could be modified to get full functionality, but this does the trick for now. This is using reportit v0.7.3.

Code: Select all

                foreach ($report_definitions['maxRRDValues'] as $key => $array) {
                        $variables['maxRRDValue:' . $report_definitions['ds_items'][$key]] = $maxHighValue*1000000;
                        //$variables['maxRRDValue:' . $report_definitions['ds_items'][$key]] = !isset($array[$i]['maxRRDValue'])? $maximum : $array[$i]['maxRRDValue'];
                }
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests