Field alert_policy.conditions[0].condition_threshold.filter had an invalid value of "metric.type=\"logging.googleapis.com/user/foobar\"": must specify a restriction on "resource.type" in the filter; see "https://cloud.google.com/monitoring/api/resources" for a list of available resource types.
... must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels
--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdr...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-stackdriver-discussion/fa297eb0-a1a0-42df-9024-b249789a7f32%40googlegroups.com.
--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdr...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-stackdriver-discussion/b747b95e-efce-4dad-8ee3-1555edb6eadf%40googlegroups.com.
Update: for various historical reasons, logs-based metrics from the http_load_balancer logs are written against the l7_lb_rule monitored resource. You should be able to find your metrics if you constrain to that resource type.Igor
On Fri, Aug 9, 2019, 8:01 PM Igor Peshansky <ig...@google.com> wrote:
Ah. There are, in fact, two lists of monitored resources: one used by monitoring (https://cloud.google.com/monitoring/api/resources) and one used by logging (https://cloud.google.com/logging/docs/api/v2/resource-list). They share many resources, but the one you need, http_load_balancer, is one of the discrepancies. +Mary Koes to clarify the behavior in those cases. +Rory Petty FYI for the alerting feedback.Igor
-- sent from a mobile device, please excuse tyops and omissns
On Fri, Aug 9, 2019, 7:52 PM Benjamin Neff <benj...@coding4coffee.ch> wrote:
Hi Igor,--Thanks for your response.I tried that, so the log-based metric has a filter for resource.type="http_load_balancer", but when I try to add this to the alert policy as well, it fails with "The filter contains unknown resource type: http_load_balancer" (and it's true, the list from the first error message with all monitoring resource types doesn't include that resource).And it's still weird that the web-ui doesn't need a resource to work, and also doesn't autocomplete a resource.Regards,Benjamin
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdriver-discu...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-discussion+unsub...@googlegroups.com.
Update: for various historical reasons, logs-based metrics from the http_load_balancer logs are written against the l7_lb_rule monitored resource. You should be able to find your metrics if you constrain to that resource type.Igor
On Fri, Aug 9, 2019, 8:01 PM Igor Peshansky <ig...@google.com> wrote:
Ah. There are, in fact, two lists of monitored resources: one used by monitoring (https://cloud.google.com/monitoring/api/resources) and one used by logging (https://cloud.google.com/logging/docs/api/v2/resource-list). They share many resources, but the one you need, http_load_balancer, is one of the discrepancies. +Mary Koes to clarify the behavior in those cases. +Rory Petty FYI for the alerting feedback.Igor
-- sent from a mobile device, please excuse tyops and omissns
On Fri, Aug 9, 2019, 7:52 PM Benjamin Neff <benj...@coding4coffee.ch> wrote:
Hi Igor,--Thanks for your response.I tried that, so the log-based metric has a filter for resource.type="http_load_balancer", but when I try to add this to the alert policy as well, it fails with "The filter contains unknown resource type: http_load_balancer" (and it's true, the list from the first error message with all monitoring resource types doesn't include that resource).And it's still weird that the web-ui doesn't need a resource to work, and also doesn't autocomplete a resource.Regards,Benjamin
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
Email preferences: You received this email because you signed up for the Google Stackdriver Discussion Google Group (google-stackdriver-discu...@googlegroups.com) to participate in discussions with other members of the GoogleStackdriver community.
---
You received this message because you are subscribed to the Google Groups "Google Stackdriver Discussion Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-stackdriver-discussion+unsub...@googlegroups.com.