[SOLVED] Scale Problem

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

fozzy99999
Posts: 3
Joined: Mon Mar 24, 2008 2:12 pm

Post by fozzy99999 »

Well as soon as I posted this I figured it out.

I updated Weathermap.class.php to increase the maximum to 400

function ColourFromPercent

From
if ($percent > 100)
to
if ($percent > 400)

There are a couple of instances I changed
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

fozzy99999 wrote:Any suggestions to deal with numbers over 100%. I am creating some weathermaps for ping response times and response time over 100 is not uncommon for some of our connections. The problem seem to be in the ColourFromPercent function.

I have tried
SCALE DEFAULT 0 0 120 120 120
SCALE DEFAULT 0 70 0 0 255
SCALE DEFAULT 70 120 0 255 255
SCALE DEFAULT 120 180 0 255 0
SCALE DEFAULT 180 400 255 0 0
and it is clipping my scale down to 100 percent,

I am thinking i may have to modify weathermap to get the desired results but I don't know where to start. Any help would be greatly appreciated.
Change the maximum. The percentage is a percentage of the maximum - MAXVALUE or BANDWIDTH depending on if it's nodes or links.

So, decide that (say) 50% is your "good" value, make >75% be red, and then set MAXVALUE to be twice what your expected response time in milliseconds is, so that the expected time is then 50%.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest