Skip to content
This repository has been archived by the owner on Dec 29, 2020. It is now read-only.

Commit

Permalink
feat(kubernetes/rules): add container throttling
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Dec 7, 2019
1 parent ded3907 commit 165bd2a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
15 changes: 15 additions & 0 deletions kubernetes/rules/container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: container
labels:
prometheus-sql-adapter/role: derived-rule
spec:
groups:
- interval: 60s
name: container_throttle
rules:
- expr: irate(container_cpu_cfs_throttled_periods_total[1m]) / irate(container_cpu_cfs_periods_total[1m])
labels:
derived: rule
record: container_cpu_cfs_throttled_rate_pct
9 changes: 7 additions & 2 deletions kubernetes/rules/node-pcts.yml → kubernetes/rules/node.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: node-pcts
name: node
labels:
prometheus-sql-adapter/role: derived-rule
spec:
groups:
- interval: 60s
name: node_pcts
name: node_filesystem
rules:
# node_filesystem percentages
- expr: node_filesystem_avail_bytes / node_filesystem_size_bytes
Expand All @@ -16,6 +18,9 @@ spec:
labels:
derived: rule
record: node_filesystem_free_pct
- interval: 60s
name: node_memory
rules:
# node_memory percentages
- expr: 1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)
labels:
Expand Down

0 comments on commit 165bd2a

Please sign in to comment.