user1396982
user1396982

Reputation: 125

how to create convert metrics on KQL

I am trying the KQL query currently they gave me Bits/sec out put and I want to Gigabits/sec on interface speed instead of bit per sec.

enter image description here

  current out put. 

 networkInterfaces_IN       networkInterfaces_OUT
 983,777,544,056             834,528,195,752
 83,777,544,0568             734,528,195,752

Thanks!

Upvotes: 0

Views: 1110

Answers (1)

RajkumarPalnati
RajkumarPalnati

Reputation: 689

  • Try to use format_bytes() to convert your input from Bits to Gigabits.
  • The syntax for the format_bytes() as below,
    format_bytes(value [, precision [, units]])
    value: The number which you need to pass as a data in bytes.
    precision: By default it's 0, it's the number of digits which you need to round. (optional)
    units: It's a result data size which is in string format, like Bytes, KB, MB, GB, TB. (optional)

You should be aware of conversion values, like for example 1024 bytes is equal to 1 KB.

For more information regarding the same, you can refer this below,

  1. format-bytes function
  2. Function to convert bytes into KB MB GB TB PB, etc.,
  3. Convert bits per second to gigabit/second

Upvotes: 1

Related Questions