Graphite graphs change to MB/s

Hi.

My Graphite is showing interface usage graphs with values in bits.
How can I change it to MB/s?

Example:

I assume this change needs to be done in the template file. Probably yUnitSystem?
At the moment is using si.

Thanks!

binary would make the unit change between bits/bytes/kbits/kbytes and so on.

But it looks like this is the default template that is used there, which I wouldn’t change.

As an example:
A template I cloned/created from an exisiting one that comes with the module

snmp-interface graphite template
[snmp-int-traffic.graph]
check_command = "snmp-interface"

[snmp-int-traffic.metrics_filters]
bpsin = "$service_name_template$.perfdata.$interface$_in_bps.value"
bpsout = "$service_name_template$.perfdata.$interface$_out_bps.value"

[snmp-int-traffic.urlparams]
min = "0"
title = "Interface $interface$ Traffic"
lineWidth = "2"
yUnitSystem = "si"

[snmp-int-traffic.functions]
bpsin = "alias(color($metric$, '#1a7dd7'), 'Traffic in (B/s)')"
bpsout = "alias(color($metric$, '#0b3c68'), 'Traffic out (B/s)')"


[snmp-int-discard.graph]
check_command = "snmp-interface"

[snmp-int-discard.metrics_filters]
ppsindiscard = "$service_name_template$.perfdata.$interface$_in_discard.value"
ppsoutdiscard = "$service_name_template$.perfdata.$interface$_out_discard.value"

[snmp-int-discard.urlparams]
min = "0"
title = "Interface $interface$ Discards"
lineWidth = "2"
yUnitSystem = "si"

[snmp-int-discard.functions]
ppsindiscard = "alias(color($metric$, '#edb017'), 'Discard in (B/s)')"
ppsoutdiscard = "alias(color($metric$, '#ad7d05'), 'Discard out (B/s)')"


[snmp-int-error.graph]
check_command = "snmp-interface"

[snmp-int-error.metrics_filters]
ppsinerr = "$service_name_template$.perfdata.$interface$_in_error.value"
ppsouterr = "$service_name_template$.perfdata.$interface$_out_error.value"

[snmp-int-error.urlparams]
min = "0"
title = "Interface $interface$ Errors"
lineWidth = "2"
yUnitSystem = "si"

[snmp-int-error.functions]
ppsinerr = "alias(color($metric$, '#ff5566'), 'Error in (B/s)')"
ppsouterr = "alias(color($metric$, '#a80000'), 'Error out (B/s)')"
Screenshot of Graph

This template is usable for the snmp-interface check command from the ITL.
If you use a different command and have different perfdata value names you will have to adapt the template.
There is a part in the docs of the graphite module about templates and how they work:

2 Likes

Yeah changing it to binary didn’t solve my problem.