-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide script to retrieve quota metrics from IoT Hub #137
Comments
Q: in what way is this different from: |
The script in the Codit repo retrieves one specific quota metric of an IoT Hub (Total Messages), and applies a (specified) percentage to it. The result of that script can then be used when creating an alert on IoT Hub that is triggered when the daily amount of messages that you have received, is reaching the quota / limit of that iothub. (The alert that I'm talking about, is also available in the repo that @mbraekman mentionned: https://github.com/Codit/platform-operations-practice/tree/main/alerting/catalog/templates/iothub) |
Ok, but we can still use the |
So, this would be enough, right? $quotaMetric = Get-AzIotHubQuotaMetric -Name $IoTHubName -ResourceGroupName $ResourceGroupName
$result = [Math]::Round($quotaMetric.MaxValue * $QuotaPercentage) |
Is your feature request related to a problem? Please describe.
As part of the setup for alert-creations for IoT Hub, a script has been included which allows you to determine the current quota of messages.
As this could be useful outside of that specific use-case, would form a nice addition for a new module
Arcus.Scripting.IoT.Hub
Describe the solution you'd like
The current version of the script can be found in the CoditEU/platform-operations-specialization-area repo at the following location:
/platform-operations-specialization-area/alerting/catalog/templates/iothub/determine-messagequota-used-threshold.ps1
This is to be updated to ensure it aligns with the current naming conventions as used across all Arcus.Scripting-modules, as well as implement the suggested changes (parameterization) from the source-repo.
For more context, see the mentioned repo.
Credits: @fgheysels
The text was updated successfully, but these errors were encountered: