Skip to content
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

Merged

Conversation

lookingss
Copy link

#10 It's our current prometheus rules.

@arkbriar
Copy link
Collaborator

arkbriar commented Mar 3, 2023

LGTM, cc. @dingfeng @vettalwu

@vettalwu vettalwu self-requested a review March 3, 2023 13:58
@vettalwu
Copy link
Collaborator

vettalwu commented Mar 7, 2023

LGTM.

@vettalwu vettalwu added enhancement New feature or request Feature Request labels Mar 7, 2023
groups:
- name: polardbx-CN
rules:
- alert: Polardb-X-CN SQL Running Connection is High
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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

@vettalwu vettalwu merged commit ba18997 into polardb:main Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Feature Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants