Metric name for “Count of dead-lettered messages in a Queue/Topic. (Preview)” Azure The Next CEO of Stack OverflowARM template webtest alertrule fails with ResourceNotFoundARM Template - AlertRules - UnsupporedMetricAdding topics and subscriptions via a script to my Azure queueCreating Azure Function with Http5xx Alert via ARM template failsin azure logic app submit the message from dead letter queue to topichow to configure the new alerts in azure monitor using ARM templates?Service Bus Topic/Queue Monitoring for size getting closer to it's limitAzure log alert rule created successfully with ARM template but not appearing in portalHow to get the Azure Data Factory parameters into the ARM template parameters file (ARMTemplateParametersForFactory.json) after publishingIs it possible to retrieve the oms workspace id inside my ARM template

Term for the "extreme-extension" version of a straw man fallacy?

Does it take more energy to get to Venus or to Mars?

Return the Closest Prime Number

Why do remote companies require working in the US?

When airplanes disconnect from a tanker during air to air refueling, why do they bank so sharply to the right?

How easy is it to start Magic from scratch?

Does the Brexit deal have to be agreed by both Houses?

Where to find order of arguments for default functions

Should I tutor a student who I know has cheated on their homework?

Apart from "berlinern", do any other German dialects have a corresponding verb?

How to safely derail a train during transit?

Science fiction novels about a solar system spanning civilisation where people change their bodies at will

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

What is the difference between "behavior" and "behaviour"?

How do I construct this japanese bowl?

Solution of this Diophantine Equation

If the heap is initialized for security, then why is the stack uninitialized?

A pseudo-riley?

What is the purpose of the Evocation wizard's Potent Cantrip feature?

How do spells that require an ability check vs. the caster's spell save DC work?

Can a single photon have an energy density?

What happens if you roll doubles 3 times then land on "Go to jail?"

The King's new dress

Only print output after finding pattern



Metric name for “Count of dead-lettered messages in a Queue/Topic. (Preview)” Azure



The Next CEO of Stack OverflowARM template webtest alertrule fails with ResourceNotFoundARM Template - AlertRules - UnsupporedMetricAdding topics and subscriptions via a script to my Azure queueCreating Azure Function with Http5xx Alert via ARM template failsin azure logic app submit the message from dead letter queue to topichow to configure the new alerts in azure monitor using ARM templates?Service Bus Topic/Queue Monitoring for size getting closer to it's limitAzure log alert rule created successfully with ARM template but not appearing in portalHow to get the Azure Data Factory parameters into the ARM template parameters file (ARMTemplateParametersForFactory.json) after publishingIs it possible to retrieve the oms workspace id inside my ARM template










0















For our continuous deployment, we want to set up alert rules for deadlettered messages in a topic. On azure portal, this metric exists as a preview feature. We would like to create this alert rule via ARM templates.



Is there a metric name already that I can use for this in my ARM template parameters?
If not, when will it be possible to use this metric in our ARM templates?



Please see metric name is not listed here: https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftservicebusnamespaces



But it is possible to manually create an alert rule and select this metric:
enter image description here










