-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add polardbx-cn,polardbx-dn, polardbx-node prometheus rules #11
add polardbx-cn,polardbx-dn, polardbx-node prometheus rules #11
Conversation
LGTM. |
groups: | ||
- name: polardbx-CN | ||
rules: | ||
- alert: Polardb-X-CN SQL Running Connection is High |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Polardb-X-CN
-> PolarDB-X CN
summary: Polardb-X-CN SQL Running Connection is High | ||
description: instance {{ $labels.instance }} schema {{ $labels.schema }} running count is high, over 200. | ||
expr: | | ||
sum(polardbx_stats_running_count) by (instance, schema, service) >= 200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that by(polardbx_name, instance)
is enough.
summary: Polardb-X-Node Memory is High | ||
description: Pod {{ $labels.pod }} node {{ $labels.node }} polardbx_role {{ $labels.polardbx_role }} Memory is High, over 80%. | ||
expr: | | ||
sum by (pod, node) (container_memory_working_set_bytes{container="engine"}) /sum by (pod, node, polardbx_role) (kube_pod_container_resource_limits_memory_bytes{container="engine"}) * 100 >= 80 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kube_pod_container_resource_limits_memory_bytes
is deprecated in kube-state-metrics 1.9. Please use kube_pod_container_resource_limits{resource="memory", unit="byte"}
instead. See: kubernetes/kube-state-metrics#1269
#10 It's our current prometheus rules.