Queries for the CloudHsmServiceOperationAuditLogs table

For information on using these queries in the Azure portal, see Log Analytics tutorial. For the REST API, see Query.

Are there any slow requests?

List of Cloud HSM requests taking longer than 1 second.

let threshold=1000;
CloudHsmServiceOperationAuditLogs
| where DurationMs > threshold
| summarize count() by OperationName, _ResourceId

How active has this Cloud HSM been?

Line chart showing trend of Cloud HSM requests volume, per operation over time.

CloudHsmServiceOperationAuditLogs
| summarize count() by bin(TimeGenerated, 1h), OperationName // Aggregate by hour
| render timechart

Are there any failures?

Count of failed requests by request type

CloudHsmServiceOperationAuditLogs
| where ResultType == "Failure"
| summarize count() by ResultSignature, _ResourceId