Skip to content

Label mismatch when alerting on GKE system metrics #1805

Description

@falau

When setting up alerts with GMP by rules custom resources, the PromQL expressions of alerts would be "scoped" with project_id, location, cluster, and namespace (depending on the rule scope). This is a behaviour hardcoded in the code that can't be configured by users as far as I can see.

However, for alerting on built-in GKE metrics, e.g. container/cpu/limit_utilization, the labels for cluster and namespace are cluster_name and namespace_name, according to the type spec. These labels are also not configurable.

Therefore, if I would like to to make alerts with Rules or ClusterRules on those built-in metrics, the alerts will never work due to the mismatch in labels.

The only workaround I can think of so far is to use GlobalRules to avoid scoping on cluster and namespace, but is this the only way to configure alerts on these GKE metrics, or is there any better suggestions?

Thanks :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions