I have a requirement to auto scale a Stream Analytics Job based on CPU utilization. I tried using the out of the box utilization alerts, but this caused problems when the scale operation failed; it would never fire the scale operation again. I changed to a custom kusto query based on AzureMetrics. This works well, and also triggers the alerts every time it evaluates the query.
The problem is it triggers the alerts every time it evaluates the query, so also keeps firing scale down alerts when the Stream Analytics job is already scaled at 1. I am now looking into including the Stream Analytics scale logging in the query, to prevent the alert from firing when the Stream Analytics is already scaled at 1 and wants to scale down, or 120 and wants to scale up. There is logging I can use for this, under the JobScaling operation, but for some reason it never logs scale operations below 6, even though it frequently scaled down below 6.