[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [php-weathermap] key colors



Travis Johnson wrote:
> Hi,
>
> I want to be able to set a different color for a link if one side of
> the link is down. Currently when this happens, the value returned is a
> "-1", but there is no option to have negative values in the SCALE
> section. Is there another way to make this happen?
The value returned to bandwidth_in is actually 0. The -1 is just how the
plugins tell Weathermap that it's a 'null' and not a real 0 (if you see
what I mean). An alive link is very rarely *exactly* 0 - there's usually
the odd ARP or STP packet flying around - so you could reasonably assume
that 0 means down.

You can set a colour for exactly zero, by using
  SCALE 0 0   255 255 0

The default scale in 0.95 already has a line like this, with the grey
colour. Prior to that, it did the same thing, but the grey was hard-coded.

Best Regards,

Howie

Copyright 1994-2005, by Howard Jones. howie@thingy.com