usage values in percentage

%3CLINGO-SUB%20id%3D%22lingo-sub-1045683%22%20slang%3D%22en-US%22%3Eusage%20values%20in%20percentage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1045683%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Guys%2C%3C%2FP%3E%3CP%3EWe%20have%20enabled%20the%20Express%20Route%20Monitoring%20using%20Network%20Performance%20Monitor.%20Using%20Log%20Analytics%20(ERCircuitTotalUtilization)%20we%20can%20get%20the%20bandwidth%20usage%20of%20our%20Express%20Route%20in%20BitsInPerSecond%20and%20BitsOutPerSecond%20value%20formats.%20But%20we%20wanted%20to%20get%20these%20values%20in%20percentage.%20Can%20some%20one%20please%20provide%20me%20the%20OMS%20query%20to%20extract%20the%20bandwidth%20usage%20values%20in%20percentage%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1045683%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1054212%22%20slang%3D%22en-US%22%3ERe%3A%20usage%20values%20in%20percentage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1054212%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F338025%22%20target%3D%22_blank%22%3E%40roopesh_shetty%3C%2FA%3E%2C%26nbsp%3BI%20am%20assuming%20you%20want%20the%20percentage%20relative%20to%20the%20ER%20link%20bandwidth.%20For%20example%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%0A%3CDIV%3E%3CSPAN%3Elet%20ERLinkBandwidth%20%3D%20%3C%2FSPAN%3E%3CSPAN%3E200000000%3C%2FSPAN%3E%3CSPAN%3E%3B%20%2F%2F%20200%20Mbps%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3ENetworkMonitoring%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3E%20SubType%20%3D%3D%20%3C%2FSPAN%3E%3CSPAN%3E'ERCircuitTotalUtilization'%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Eextend%3C%2FSPAN%3E%3CSPAN%3E%20BitsInPercentage%20%3D%20todouble(BitsInPerSecond)%20%2F%20todouble(ERLinkBandwidth)%20*%20%3C%2FSPAN%3E%3CSPAN%3E100%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Esummarize%3C%2FSPAN%3E%3CSPAN%3E%20avg(BitsInPercentage)%20%3C%2FSPAN%3E%3CSPAN%3Eby%3C%2FSPAN%3E%3CSPAN%3E%20bin(TimeGenerated%2C%20%3C%2FSPAN%3E%3CSPAN%3E5%3C%2FSPAN%3E%3CSPAN%3Em)%2C%20CircuitName%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3E%7C%20%3C%2FSPAN%3E%3CSPAN%3Erender%3C%2FSPAN%3E%3CSPAN%3E%20timechart%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%3EIs%20this%20example%20close%20to%20what%20you%20need%3F%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1059562%22%20slang%3D%22en-US%22%3ERe%3A%20usage%20values%20in%20percentage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1059562%22%20slang%3D%22en-US%22%3E%3CP%3Ethanks%2C%20i%20tried%20it.%20But%20can%20see%20the%20values%20sometimes%20above%20100%25%20here.%20If%20is%20on%20percentage%20then%20the%20value%20should%20not%20cross%20100%20right%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1061259%22%20slang%3D%22en-US%22%3ERe%3A%20usage%20values%20in%20percentage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1061259%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F338025%22%20target%3D%22_blank%22%3E%40roopesh_shetty%3C%2FA%3E%26nbsp%3Bthe%20percentage%20is%20relative%20to%20ER%20bandwidth%20that%20is%20set%20in%20the%26nbsp%3B%3CSPAN%3EERLinkBandwidth%26nbsp%3Bvariable.%20I%20don't%20know%20how%20much%20bandwidth%20you%20have.%20Therefore%2C%20if%20you%20get%20more%20than%20100%25%20for%20some%20records%2C%20it%20means%20ERLinkBandwidth%20must%20be%20set%20to%20a%20higher%20value%20-%20one%20that%20truly%20represents%20the%20bandwidth%20you%20have%20available.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1062017%22%20slang%3D%22en-US%22%3ERe%3A%20usage%20values%20in%20percentage%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1062017%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F453722%22%20target%3D%22_blank%22%3E%40hspinto%3C%2FA%3E%26nbsp%3B%20got%20it%20thanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Hi Guys,

We have enabled the Express Route Monitoring using Network Performance Monitor. Using Log Analytics (ERCircuitTotalUtilization) we can get the bandwidth usage of our Express Route in BitsInPerSecond and BitsOutPerSecond value formats. But we wanted to get these values in percentage. Can some one please provide me the OMS query to extract the bandwidth usage values in percentage?

4 Replies
Highlighted

@roopesh_shetty, I am assuming you want the percentage relative to the ER link bandwidth. For example:

 

let ERLinkBandwidth = 200000000; // 200 Mbps
NetworkMonitoring
| where SubType == 'ERCircuitTotalUtilization'
| extend BitsInPercentage = todouble(BitsInPerSecond) / todouble(ERLinkBandwidth) * 100
| summarize avg(BitsInPercentage) by bin(TimeGenerated, 5m), CircuitName
| render timechart
 
Is this example close to what you need?
Highlighted

thanks, i tried it. But can see the values sometimes above 100% here. If is on percentage then the value should not cross 100 right?

Highlighted

@roopesh_shetty the percentage is relative to ER bandwidth that is set in the ERLinkBandwidth variable. I don't know how much bandwidth you have. Therefore, if you get more than 100% for some records, it means ERLinkBandwidth must be set to a higher value - one that truly represents the bandwidth you have available.

Highlighted

@hspinto  got it thanks.