Bandwidth on weather lines

This forum was archived to /woltlab and is now in read-only mode.
  • I would highly recommend to convert dimensions from "bps" to higher ones. On situations when you have several 10Gbps connections, lines become horribly unreadable. The BW boxes become too big, overlapping other elements or running over them. Besides, it is humanly difficult to perceive very large numbers, mostly if they are amassed in clusters. Generically, all positive result of dealing with "real" numbers is lost on this mass.


    Here I have already done some corrections but I believe it is not a perfect solution. I added this function (note: we are dealing with bits, not bytes!):



    function perfdataCalcBandwidth(val) {
    var Kb = 1000;
    var Mb = 1000000;
    var Gb = 1000000000;
    var uom = 'bps';
    if(val > Gb) {
    val /= Gb
    uom = 'Gbps'
    } else if(val > Mb) {
    val /= Mb
    uom = 'Mbps'
    } else if(val > Kb) {
    val /= Kb
    uom = 'Kbps'
    }
    val=Math.round(val*100)/100;
    return val+uom;
    }


    Then, I changed several lines on /nagvis/share/frontend/nagvis-js/js/lines.js (drawNagVisLine function) to use this function.
    Example:
    from - "perfdataA = perfdata[2][1] + perfdata[2][2];"


    to - "perfdataA = perfdataCalcBandwidth(perfdata[2][1]);"

  • Hmmm I'm using one of the iftraffic.pl at Nagios Exchange (yes, I am one of the contributors to this plugin). Why this variant uses absolute values? А - for statistics as it is a lot easier to have everything in one dimension. B - sometimes there is a need to cross-check what is shown in the switch/router and what comes down through SNMP (specially for some weird beasts like Huawei). Besides, other tools like PnP do not have any problems with this as they re-dimension things internally.



    CRITICAL - Average IN: 3.41Tbps (170252.50%), Average OUT: 970.95Gbps (48547.45%) Total RX: 5.81TBytes, Total TX: 1.66TBytes|inUsage=170252.50%;85;98 outUsage=48547.45%;85;98 inB
    andwidth=3405050072654.40bps outBandwidth=970948946016.00bps inAbsolut=6384549288059 outAbsolut=1820440453052 Bandwidth=2000000000

  • hays guys im new to nagvis and I keep getting my output in B this is a 40Gbps link.


    Total RX Bytes: 26243864277313.00 B, Total TX Bytes: 2083062993055488.00 B<br>Average Traffic: 2561485.14 B/s (2.0%) in, 143876595.14 B/s (115.1%) out<br>CRITICAL bandwidth utilization.|inUsage=2.0%;85;98;; outUsage=115.1%;85;98;; inAbsolut=26243789994244B;106250000;122500000;; outAbsolut=2083058820634229B;106250000;122500000;;
    any Idea what I can do to fix


    also I'm using chcek_iftraffic from


    http://www.linuxhacker.at/open…s-plugins/check-iftraffic


    thanks

  • I get thos popups too.. one for each weathermap line...


    You forgot to remove from 1.7.5 Git?


  • I thought inAbsolut already has calculated the bytes / bits transfered within the last check interval. But as it seems this is simply the current counter value privided via SNMP. Did I get this right? If it is correct this value is totally useless for us.

  • Hi,


    we've upgraded to NagVis 1.7.6. Now, pop ups has been dissapeared. But weather lines doesn't shows correct traffic (but show correct percentages). Correct traffic is shown in "Resumen de salida".


    I attach a picture.


    Sorry for my poor English.


    Regards,


    Jose

  • Hello,


    I need the whole perfdata string (and maybe also the output) to analyze this.


    Regards
    Lars


    Hi,


    I don't know how to obtain these data. Can you tell me how to obtain them?
    Thank you.


    Regards,
    Jose