Dynatrace/dynatrace-configuration-as-code

API for anomalyDetectionMetric duplicates configs for entityFilterMetricEvents

Closed this issue · 0 comments

Describe the bug
API for anomalyDetection/metricEvents duplicates configs for metricFilterEvents, because the query parameter includeEntityFilterMetricEvents is not set to true when performing the GET (all) webrequest.

How to reproduce
Just create a config (api anomaly-detection-metrics) like the following with monaco:

{
    "metricId": "ext:cloud.aws.sqs.approximateNumberOfMessagesVisible",
    "name": "{{ .name }}",
    "description": "{severity} The Lima Processing dlq ({metricname}) was {alert_condition} with a threshold value of {threshold}. \n\n{dims:dt.entity.custom_device.name}",
    "aggregationType": "MAX",
    "severity": "ERROR",
    "enabled": true,
    "disabledReason": "NONE",
    "warningReason": "NONE",
    "alertingScope": [
      {
        "filterType": "ENTITY_ID",
        "entityId": "{{ .dlqQueueMeId }}"
      }
    ],
    "monitoringStrategy": {
      "type": "STATIC_THRESHOLD",
      "samples": 15,
      "violatingSamples": 1,
      "dealertingSamples": 15,
      "alertCondition": "ABOVE",
      "alertingOnMissingData": false,
      "threshold": 80,
      "unit": "COUNT"
    },
    "alertCondition": "ABOVE",
    "samples": 15,
    "violatingSamples": 1,
    "dealertingSamples": 15,
    "threshold": 80,
    "unit": "COUNT",
    "entity": "{{ .dlqQueueMeId }}",
    "eventType": "ERROR"
  }

Expected behavior
The query param is correctly set and the config is not duplicated anymore.