Skip to content

cilium-enterprise: 2 alert-template bugs #1466

@symmatree

Description

@symmatree

Found thanks to pint, passing upstream since they look legit. I'd be happy to send a PR if that's acceptable.

CiliumAgentApiHighErrorRate: return_code vs response_code

The query aggregates by return_code but the template tries to print it as response_code:

Bug: template uses non-existent label (alerts/template)
  ---> /tmp/rules/alloy_cilium_cilium-api_aa27db34-2386-410d-8ead-40419fce7172.yaml:5-12 -> `CiliumAgentApiHighErrorRate`
 6 |           expr: sum(rate(cilium_k8s_client_api_calls_total{endpoint!="metrics",return_code!~"2[0-9][0-9]"}[5m])) by (pod, endpoint, return_code) > 0
                                                                                                                      ^^^ Query is using aggregation with `by(pod, endpoint, return_code)`, only labels included inside `by(...)` will be present on the results.
   | [...]
11 |             description: 'Cilium Agent API on Pod {{$labels.pod}} is experiencing a high error rate for response code: {{$labels.response_code}} on endpoint {{$labels.endpoint}}.'

RunningOutOfCiliumClusterIdentities: value vs $value

I believe $value was intended; value is a function that requires a sample as argument (docs)

Fatal: template syntax error (alerts/template)
  ---> /tmp/rules/alloy_cilium_cilium-identity_ddfe1400-7a9e-4c26-ab10-bbb804591c4f.yaml:22 -> `RunningOutOfCiliumClusterIdentities`
22 |             description: Cilium is using a very high percent of its maximum cluster identity limit ({{value}}/65280) . If this capacity is exhausted Cilium may be unable to allocate new identities. Very high identity allocations can also indicate other problems
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Template failed to parse with this error: `189: executing "description" at <value>: wrong number of args for value: want 1 got 0`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions