Skip to content

Commit

Permalink
Merge pull request #882 from grafana/upstream-k8s-apps-rules-split
Browse files Browse the repository at this point in the history
Split k8s.rules group
  • Loading branch information
povilasv authored Nov 8, 2023
2 parents acfbc12 + d1a28fc commit bcf8426
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion rules/apps.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
prometheusRules+:: {
groups+: [
{
name: 'k8s.rules',
name: 'k8s.rules.container_cpu_usage_seconds_total',
rules: [
{
// Reduces cardinality of this timeseries by #cores, which makes it
Expand All @@ -22,6 +22,11 @@
)
||| % $._config,
},
],
},
{
name: 'k8s.rules.container_memory_working_set_bytes',
rules: [
{
record: 'node_namespace_pod_container:container_memory_working_set_bytes',
expr: |||
Expand All @@ -31,6 +36,11 @@
)
||| % $._config,
},
],
},
{
name: 'k8s.rules.container_memory_rss',
rules: [
{
record: 'node_namespace_pod_container:container_memory_rss',
expr: |||
Expand All @@ -40,6 +50,11 @@
)
||| % $._config,
},
],
},
{
name: 'k8s.rules.container_memory_cache',
rules: [
{
record: 'node_namespace_pod_container:container_memory_cache',
expr: |||
Expand All @@ -49,6 +64,11 @@
)
||| % $._config,
},
],
},
{
name: 'k8s.rules.container_memory_swap',
rules: [
{
record: 'node_namespace_pod_container:container_memory_swap',
expr: |||
Expand All @@ -58,6 +78,11 @@
)
||| % $._config,
},
],
},
{
name: 'k8s.rules.container_resource',
rules: [
{
record: 'cluster:namespace:pod_memory:active:kube_pod_container_resource_requests',
expr: |||
Expand Down Expand Up @@ -150,6 +175,11 @@
)
||| % $._config,
},
],
},
{
name: 'k8s.rules.pod_owner',
rules: [
// workload aggregation for deployments
{
record: 'namespace_workload_pod:kube_pod_owner:relabel',
Expand Down

0 comments on commit bcf8426

Please sign in to comment.