share|improve this question


























    0















    For our continuous deployment, we want to set up alert rules for deadlettered messages in a topic. On azure portal, this metric exists as a preview feature. We would like to create this alert rule via ARM templates.



    Is there a metric name already that I can use for this in my ARM template parameters?
    If not, when will it be possible to use this metric in our ARM templates?



    Please see metric name is not listed here: https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftservicebusnamespaces



    But it is possible to manually create an alert rule and select this metric:
    enter image description here










    share|improve this question
























      0












      0








      0








      For our continuous deployment, we want to set up alert rules for deadlettered messages in a topic. On azure portal, this metric exists as a preview feature. We would like to create this alert rule via ARM templates.



      Is there a metric name already that I can use for this in my ARM template parameters?
      If not, when will it be possible to use this metric in our ARM templates?



      Please see metric name is not listed here: https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftservicebusnamespaces



      But it is possible to manually create an alert rule and select this metric:
      enter image description here










      share|improve this question














      For our continuous deployment, we want to set up alert rules for deadlettered messages in a topic. On azure portal, this metric exists as a preview feature. We would like to create this alert rule via ARM templates.



      Is there a metric name already that I can use for this in my ARM template parameters?
      If not, when will it be possible to use this metric in our ARM templates?



      Please see metric name is not listed here: https://docs.microsoft.com/en-us/azure/azure-monitor/platform/metrics-supported#microsoftservicebusnamespaces



      But it is possible to manually create an alert rule and select this metric:
      enter image description here







      azure azure-devops azureservicebus azure-servicebus-topics






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 21 at 16:29









      tubakayatubakaya

      386




      386






















          2 Answers
          2






          active

          oldest

          votes


















          2














          Here is the ARM Template for Creating Metric Alert Count of dead lettered messages in a Queue/Topic:



           
          "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
          "contentVersion": "1.0.0.0",
          "parameters":
          "alertName":
          "type": "string",
          "minLength": 1,
          "metadata":
          "description": "Name of the alert"

          ,
          "alertDescription":
          "type": "string",
          "defaultValue": "This is a metric alert",
          "metadata":
          "description": "Description of alert"

          ,
          "alertSeverity":
          "type": "int",
          "defaultValue": 3,
          "allowedValues": [
          0,
          1,
          2,
          3,
          4
          ],
          "metadata":
          "description": "Severity of alert 0,1,2,3,4"

          ,
          "isEnabled":
          "type": "bool",
          "defaultValue": true,
          "metadata":
          "description": "Specifies whether the alert is enabled"

          ,
          "resourceId":
          "type": "string",
          "minLength": 1,
          "metadata":
          "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"

          ,
          "metricName":
          "type": "string",
          "minLength": 1,
          "metadata":
          "description": "Name of the metric used in the comparison to activate the alert."

          ,
          "operator":
          "type": "string",
          "defaultValue": "GreaterThan",
          "allowedValues": [
          "Equals",
          "NotEquals",
          "GreaterThan",
          "GreaterThanOrEqual",
          "LessThan",
          "LessThanOrEqual"
          ],
          "metadata":
          "description": "Operator comparing the current value with the threshold value."

          ,
          "threshold":
          "type": "string",
          "defaultValue": "0",
          "metadata":
          "description": "The threshold value at which the alert is activated."

          ,
          "timeAggregation":
          "type": "string",
          "defaultValue": "Average",
          "allowedValues": [
          "Average",
          "Minimum",
          "Maximum",
          "Total"
          ],
          "metadata":
          "description": "How the data that is collected should be combined over time."

          ,
          "windowSize":
          "type": "string",
          "defaultValue": "PT5M",
          "metadata":
          "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one day. ISO 8601 duration format."

          ,
          "evaluationFrequency":
          "type": "string",
          "defaultValue": "PT1M",
          "metadata":
          "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"


          ,
          "variables": ,
          "resources": [

          "apiVersion": "2018-03-01",
          "type": "Microsoft.Insights/ActionGroups",
          "name": "testAG12",
          "location": "Global",
          "kind": null,
          "tags": ,
          "properties":
          "groupShortName": "testAg",
          "enabled": true,
          "emailReceivers": [

          "name": "emailservice_-EmailAction-",
          "emailAddress": "email@contoso.com",
          "status": "Enabled",
          "useCommonAlertSchema": false

          ],
          "smsReceivers": [],
          "webhookReceivers": [],
          "itsmReceivers": [],
          "azureAppPushReceivers": [],
          "automationRunbookReceivers": [],
          "voiceReceivers": [],
          "logicAppReceivers": [],
          "azureFunctionReceivers": [],
          "armRoleReceivers": []
          ,
          "identity": null
          ,

          "name": "[parameters('alertName')]",
          "type": "Microsoft.Insights/metricAlerts",
          "location": "global",
          "apiVersion": "2018-03-01",
          "tags": ,
          "properties":
          "description": "[parameters('alertDescription')]",
          "severity": "[parameters('alertSeverity')]",
          "enabled": "[parameters('isEnabled')]",
          "scopes": [ "[parameters('resourceId')]" ],
          "evaluationFrequency": "[parameters('evaluationFrequency')]",
          "windowSize": "[parameters('windowSize')]",
          "criteria":
          "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria",
          "allOf": [

          "name": "1st criterion",
          "metricName": "[parameters('metricName')]",
          "metricNamespace": "microsoft.servicebus/namespaces",
          "dimensions": [],
          "operator": "[parameters('operator')]",
          "threshold": "[parameters('threshold')]",
          "timeAggregation": "[parameters('timeAggregation')]"

          ]
          ,
          "actions": [

          "actionGroupId": "[resourceId('Microsoft.Insights/ActionGroups', 'testAG12')]"

          ]


          ]



          Pass the below important values to the parameters:



          Metric Name : DeadletteredMessages
          Time Aggregation : Average
          Resource Id: Resource ID of your Service Bus Namespace. You can get this from the properties of the service bus blade as shown in below image


          enter image description hereenter image description here






          share|improve this answer























          • Thank you very much! Could you please let me know how you got to the screen from the second screenshot (with Settings) on the portal? Or in other words, how did you find the Metric Name? Then I can learn better how to find other metric names when I need them.

            – tubakaya
            Mar 22 at 13:57












          • The second screenshot is actually a template deployment from the portal. Login to portal.azure.com > All Services > Search for Template docs.microsoft.com/en-us/azure/azure-resource-manager/… You can paste the template mentioned in my answer and you will see the same UI.

            – KetanChawda-MSFT
            Mar 22 at 15:07











          • Awesome, thanks!

            – tubakaya
            Mar 22 at 15:10


















          0














          I realized I forgot about "Export Template" feature in Azure portal. Upon manually creating the alert rules or any resources, resource group can be exported as ARM template. Here I was able to locate to resources that contain template content to generate the manually created resource.



          enter image description here






          share|improve this answer

























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55285107%2fmetric-name-for-count-of-dead-lettered-messages-in-a-queue-topic-preview-az%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            Here is the ARM Template for Creating Metric Alert Count of dead lettered messages in a Queue/Topic:



             
            "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
            "contentVersion": "1.0.0.0",
            "parameters":
            "alertName":
            "type": "string",
            "minLength": 1,
            "metadata":
            "description": "Name of the alert"

            ,
            "alertDescription":
            "type": "string",
            "defaultValue": "This is a metric alert",
            "metadata":
            "description": "Description of alert"

            ,
            "alertSeverity":
            "type": "int",
            "defaultValue": 3,
            "allowedValues": [
            0,
            1,
            2,
            3,
            4
            ],
            "metadata":
            "description": "Severity of alert 0,1,2,3,4"

            ,
            "isEnabled":
            "type": "bool",
            "defaultValue": true,
            "metadata":
            "description": "Specifies whether the alert is enabled"

            ,
            "resourceId":
            "type": "string",
            "minLength": 1,
            "metadata":
            "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"

            ,
            "metricName":
            "type": "string",
            "minLength": 1,
            "metadata":
            "description": "Name of the metric used in the comparison to activate the alert."

            ,
            "operator":
            "type": "string",
            "defaultValue": "GreaterThan",
            "allowedValues": [
            "Equals",
            "NotEquals",
            "GreaterThan",
            "GreaterThanOrEqual",
            "LessThan",
            "LessThanOrEqual"
            ],
            "metadata":
            "description": "Operator comparing the current value with the threshold value."

            ,
            "threshold":
            "type": "string",
            "defaultValue": "0",
            "metadata":
            "description": "The threshold value at which the alert is activated."

            ,
            "timeAggregation":
            "type": "string",
            "defaultValue": "Average",
            "allowedValues": [
            "Average",
            "Minimum",
            "Maximum",
            "Total"
            ],
            "metadata":
            "description": "How the data that is collected should be combined over time."

            ,
            "windowSize":
            "type": "string",
            "defaultValue": "PT5M",
            "metadata":
            "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one day. ISO 8601 duration format."

            ,
            "evaluationFrequency":
            "type": "string",
            "defaultValue": "PT1M",
            "metadata":
            "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"


            ,
            "variables": ,
            "resources": [

            "apiVersion": "2018-03-01",
            "type": "Microsoft.Insights/ActionGroups",
            "name": "testAG12",
            "location": "Global",
            "kind": null,
            "tags": ,
            "properties":
            "groupShortName": "testAg",
            "enabled": true,
            "emailReceivers": [

            "name": "emailservice_-EmailAction-",
            "emailAddress": "email@contoso.com",
            "status": "Enabled",
            "useCommonAlertSchema": false

            ],
            "smsReceivers": [],
            "webhookReceivers": [],
            "itsmReceivers": [],
            "azureAppPushReceivers": [],
            "automationRunbookReceivers": [],
            "voiceReceivers": [],
            "logicAppReceivers": [],
            "azureFunctionReceivers": [],
            "armRoleReceivers": []
            ,
            "identity": null
            ,

            "name": "[parameters('alertName')]",
            "type": "Microsoft.Insights/metricAlerts",
            "location": "global",
            "apiVersion": "2018-03-01",
            "tags": ,
            "properties":
            "description": "[parameters('alertDescription')]",
            "severity": "[parameters('alertSeverity')]",
            "enabled": "[parameters('isEnabled')]",
            "scopes": [ "[parameters('resourceId')]" ],
            "evaluationFrequency": "[parameters('evaluationFrequency')]",
            "windowSize": "[parameters('windowSize')]",
            "criteria":
            "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria",
            "allOf": [

            "name": "1st criterion",
            "metricName": "[parameters('metricName')]",
            "metricNamespace": "microsoft.servicebus/namespaces",
            "dimensions": [],
            "operator": "[parameters('operator')]",
            "threshold": "[parameters('threshold')]",
            "timeAggregation": "[parameters('timeAggregation')]"

            ]
            ,
            "actions": [

            "actionGroupId": "[resourceId('Microsoft.Insights/ActionGroups', 'testAG12')]"

            ]


            ]



            Pass the below important values to the parameters:



            Metric Name : DeadletteredMessages
            Time Aggregation : Average
            Resource Id: Resource ID of your Service Bus Namespace. You can get this from the properties of the service bus blade as shown in below image


            enter image description hereenter image description here






            share|improve this answer























            • Thank you very much! Could you please let me know how you got to the screen from the second screenshot (with Settings) on the portal? Or in other words, how did you find the Metric Name? Then I can learn better how to find other metric names when I need them.

              – tubakaya
              Mar 22 at 13:57












            • The second screenshot is actually a template deployment from the portal. Login to portal.azure.com > All Services > Search for Template docs.microsoft.com/en-us/azure/azure-resource-manager/… You can paste the template mentioned in my answer and you will see the same UI.

              – KetanChawda-MSFT
              Mar 22 at 15:07











            • Awesome, thanks!

              – tubakaya
              Mar 22 at 15:10















            2














            Here is the ARM Template for Creating Metric Alert Count of dead lettered messages in a Queue/Topic:



             
            "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
            "contentVersion": "1.0.0.0",
            "parameters":
            "alertName":
            "type": "string",
            "minLength": 1,
            "metadata":
            "description": "Name of the alert"

            ,
            "alertDescription":
            "type": "string",
            "defaultValue": "This is a metric alert",
            "metadata":
            "description": "Description of alert"

            ,
            "alertSeverity":
            "type": "int",
            "defaultValue": 3,
            "allowedValues": [
            0,
            1,
            2,
            3,
            4
            ],
            "metadata":
            "description": "Severity of alert 0,1,2,3,4"

            ,
            "isEnabled":
            "type": "bool",
            "defaultValue": true,
            "metadata":
            "description": "Specifies whether the alert is enabled"

            ,
            "resourceId":
            "type": "string",
            "minLength": 1,
            "metadata":
            "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"

            ,
            "metricName":
            "type": "string",
            "minLength": 1,
            "metadata":
            "description": "Name of the metric used in the comparison to activate the alert."

            ,
            "operator":
            "type": "string",
            "defaultValue": "GreaterThan",
            "allowedValues": [
            "Equals",
            "NotEquals",
            "GreaterThan",
            "GreaterThanOrEqual",
            "LessThan",
            "LessThanOrEqual"
            ],
            "metadata":
            "description": "Operator comparing the current value with the threshold value."

            ,
            "threshold":
            "type": "string",
            "defaultValue": "0",
            "metadata":
            "description": "The threshold value at which the alert is activated."

            ,
            "timeAggregation":
            "type": "string",
            "defaultValue": "Average",
            "allowedValues": [
            "Average",
            "Minimum",
            "Maximum",
            "Total"
            ],
            "metadata":
            "description": "How the data that is collected should be combined over time."

            ,
            "windowSize":
            "type": "string",
            "defaultValue": "PT5M",
            "metadata":
            "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one day. ISO 8601 duration format."

            ,
            "evaluationFrequency":
            "type": "string",
            "defaultValue": "PT1M",
            "metadata":
            "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"


            ,
            "variables": ,
            "resources": [

            "apiVersion": "2018-03-01",
            "type": "Microsoft.Insights/ActionGroups",
            "name": "testAG12",
            "location": "Global",
            "kind": null,
            "tags": ,
            "properties":
            "groupShortName": "testAg",
            "enabled": true,
            "emailReceivers": [

            "name": "emailservice_-EmailAction-",
            "emailAddress": "email@contoso.com",
            "status": "Enabled",
            "useCommonAlertSchema": false

            ],
            "smsReceivers": [],
            "webhookReceivers": [],
            "itsmReceivers": [],
            "azureAppPushReceivers": [],
            "automationRunbookReceivers": [],
            "voiceReceivers": [],
            "logicAppReceivers": [],
            "azureFunctionReceivers": [],
            "armRoleReceivers": []
            ,
            "identity": null
            ,

            "name": "[parameters('alertName')]",
            "type": "Microsoft.Insights/metricAlerts",
            "location": "global",
            "apiVersion": "2018-03-01",
            "tags": ,
            "properties":
            "description": "[parameters('alertDescription')]",
            "severity": "[parameters('alertSeverity')]",
            "enabled": "[parameters('isEnabled')]",
            "scopes": [ "[parameters('resourceId')]" ],
            "evaluationFrequency": "[parameters('evaluationFrequency')]",
            "windowSize": "[parameters('windowSize')]",
            "criteria":
            "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria",
            "allOf": [

            "name": "1st criterion",
            "metricName": "[parameters('metricName')]",
            "metricNamespace": "microsoft.servicebus/namespaces",
            "dimensions": [],
            "operator": "[parameters('operator')]",
            "threshold": "[parameters('threshold')]",
            "timeAggregation": "[parameters('timeAggregation')]"

            ]
            ,
            "actions": [

            "actionGroupId": "[resourceId('Microsoft.Insights/ActionGroups', 'testAG12')]"

            ]


            ]



            Pass the below important values to the parameters:



            Metric Name : DeadletteredMessages
            Time Aggregation : Average
            Resource Id: Resource ID of your Service Bus Namespace. You can get this from the properties of the service bus blade as shown in below image


            enter image description hereenter image description here






            share|improve this answer























            • Thank you very much! Could you please let me know how you got to the screen from the second screenshot (with Settings) on the portal? Or in other words, how did you find the Metric Name? Then I can learn better how to find other metric names when I need them.

              – tubakaya
              Mar 22 at 13:57












            • The second screenshot is actually a template deployment from the portal. Login to portal.azure.com > All Services > Search for Template docs.microsoft.com/en-us/azure/azure-resource-manager/… You can paste the template mentioned in my answer and you will see the same UI.

              – KetanChawda-MSFT
              Mar 22 at 15:07











            • Awesome, thanks!

              – tubakaya
              Mar 22 at 15:10













            2












            2








            2







            Here is the ARM Template for Creating Metric Alert Count of dead lettered messages in a Queue/Topic:



             
            "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
            "contentVersion": "1.0.0.0",
            "parameters":
            "alertName":
            "type": "string",
            "minLength": 1,
            "metadata":
            "description": "Name of the alert"

            ,
            "alertDescription":
            "type": "string",
            "defaultValue": "This is a metric alert",
            "metadata":
            "description": "Description of alert"

            ,
            "alertSeverity":
            "type": "int",
            "defaultValue": 3,
            "allowedValues": [
            0,
            1,
            2,
            3,
            4
            ],
            "metadata":
            "description": "Severity of alert 0,1,2,3,4"

            ,
            "isEnabled":
            "type": "bool",
            "defaultValue": true,
            "metadata":
            "description": "Specifies whether the alert is enabled"

            ,
            "resourceId":
            "type": "string",
            "minLength": 1,
            "metadata":
            "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"

            ,
            "metricName":
            "type": "string",
            "minLength": 1,
            "metadata":
            "description": "Name of the metric used in the comparison to activate the alert."

            ,
            "operator":
            "type": "string",
            "defaultValue": "GreaterThan",
            "allowedValues": [
            "Equals",
            "NotEquals",
            "GreaterThan",
            "GreaterThanOrEqual",
            "LessThan",
            "LessThanOrEqual"
            ],
            "metadata":
            "description": "Operator comparing the current value with the threshold value."

            ,
            "threshold":
            "type": "string",
            "defaultValue": "0",
            "metadata":
            "description": "The threshold value at which the alert is activated."

            ,
            "timeAggregation":
            "type": "string",
            "defaultValue": "Average",
            "allowedValues": [
            "Average",
            "Minimum",
            "Maximum",
            "Total"
            ],
            "metadata":
            "description": "How the data that is collected should be combined over time."

            ,
            "windowSize":
            "type": "string",
            "defaultValue": "PT5M",
            "metadata":
            "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one day. ISO 8601 duration format."

            ,
            "evaluationFrequency":
            "type": "string",
            "defaultValue": "PT1M",
            "metadata":
            "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"


            ,
            "variables": ,
            "resources": [

            "apiVersion": "2018-03-01",
            "type": "Microsoft.Insights/ActionGroups",
            "name": "testAG12",
            "location": "Global",
            "kind": null,
            "tags": ,
            "properties":
            "groupShortName": "testAg",
            "enabled": true,
            "emailReceivers": [

            "name": "emailservice_-EmailAction-",
            "emailAddress": "email@contoso.com",
            "status": "Enabled",
            "useCommonAlertSchema": false

            ],
            "smsReceivers": [],
            "webhookReceivers": [],
            "itsmReceivers": [],
            "azureAppPushReceivers": [],
            "automationRunbookReceivers": [],
            "voiceReceivers": [],
            "logicAppReceivers": [],
            "azureFunctionReceivers": [],
            "armRoleReceivers": []
            ,
            "identity": null
            ,

            "name": "[parameters('alertName')]",
            "type": "Microsoft.Insights/metricAlerts",
            "location": "global",
            "apiVersion": "2018-03-01",
            "tags": ,
            "properties":
            "description": "[parameters('alertDescription')]",
            "severity": "[parameters('alertSeverity')]",
            "enabled": "[parameters('isEnabled')]",
            "scopes": [ "[parameters('resourceId')]" ],
            "evaluationFrequency": "[parameters('evaluationFrequency')]",
            "windowSize": "[parameters('windowSize')]",
            "criteria":
            "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria",
            "allOf": [

            "name": "1st criterion",
            "metricName": "[parameters('metricName')]",
            "metricNamespace": "microsoft.servicebus/namespaces",
            "dimensions": [],
            "operator": "[parameters('operator')]",
            "threshold": "[parameters('threshold')]",
            "timeAggregation": "[parameters('timeAggregation')]"

            ]
            ,
            "actions": [

            "actionGroupId": "[resourceId('Microsoft.Insights/ActionGroups', 'testAG12')]"

            ]


            ]



            Pass the below important values to the parameters:



            Metric Name : DeadletteredMessages
            Time Aggregation : Average
            Resource Id: Resource ID of your Service Bus Namespace. You can get this from the properties of the service bus blade as shown in below image


            enter image description hereenter image description here






            share|improve this answer













            Here is the ARM Template for Creating Metric Alert Count of dead lettered messages in a Queue/Topic:



             
            "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
            "contentVersion": "1.0.0.0",
            "parameters":
            "alertName":
            "type": "string",
            "minLength": 1,
            "metadata":
            "description": "Name of the alert"

            ,
            "alertDescription":
            "type": "string",
            "defaultValue": "This is a metric alert",
            "metadata":
            "description": "Description of alert"

            ,
            "alertSeverity":
            "type": "int",
            "defaultValue": 3,
            "allowedValues": [
            0,
            1,
            2,
            3,
            4
            ],
            "metadata":
            "description": "Severity of alert 0,1,2,3,4"

            ,
            "isEnabled":
            "type": "bool",
            "defaultValue": true,
            "metadata":
            "description": "Specifies whether the alert is enabled"

            ,
            "resourceId":
            "type": "string",
            "minLength": 1,
            "metadata":
            "description": "Full Resource ID of the resource emitting the metric that will be used for the comparison. For example /subscriptions/00000000-0000-0000-0000-0000-00000000/resourceGroups/ResourceGroupName/providers/Microsoft.compute/virtualMachines/VM_xyz"

            ,
            "metricName":
            "type": "string",
            "minLength": 1,
            "metadata":
            "description": "Name of the metric used in the comparison to activate the alert."

            ,
            "operator":
            "type": "string",
            "defaultValue": "GreaterThan",
            "allowedValues": [
            "Equals",
            "NotEquals",
            "GreaterThan",
            "GreaterThanOrEqual",
            "LessThan",
            "LessThanOrEqual"
            ],
            "metadata":
            "description": "Operator comparing the current value with the threshold value."

            ,
            "threshold":
            "type": "string",
            "defaultValue": "0",
            "metadata":
            "description": "The threshold value at which the alert is activated."

            ,
            "timeAggregation":
            "type": "string",
            "defaultValue": "Average",
            "allowedValues": [
            "Average",
            "Minimum",
            "Maximum",
            "Total"
            ],
            "metadata":
            "description": "How the data that is collected should be combined over time."

            ,
            "windowSize":
            "type": "string",
            "defaultValue": "PT5M",
            "metadata":
            "description": "Period of time used to monitor alert activity based on the threshold. Must be between five minutes and one day. ISO 8601 duration format."

            ,
            "evaluationFrequency":
            "type": "string",
            "defaultValue": "PT1M",
            "metadata":
            "description": "how often the metric alert is evaluated represented in ISO 8601 duration format"


            ,
            "variables": ,
            "resources": [

            "apiVersion": "2018-03-01",
            "type": "Microsoft.Insights/ActionGroups",
            "name": "testAG12",
            "location": "Global",
            "kind": null,
            "tags": ,
            "properties":
            "groupShortName": "testAg",
            "enabled": true,
            "emailReceivers": [

            "name": "emailservice_-EmailAction-",
            "emailAddress": "email@contoso.com",
            "status": "Enabled",
            "useCommonAlertSchema": false

            ],
            "smsReceivers": [],
            "webhookReceivers": [],
            "itsmReceivers": [],
            "azureAppPushReceivers": [],
            "automationRunbookReceivers": [],
            "voiceReceivers": [],
            "logicAppReceivers": [],
            "azureFunctionReceivers": [],
            "armRoleReceivers": []
            ,
            "identity": null
            ,

            "name": "[parameters('alertName')]",
            "type": "Microsoft.Insights/metricAlerts",
            "location": "global",
            "apiVersion": "2018-03-01",
            "tags": ,
            "properties":
            "description": "[parameters('alertDescription')]",
            "severity": "[parameters('alertSeverity')]",
            "enabled": "[parameters('isEnabled')]",
            "scopes": [ "[parameters('resourceId')]" ],
            "evaluationFrequency": "[parameters('evaluationFrequency')]",
            "windowSize": "[parameters('windowSize')]",
            "criteria":
            "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria",
            "allOf": [

            "name": "1st criterion",
            "metricName": "[parameters('metricName')]",
            "metricNamespace": "microsoft.servicebus/namespaces",
            "dimensions": [],
            "operator": "[parameters('operator')]",
            "threshold": "[parameters('threshold')]",
            "timeAggregation": "[parameters('timeAggregation')]"

            ]
            ,
            "actions": [

            "actionGroupId": "[resourceId('Microsoft.Insights/ActionGroups', 'testAG12')]"

            ]


            ]



            Pass the below important values to the parameters:



            Metric Name : DeadletteredMessages
            Time Aggregation : Average
            Resource Id: Resource ID of your Service Bus Namespace. You can get this from the properties of the service bus blade as shown in below image


            enter image description hereenter image description here







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 22 at 11:13









            KetanChawda-MSFTKetanChawda-MSFT

            4564




            4564












            • Thank you very much! Could you please let me know how you got to the screen from the second screenshot (with Settings) on the portal? Or in other words, how did you find the Metric Name? Then I can learn better how to find other metric names when I need them.

              – tubakaya
              Mar 22 at 13:57












            • The second screenshot is actually a template deployment from the portal. Login to portal.azure.com > All Services > Search for Template docs.microsoft.com/en-us/azure/azure-resource-manager/… You can paste the template mentioned in my answer and you will see the same UI.

              – KetanChawda-MSFT
              Mar 22 at 15:07











            • Awesome, thanks!

              – tubakaya
              Mar 22 at 15:10

















            • Thank you very much! Could you please let me know how you got to the screen from the second screenshot (with Settings) on the portal? Or in other words, how did you find the Metric Name? Then I can learn better how to find other metric names when I need them.

              – tubakaya
              Mar 22 at 13:57












            • The second screenshot is actually a template deployment from the portal. Login to portal.azure.com > All Services > Search for Template docs.microsoft.com/en-us/azure/azure-resource-manager/… You can paste the template mentioned in my answer and you will see the same UI.

              – KetanChawda-MSFT
              Mar 22 at 15:07











            • Awesome, thanks!

              – tubakaya
              Mar 22 at 15:10
















            Thank you very much! Could you please let me know how you got to the screen from the second screenshot (with Settings) on the portal? Or in other words, how did you find the Metric Name? Then I can learn better how to find other metric names when I need them.

            – tubakaya
            Mar 22 at 13:57






            Thank you very much! Could you please let me know how you got to the screen from the second screenshot (with Settings) on the portal? Or in other words, how did you find the Metric Name? Then I can learn better how to find other metric names when I need them.

            – tubakaya
            Mar 22 at 13:57














            The second screenshot is actually a template deployment from the portal. Login to portal.azure.com > All Services > Search for Template docs.microsoft.com/en-us/azure/azure-resource-manager/… You can paste the template mentioned in my answer and you will see the same UI.

            – KetanChawda-MSFT
            Mar 22 at 15:07





            The second screenshot is actually a template deployment from the portal. Login to portal.azure.com > All Services > Search for Template docs.microsoft.com/en-us/azure/azure-resource-manager/… You can paste the template mentioned in my answer and you will see the same UI.

            – KetanChawda-MSFT
            Mar 22 at 15:07













            Awesome, thanks!

            – tubakaya
            Mar 22 at 15:10





            Awesome, thanks!

            – tubakaya
            Mar 22 at 15:10













            0














            I realized I forgot about "Export Template" feature in Azure portal. Upon manually creating the alert rules or any resources, resource group can be exported as ARM template. Here I was able to locate to resources that contain template content to generate the manually created resource.



            enter image description here






            share|improve this answer





























              0














              I realized I forgot about "Export Template" feature in Azure portal. Upon manually creating the alert rules or any resources, resource group can be exported as ARM template. Here I was able to locate to resources that contain template content to generate the manually created resource.



              enter image description here






              share|improve this answer



























                0












                0








                0







                I realized I forgot about "Export Template" feature in Azure portal. Upon manually creating the alert rules or any resources, resource group can be exported as ARM template. Here I was able to locate to resources that contain template content to generate the manually created resource.



                enter image description here






                share|improve this answer















                I realized I forgot about "Export Template" feature in Azure portal. Upon manually creating the alert rules or any resources, resource group can be exported as ARM template. Here I was able to locate to resources that contain template content to generate the manually created resource.



                enter image description here







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 25 at 9:17

























                answered Mar 25 at 9:01









                tubakayatubakaya

                386




                386



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55285107%2fmetric-name-for-count-of-dead-lettered-messages-in-a-queue-topic-preview-az%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript