This repository has been archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
87 changed files
with
1,142 additions
and
363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
docs/content/services/compute/site-recovery/code/asr-1/asr-1.kql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
// under-development | ||
// cannot-be-validated-with-arg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 1 addition & 7 deletions
8
docs/content/services/compute/virtual-machine-scale-sets/code/vmss-10/vmss-10.kql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1 @@ | ||
// Azure Resource Graph Query | ||
// This query will check if the VMSS are currently using the latest image. If not the Image reference will be empty | ||
resources | ||
| where type == "microsoft.compute/virtualmachinescalesets" | ||
| extend VMSSName = name | ||
| extend ImageReference = tostring(properties.virtualMachineProfile.storageProfile.imageReference.version) | ||
| project recommendationId="vmss-10",name,id, tags, param1="ImageReference" | ||
//cannot be validated with arg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,25 @@ | ||
// cannot-be-validated-with-arg | ||
// Azure Resource Graph Query | ||
// Returns each AKS cluster with nodepools that have user nodepools with a subnetmask that does not match autoscale configured max-nodes | ||
// Subtracting the network address, broadcast address, and default 3 addresses Azure reserves within each subnet | ||
|
||
resources | ||
| where type == "microsoft.containerservice/managedclusters" | ||
| extend nodePools = properties['agentPoolProfiles'] | ||
| mv-expand nodePools = properties.agentPoolProfiles | ||
| where nodePools.enableAutoScaling == true | ||
| extend nodePoolName=nodePools.name, maxNodes = nodePools.maxCount, subnetId = tostring(nodePools.vnetSubnetID) | ||
| project clusterId = id, clusterName=name, nodePoolName=nodePools.name, toint(maxNodes), subnetId | ||
| join kind = leftouter ( | ||
resources | ||
| where type == 'microsoft.network/virtualnetworks' | ||
| extend subnets = properties.subnets | ||
| mv-expand subnets | ||
| project id = tostring(subnets.id), addressPrefix = tostring(subnets.properties['addressPrefix']) | ||
| extend subnetmask = toint(substring(addressPrefix, indexof(addressPrefix, '/')+1, string_size(addressPrefix))) | ||
| extend possibleMaxNodeCount = toint(exp2(32-subnetmask) - 5) | ||
) on $left.subnetId == $right.id | ||
| project-away id, subnetmask | ||
| where possibleMaxNodeCount <= maxNodes | ||
| extend param1 = strcat(nodePoolName, " autoscaler upper limit: ", maxNodes) | ||
| extend param2 = strcat("ip addresses on subnet: ", possibleMaxNodeCount) | ||
| project recommendationId="aks-23", name=clusterName, id=clusterId, param1, param2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.