@@ -439,24 +439,24 @@ The tool needs three required inputs: **RPM** (requests per minute), **avg input
439439
440440#### Option A — Azure CLI (no Log Analytics)
441441
442- Copy-paste this script — it queries the last 7 days and prints your three inputs:
442+ Copy-paste this script — it queries the last 30 days and prints your three inputs:
443443
444444``` bash
445445# Replace {sub}, {rg}, {name} with your values
446446RES=" /subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.CognitiveServices/accounts/{name}"
447- START=$( date -u -d " 7 days ago" +%Y-%m-%dT%H:%M:%SZ)
447+ START=$( date -u -d " 30 days ago" +%Y-%m-%dT%H:%M:%SZ)
448448END=$( date -u +%Y-%m-%dT%H:%M:%SZ)
449449
450450REQS=$( az monitor metrics list --resource " $RES " --metric AzureOpenAIRequests \
451- --aggregation Total --interval P7D --start-time " $START " --end-time " $END " \
451+ --aggregation Total --interval P30D --start-time " $START " --end-time " $END " \
452452 --query " value[0].timeseries[0].data[0].total" -o tsv)
453453
454454INPUT=$( az monitor metrics list --resource " $RES " --metric ProcessedPromptTokens \
455- --aggregation Total --interval P7D --start-time " $START " --end-time " $END " \
455+ --aggregation Total --interval P30D --start-time " $START " --end-time " $END " \
456456 --query " value[0].timeseries[0].data[0].total" -o tsv)
457457
458458OUTPUT=$( az monitor metrics list --resource " $RES " --metric GeneratedTokens \
459- --aggregation Total --interval P7D --start-time " $START " --end-time " $END " \
459+ --aggregation Total --interval P30D --start-time " $START " --end-time " $END " \
460460 --query " value[0].timeseries[0].data[0].total" -o tsv)
461461
462462PEAK=$( az monitor metrics list --resource " $RES " --metric AzureOpenAIRequests \
@@ -476,7 +476,7 @@ Enable diagnostic settings on your OpenAI resource → send to Log Analytics, th
476476``` kql
477477AzureMetrics
478478| where ResourceProvider == "MICROSOFT.COGNITIVESERVICES"
479- | where TimeGenerated >= ago(7d )
479+ | where TimeGenerated >= ago(30d )
480480| summarize
481481 TotalRequests = sumif(Total, MetricName == "AzureOpenAIRequests"),
482482 TotalInputTok = sumif(Total, MetricName == "ProcessedPromptTokens"),
0 commit comments