Skip to content

Microsoft.Insights/scheduledQueryRules does not allow PT1M frequency #20341

@mdowst

Description

@mdowst

The API will not allow you to update an existing query rule with the evaluationFrequency set to 'PT1M'. When I run the payload below I receive the error "Couldn't optimize this query so the selected frequency was not supported. Try selecting a different frequency". If I leave off the evaluationFrequency it will still fail if the frequency is set to PT1M in the existing rule. This behavior is present in the 2021-02-01-preview and 2021-08-01 versions. I can create the with evaluationFrequency set to 'PT1M' through the portal and via ARM. It is only in the API where it fails.

{
  "properties": {
    "criteria": {
      "allOf": [
        {
          "query": "My query",
          "timeAggregation": "Count",
          "resourceIdColumn": "null",
          "operator": "GreaterThan",
          "threshold": 2,
          "failingPeriods": {
            "numberOfEvaluationPeriods": 1,
            "minFailingPeriodsToAlert": 1
          },
          "dimensions": [
            {
              "name": "Subject",
              "operator": "Include",
              "values": [
                "*"
              ]
            }
          ]
        }
      ]
    },
    "skipQueryValidation": true,
    "windowSize": "PT1M",
    "evaluationFrequency": "PT1M"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Monitor - Operational InsightsService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions