Mbps to MBps

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Photon2
Posts: 3
Joined: Tue Sep 20, 2016 8:47 am

Mbps to MBps

Post 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?
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Mbps to MBps

Post 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.
Former Nagios employee
https://www.mcapra.com/
Photon2
Posts: 3
Joined: Tue Sep 20, 2016 8:47 am

Re: Mbps to MBps

Post by Photon2 »

Thank you!
That did it.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Mbps to MBps

Post by mcapra »

Sure thing! Is it alright if we lock this thread and mark the issue as resolved?
Former Nagios employee
https://www.mcapra.com/
Photon2
Posts: 3
Joined: Tue Sep 20, 2016 8:47 am

Re: Mbps to MBps

Post by Photon2 »

Absolutely.
Locked