No negative values can be displayed in graphs

Bug #1438930 reported by Peter Gervai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
Medium
Morten Brekkevold

Bug Description

It seems NAV reads SFP tx/rx levels but cannot handle negative results like -17.1 dBm. Instead it logs "no value".

Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :

I'm assuming the tx/rx values are collected as part of the sensors collection (at least on Cisco, TX/RX of SFP's are usually reported as sensors whose values can be read).

It might help if you set 'nav.ipdevpoll.plugins.statsensors = DEBUG' in `logging.conf`. This should debug log the raw values NAV reads from the device. There might be something wrong that happens when converting the number to the given precision of the sensor.

Changed in nav:
status: New → Incomplete
assignee: nobody → Morten Brekkevold (mbrekkevold)
Revision history for this message
Peter Gervai (grin) wrote :

 [DEBUG plugins.statsensors.statsensors] [1minstats c6506aggregator.head.sex] got data from sensors:
.....
('nav.devices.c6506aggregator_head_sex.sensors.Gi2_2_Transmit_Power_Sensor', (1429262887.206605, -2.0)), ('nav.devices.c6506aggregator_head_sex.sensors.Gi5_1_Receive_Power_Sensor', (1429262887.206605, -5.5))

Okay, I have found the problem:

...&yMin=0&...

You call graphite with this which screws up graphs with negative values. I guess you intended to have graphs with the same scale? :) There are a few graphs which may contain negative values, most notably anything which works with Tx or Rx power in dBmV or dB.

I checked a few MIBs and they're pretty inconlusive regarding data ranges. Often SYNTAX contains range like:
     SYNTAX Integer32 (0..1536)
     SYNTAX Integer32 (0..2147483647)
and it seems that it's not shown where the values may conver all the Int32 range, including negative values.

(Tehnically CISCO-ENTITY-SENSOR-MIB says that these sensor values are of type SensorValue which has the range -1000000000 - 1000000000, but I guess this syntax varies from mib to mib.)

Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :

Aha, you are quite correct. NAV produces a default value of yMin=0 for all graph types - this is indeed a stupid bug.

summary: - no negative values for transceiver measuments
+ No negative values can be displayed in graphs
Changed in nav:
status: Incomplete → Confirmed
importance: Undecided → Medium
Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :
Changed in nav:
status: Confirmed → Fix Committed
milestone: none → 4.2.6
Changed in nav:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.