Open MarcoGix opened 2 years ago
Hi,
There are both "Percentage CPU" and "CPU Percentage" defined in https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/metrics-supported so I recommend to PR adding more constants but not removing the previous ones. Or maybe Isaac does a web-page parser here. ;-)
Check the unit-tests:
let sql =
sqlServer {
name "my37server"; admin_username "isaac"
add_databases [ sqlDb { name "mydb23"; sku Farmer.Sql.DtuSku.S0 } ]
}
let db = sql.Databases.Head
let resId = Farmer.Arm.Sql.databases.resourceId (sql.Name.ResourceName, db.Name) |> Managed
So DB resourceId takes 2 parameters, the server and the database. That should do. Or you could also do:
let primaryDatabaseFullId =
ArmExpression.create(
$"concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Sql/servers/', '{databaseServerName.ResourceName.Value}', '/databases/','{database.Name.Value}')"
).Eval()
Thanks for the answer!
Regarding (1) I saw that is already customizable doing for example.
MetricName = MetricsName "CpuPercentage"
I have a new question, I saw taht now alert are automatically set to
criterionType = "StaticThresholdCriterion".
There will be a future support for Dynamic too? with the Thresold Sensitivity parameters too.
The initial implementation was just an accepted PR what I wanted to have in my system. So I guess they'll accept PRs for adding supports for other parameters too.
Hi,
I tried to add alerts (thanks for this feature, we were waiting for it!) but I have 2 main issue:
Thanks in advice. Marco