Bandwidth utilisation labels, integers only?

Support questions about the Network Weather Map plugin

Moderators: Moderators, Developers

Post Reply
Author
Message
krislee
Posts: 6
Joined: Tue Mar 14, 2017 6:49 am

Bandwidth utilisation labels, integers only?

#1 Post by krislee » Wed Mar 15, 2017 9:51 am

Good afternoon,

Is it possible to have the labels on links showing as an integer rather than with the two decimal places? [See the attached file] for example, 58% (or 59% depending on rounding) rather than 58.53%. This would make my diagrams a bit neater.

I've looked through the manual but didn't spot anything.

Regards,

Kris.
Console -_ Weathermap-Primary-WAN.png
Console -_ Weathermap-Primary-WAN.png (11.42 KiB) Viewed 602 times

User avatar
Howie
Cacti Guru User
Posts: 5337
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Bandwidth utilisation labels, integers only?

#2 Post by Howie » Mon Mar 20, 2017 12:24 pm

This should do it... (at the top of your map config file).

The %d means integer. The rest is to get the right value for the percentage.

Code: Select all

LINK DEFAULT
   INBWFORMAT {link:this:inpercent:%d}%
   OUTBWFORMAT {link:this:outpercent:%d}%
Weathermap 0.98 is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)

krislee
Posts: 6
Joined: Tue Mar 14, 2017 6:49 am

Re: Bandwidth utilisation labels, integers only?

#3 Post by krislee » Wed Mar 22, 2017 11:43 am

Thanks Howie, that's great.

Post Reply