Page 1 of 1

Mbps to MBps

Posted: Tue Sep 20, 2016 9:06 am
by Photon2
Hello folks,

We are (very) new to Nagios and are currently on the 60 day NagiosXI trial.
So far everything looks good, and NagiosXI seems really useful.

However, we cannot seem to figure out how to convert Mbit to Mbyte (Mb to MB), on the bandwith performance graph of the switches we are currently monitoring.

We are using the standard NagiosXI installation, without any additional plugins, and have added a few switches via the Configuration wizard.
Everyting is set to Mbps (instead of some Gbps).

For example right now: 345.775 Mbps translates to 43.221 MBps, we would rather see the latter in the performance graph.

Is there any way to do this?

Re: Mbps to MBps

Posted: Tue Sep 20, 2016 2:19 pm
by mcapra
All the components behind the scenes are going to work exclusively with bits per second rather than bytes per second.

You could modify the check_rrdtraf plugin to divide everything by 8 instead though. Specifically this section:

Code: Select all

set_label(){
case $2 in
    B | b)
        LABEL="B"
        DIV="1"
        ;;
    K | k)   
        LABEL="K"
        DIV="1000"
        ;;
    M | m)
        LABEL="M"
        DIV="1000000"
        ;;
    G | g)
        LABEL="G"
        DIV="1000000000"
        ;;
    *)   
        echo "$2 not a valid Label/Multiplier"
        exit $STATE_UNKNOWN
        ;;
esac
}
If you replace all the 1s with 8s you should get the desired effect. Keep in mind that this will invalidate existing performance data. You might also want to change the labels to reflect *Bps rather than *bps.

Re: Mbps to MBps

Posted: Wed Sep 21, 2016 2:11 am
by Photon2
Thank you!
That did it.

Re: Mbps to MBps

Posted: Wed Sep 21, 2016 9:43 am
by mcapra
Sure thing! Is it alright if we lock this thread and mark the issue as resolved?

Re: Mbps to MBps

Posted: Thu Sep 22, 2016 5:47 am
by Photon2
Absolutely.