 # Counters Frequency and costs

Hi all
I need to understand a way of calculating each VM Performance Counter frequency and associated costs.
I get that Log Analytics charges you for Data Ingestion, correct?
So if I have one perf counter (e.g. Memory %) configured to probe each 10 seconds, I would save costs by modifying it to, lets say, 30 seconds.
However I don't understand how to calculate how much space is one perf counter probe using.

It's a silly question but I can't find any straightforward way of calculating how much I can save/expend by tweaking the frequency of the performance counters.

Thank you in advance.

1 Reply

# Re: Counters Frequency and costs

You can see how much data a counter used in 10s, 30s etc...

``````Perf
| where CounterName == "% Processor Time" and  InstanceName == "_Total"
| summarize TotalGBytes = sum(_BilledSize / (1024*1024*1024)) by bin(TimeGenerated, 10s) ``````

Go to Log Analytics and Run Query

I have a few posts along similar lines: https://cloudblogs.microsoft.com/industry-blog/en-gb/cross-industry/2019/07/22/azure-log-analytics-l...

You might need to see Bytes, to find the average per time period

``````Perf
| where CounterName == "% Processor Time" and  InstanceName == "_Total"
| summarize TotalBytes = avg(_BilledSize) by bin(TimeGenerated, 10s)
``````
TimeGenerated TotalBytes
2019-09-01T23:26:10Z 225.203125
2019-09-01T23:26:20Z 224.793893129771
2019-09-01T23:26:30Z 224.40458015267177
2019-09-01T23:26:40Z 224.29007633587787
2019-09-01T23:26:50Z 224.74418604651163