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

[kube-prometheus-stack] update recording rule and remove grafana dependcy #35

Merged
merged 1 commit into from
Dec 26, 2023

Conversation

frezes
Copy link
Collaborator

@frezes frezes commented Dec 26, 2023

What this PR does / why we need it

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

  • fixes #

Special notes for your reviewer

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

@frezes frezes requested a review from junotx December 26, 2023 06:40
@frezes frezes force-pushed the feat/customizingRules branch from 526e2bd to 6204dfe Compare December 26, 2023 06:43
@benjaminhuo benjaminhuo merged commit ee579ce into WizTelemetry:main Dec 26, 2023
2 checks passed
- name: whizard-telemetry-namespace.rules
rules:
- expr: |
sum by(cluster,namespace,workload,workload_type)(node_namespace_pod_container:container_cpu_usage_seconds_total:sum_irate{} * on(cluster,pod)group_left(workload,workload_type) workspace_workload_node:kube_pod_info:{})
Copy link
Collaborator

Choose a reason for hiding this comment

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

on(cluster,pod) -> on(cluster,namespace,pod)
Other similar rules may be to change too

Comment on lines +137 to +140
- expr: |
label_replace(sum(kube_daemonset_status_number_unavailable{job="kube-state-metrics"}) by (daemonset, namespace, cluster) / sum(kube_daemonset_status_desired_number_scheduled{job="kube-state-metrics"}) by (daemonset, namespace,cluster), "workload", "$1", "deamonset", "(.*)")
labels:
workload_type: deamonset
Copy link
Collaborator

Choose a reason for hiding this comment

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

deamonset -> daemonset

Comment on lines +125 to +127
- expr: |
sum by (cluster, namespace,workload,workload_type) (node_namespace_pod_container:container_memory_working_set_bytes{} * on(cluster,pod)group_left(workload,workload_type) workspace_workload_node:kube_pod_info:{})
record: namespace:workload_memory_usage:sum
Copy link
Collaborator

Choose a reason for hiding this comment

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

container_memory_working_set_bytes -> container_memory_usage_bytes

Copy link
Member

@benjaminhuo benjaminhuo Dec 26, 2023

Choose a reason for hiding this comment

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

container_memory_working_set_bytes 是合理的吧?之前我记得是特意改的?@junotx

Copy link
Collaborator

Choose a reason for hiding this comment

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

The namespace:workload_memory_wo_cache_usage:sum rule uses container_memory_working_set_bytes

Copy link
Member

Choose a reason for hiding this comment

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

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants