network-weathermap
network-weathermap copied to clipboard
Bandwidth direction - Link color mixed up?
I have two links in my map where the colouring seems to be mixed up (please see screenshot). Ingress direction should be coloured as higher utilized, but is is applied to Egress direction. All other links on the map are shown as they should.
Upper link on screenshot: LINK ipaddress-ipaddress WIDTH 4 BWLABELPOS 40 60 TARGET snmp:community:ipaddress:.1.3.6.1.2.1.31.1.1.1.6.511:.1.3.6.1.2.1.31.1.1.1.10.511 NODES ipaddress:0r45 ipaddress:0r45 VIA 1034 432 BANDWIDTH 40
Lower link on screenshot: LINK ipaddress-ipaddress aa WIDTH 4 BWLABELPOS 35 65 TARGET snmp:community:ipaddress:.1.3.6.1.2.1.31.1.1.1.6.512:.1.3.6.1.2.1.31.1.1.1.10.512 NODES ipaddress:0r15 ipaddress:0r15 VIA 1038 486 BANDWIDTH 40
Any hints are appreciated.

You've removed too much information, but my guess is that one of the links is from A->B and the other is from B->A.
Both link targets start at the same switch.
LINK 10.0.1.204-10.0.1.206 WIDTH 4 BWLABELPOS 40 60 TARGET snmp:community:10.0.1.204:.1.3.6.1.2.1.31.1.1.1.6.511:.1.3.6.1.2.1.31.1.1.1.10.511 NODES 10.0.1.204:0r45 10.0.1.206:0r45 VIA 1034 432 BANDWIDTH 40
LINK 10.0.1.204-10.0.1.206aa WIDTH 4 BWLABELPOS 35 65 TARGET snmp:community:10.0.1.204:.1.3.6.1.2.1.31.1.1.1.6.512:.1.3.6.1.2.1.31.1.1.1.10.512 NODES 10.0.1.204:0r15 10.0.1.206:0r15 VIA 1038 486 BANDWIDTH 40
OK, then try a run with debugging on for one map calculation, and check that the SNMP plugin is returning what you think it is. Look for the lines with ReadData (and the link name) in the output. The colours match the numbers. See if the numbers match your assumption...
Did that shed any light?
Remove BWLABELPOS and check, sometime modifying those swap the proper placement based on the indicated positions.
Well spotted!
In the manual it does say:
The two position values are percentages along the link arrow, from the first to the second node. Therefore BWLABELPOS 75 25 is the default.
and then:
Weathermap will produce a warning if the outpostion is greater than the inposition. In most cases, you have probably made a mistake, but if you have a good reason to do this, then you can disable that warning using 'SET nowarn_bwlabelpos 1' in the top section of you map config file.
So you should have had a warning in the log file. You checked the logfile, right? :-)
(or is this a bug and I need to check that the warning is still generated? Looking at the code, it does look like it might have been removed...)
And for 0.98 and 0.98a the warning is still there:
if( ($this->linkstyle=='twoway') && ($this->labeloffset_in < $this->labeloffset_out) && (intval($map->get_hint("nowarn_bwlabelpos"))==0) )
{
wm_warn("LINK ".$this->name." probably has it's BWLABELPOSs the wrong way around [WMWARN50]\n");
}