1
votes

I have a log-based metric that tracks a specific error condition by looking for some string message (ie. "core dump"). I have multiple groups that track different groups of server I have (ie. "group1", "group2", etc.)

I'd to create alerts to look for this log-based metrics for each group. For example, an alert would be generated for each server group ("core dump on group1", "core dump on group2", etc.)

In the Target tab when creating alerts, it lets me target instances but only doesn't let me specify log-based metrics in the configuration. If I choose log-based metric as the target, it doesn't let me limit it to specific groups.

Is there a better way to do this?

1

1 Answers

1
votes

When logs-based metrics exit Stackdriver Logging, they've already been aggregated and information about the resources the entries came from is not maintained, and as such you can't split the metric back apart again for alerting purposes.

As an alternative, you could create separate logs-based metrics for the different groups you are interested in. Unfortunately, as of this writing native group support is something that we haven't yet propagated throughout Stackdriver, so you would need to reproduce the criteria you use to define the group in the filter definition.

Thanks for trying out Stackdriver, and your patience with beta rough edges! =)