Hey, I am receiving an error when trying to deploy...
# google-cloud
s
Hey, I am receiving an error when trying to deploy this policy:
Copy code
export const errorOccuredPolicy = new gcp.monitoring.AlertPolicy(
  'some_error_occured',
  {
    combiner: 'OR',
    conditions: [
      {
        conditionThreshold: {
          comparison: 'COMPARISON_GT',
          thresholdValue: 0,
          duration: '60s',
          filter: `
            resource.type="metric" AND
            resource.labels.project_id="my_project_id" AND
            resource.labels.name="<http://logging.googleapis.com/user/MY_USER_DEFINED_METRIC|logging.googleapis.com/user/MY_USER_DEFINED_METRIC>"
          `,
        },
        displayName:
          'an error of some type has occured',
      },
    ],
    displayName: pulumi.interpolate`${stack}: some error occured`,
    notificationChannels: [opsgenieNotificationChannel.id],
  }
);
The error I receive:
* Error creating AlertPolicy: googleapi: Error 400: The provided filter matches more than one metric. TimeSeries data are limited to a single metric per request
the
resource.labels.name
references a single custom metric that does exist (I can see it in GCP gui/metric explorer)
Please let me know if you have any experience, thanks 🙏