Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ spec:
expr: max by(direction, action)(ovnkube_controller_admin_network_policies_rules)
- record: cluster:ovnkube_controller_baseline_admin_network_policies_rules:max
expr: max by(direction, action)(ovnkube_controller_baseline_admin_network_policies_rules)
- record: cluster:ovnkube_clustermanager_user_defined_networks:max
expr: max by(role, topology)(ovnkube_clustermanager_user_defined_networks)
- record: cluster:ovnkube_clustermanager_cluster_user_defined_networks:max
expr: max by(role, topology)(ovnkube_clustermanager_cluster_user_defined_networks)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tssurya I based this on the ANP metrics, but why do we do "max" here rather than returning the current value of the metric?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this will work ok. We use aggregation functions like this for telemetry to reduce the number of labels. This gets rid of any automatically added labels (container, pod, namespace and such). Since we don't really aggregate values here (since we preserve the labels that matter) it can feel a bit awkward.

Other options are sum or group_by like in

group by (mode,is_legacy_api) (
openshift_network_operator_ipsec_state{namespace=~"openshift-network-operator"}
)
record: openshift:openshift_network_operator_ipsec_state:info

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# OVN kubernetes cluster manager functional alerts
- alert: V4SubnetAllocationThresholdExceeded
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ spec:
expr: max by(direction, action)(ovnkube_controller_admin_network_policies_rules)
- record: cluster:ovnkube_controller_baseline_admin_network_policies_rules:max
expr: max by(direction, action)(ovnkube_controller_baseline_admin_network_policies_rules)
- record: cluster:ovnkube_clustermanager_user_defined_networks:max
expr: max by(role, topology)(ovnkube_clustermanager_user_defined_networks)
- record: cluster:ovnkube_clustermanager_cluster_user_defined_networks:max
expr: max by(role, topology)(ovnkube_clustermanager_cluster_user_defined_networks)
# OVN kubernetes cluster manager functional alerts
- alert: V4SubnetAllocationThresholdExceeded
annotations:
Expand Down