NetXMS Support Forum

English Support => General Support => Topic started by: aengel on May 24, 2014, 03:32:14 PM

Title: DCI value format string
Post by: aengel on May 24, 2014, 03:32:14 PM
Hello,

I am trying to wrap my head around changing a format string for bandwidth into a something like "Out: 200 Kbps" for links on network maps. How can I configure this?

Thank you,
Austin
Title: Re: DCI value format string
Post by: Victor Kirhenshtein on May 24, 2014, 07:57:11 PM
Hi!

You have to define it like "Out: %s Kbps". %s will be replaced by DCI value. You can use any format specifiers allowed for Java's String.format (http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax (http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html#syntax)).

Best regards,
Victor
Title: Re: DCI value format string
Post by: aengel on May 25, 2014, 04:10:30 AM
Thank you Victor, that's what I was looking for. Now that I get data showing "201136 bits/s" how can I turn that into "201 Kbps"? Is that still done with Format String Syntax?
Title: Re: DCI value format string
Post by: Victor Kirhenshtein on May 25, 2014, 01:51:23 PM
No, you should use transformation script to convert bits into Kbits.

Best regards,
Victor
Title: Re: DCI value format string
Post by: aengel on May 25, 2014, 04:31:12 PM
Thanks for the help Victor. I love this product!
Title: Re: DCI value format string
Post by: troffasky on February 22, 2017, 12:54:31 PM
This thread is first hit on google for "netxms format string" and I was interested in this also. Further digging reveals this:

https://track.radensolutions.com/issue/NX-501

where Victor K advises to use format string %*d and it works as expected - values collected as "... traffic (bits) Delta value" are displayed as k/m/g as appropriate
Title: Re: DCI value format string
Post by: Victor Kirhenshtein on February 23, 2017, 07:17:33 PM
Yes, %* formatter was added much layter then original topic was discussed. Now it is better to collect value as is and use formatters to display in K/M/G.

Best regards,
Victor