Invoke-AzIotHubConfigurationMetricsQuery
Invoke an IoT device configuration metric query.
Syntax
Invoke-AzIotHubConfigurationMetricsQuery
[-ResourceGroupName] <String>
[-IotHubName] <String>
-Name <String>
-MetricName <String>
[-MetricType <PSConfigurationMetricType>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-AzIotHubConfigurationMetricsQuery
[-InputObject] <PSIotHub>
-Name <String>
-MetricName <String>
[-MetricType <PSConfigurationMetricType>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Invoke-AzIotHubConfigurationMetricsQuery
[-ResourceId] <String>
-Name <String>
-MetricName <String>
[-MetricType <PSConfigurationMetricType>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Evaluate a target custom or system metric defined in an IoT device configuration. There are pre-defined system metrics which are calculated by Iot Hub and cannot be customized.
- "Targeted" specifies the number of device twins that match the target condition.
- "Applied" specified the number of device twins that have been modified by the configuration.
Examples
Example 1
PS C:\> Invoke-AzIotHubConfigurationMetricsQuery -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -Name "myConfig1" -MetricName "warningLimit"
Evaluate the custom defined 'warningLimit' metric.
Example 2
PS C:\> Invoke-AzIotHubConfigMetric -ResourceGroupName "myresourcegroup" -IotHubName "myiothub" -Name "myConfig1" -MetricName "applied" -MetricType "system"
Evaluate the system 'applied' metric.
Parameters
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
IotHub object
Type: | PSIotHub |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Name of the Iot Hub
Type: | String |
Position: | 1 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Target metric for evaluation.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Indicates which metric collection should be used to lookup a metric.
Type: | Microsoft.Azure.Commands.Management.IotHub.Models.PSConfigurationMetricType |
Accepted values: | Custom, System |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Identifier for the configuration.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Name of the Resource Group
Type: | String |
Position: | 0 |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
IotHub Resource Id
Type: | String |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Outputs
Microsoft.Azure.Commands.Management.IotHub.Models.PSConfigurationMetricsResult