Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://cpim.kusto.windows.net
- // Detect invalid DCs
- | extend DC = iff(env_cloud_location == "<null>", extract("PROD-(.*?)-0*", 1, env_cloud_name), env_cloud_location)
- // Find all role instances
- IfxRequestEvent
- | where env_time > ago(1d)
- | where env_cloud_role == "TPEngine"
- | where env_cloud_location == "AM3"
- | extend instance = substring(env_cloud_roleInstance, 0, 3)
- | summarize count() by instance
- // Find # of running tasks from Redis Timeout log.
- let Start = datetime({startTime});
- let End = datetime({endTime});
- IfxRedisRequestEvent
- | where env_time between (Start .. End)
- | where role == "TPEngine"
- | where env_cloud_location == "AM3"
- | where env_cloud_roleInstance == "AM4PEPF0001615B"
- | where isSynthetic == false
- | where resultSignature == "StackExchange.Redis.RedisTimeoutException"
- | extend BusyCount = toint(extract_all("Busy=(\\d+),", resultDescription)[1])
- | extend start_time = datetime_add("millisecond", -durationMs, env_time)
- | summarize CpuTask=avg(BusyCount) by bin(start_time, 1m)
- // Find # of tasks from IfxRequest logs.
- union Ifx*
- | where env_time between (datetime("2022-03-18T05:00:00.000Z") .. datetime("2022-03-18T10:00:00.000Z"))
- | where role == "TPEngine"
- | where env_cloud_location == "AM3"
- | where env_cloud_roleInstance == "AM4PEPF0001615B"
- | summarize TPEngineTask=dcount(threadId_uint16) by bin(env_time, 1m)
- | render timechart
- // Getting performance counter
- let Start = datetime({startTime});
- let End = datetime({endTime});
- let InstanceToFind = split("{CDBInstance}", ",")[0];
- CounterEvent
- | where TIMESTAMP between (Start .. End)
- | where Role == "TPEngine"
- | where DataCenter == "{CDBDataCenter}"
- | where CounterName == "\\Processor(_Total)\\% Processor Time"
- | where substring(RoleInstance, 0, 3) == InstanceToFind
- | summarize max(CounterValue) by RoleInstance, bin(TIMESTAMP, {TimeDiv})
Advertisement
RAW Paste Data
Copied
Advertisement