Skip to content

Commit

Permalink
feat(metrics): ✨ add cgroup metrics (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
Supporterino authored Jan 30, 2025
1 parent b43c48b commit d642b73
Showing 1 changed file with 210 additions and 0 deletions.
210 changes: 210 additions & 0 deletions graphite_mapping.conf
Original file line number Diff line number Diff line change
Expand Up @@ -573,3 +573,213 @@ mappings:
instance: "${1}"
pod: "${2}"
direction: "${3}"

################################################
# cgroup mappings
################################################

- match: 'truenas\.(.*)\.(.*)\.cpu_full_pressure\.(.*)'
match_type: "regex"
name: "cgroup_cpu_full_pressure"
labels:
job: "truenas"
dimension: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "percent"

- match: 'truenas\.(.*)\.(.*)\.cpu_full_pressure_stall_time\.time'
match_type: "regex"
name: "cgroup_cpu_full_pressure_stall_time"
labels:
job: "truenas"
dimension: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "ms"

- match: 'truenas\.(.*)\.(.*)\.cpu_limit\.used'
match_type: "regex"
name: "cgroup_cpu_limit"
labels:
job: "truenas"
instance: "${1}"
cgroup: "${2}"
unit: "percent"

- match: 'truenas\.(.*)\.(.*)\.cpu_some_pressure\.(.*)'
match_type: "regex"
name: "cgroup_cpu_some_pressure"
labels:
job: "truenas"
dimension: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "percent"

- match: 'truenas\.(.*)\.(.*)\.cpu_some_pressure_stall_time\.time'
match_type: "regex"
name: "cgroup_cpu_some_pressure_stall_time"
labels:
job: "truenas"
dimension: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "ms"

- match: 'truenas\.(.*)\.(.*)\.cpu\.(.*)'
match_type: "regex"
name: "cgroup_cpu_usage"
labels:
job: "truenas"
type: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "percent"

- match: 'truenas\.(.*)\.(.*)\.io_full_pressure\.(.*)'
match_type: "regex"
name: "cgroup_io_full_pressure"
labels:
job: "truenas"
dimension: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "percent"

- match: 'truenas\.(.*)\.(.*)\.io_full_pressure_stall_time\.time'
match_type: "regex"
name: "cgroup_io_full_pressure_stall_time"
labels:
job: "truenas"
dimension: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "ms"

- match: 'truenas\.(.*)\.(.*)\.io_some_pressure\.(.*)'
match_type: "regex"
name: "cgroup_io_some_pressure"
labels:
job: "truenas"
dimension: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "percent"

- match: 'truenas\.(.*)\.(.*)\.io_some_pressure_stall_time\.time'
match_type: "regex"
name: "cgroup_io_some_pressure_stall_time"
labels:
job: "truenas"
dimension: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "ms"

- match: 'truenas\.(.*)\.(.*)\.mem_full_pressure\.(.*)'
match_type: "regex"
name: "cgroup_mem_full_pressure"
labels:
job: "truenas"
dimension: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "percent"

- match: 'truenas\.(.*)\.(.*)\.mem_full_pressure_stall_time\.time'
match_type: "regex"
name: "cgroup_mem_full_pressure_stall_time"
labels:
job: "truenas"
dimension: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "ms"

- match: 'truenas\.(.*)\.(.*)\.mem_some_pressure\.(.*)'
match_type: "regex"
name: "cgroup_mem_some_pressure"
labels:
job: "truenas"
dimension: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "percent"

- match: 'truenas\.(.*)\.(.*)\.mem_some_pressure_stall_time\.time'
match_type: "regex"
name: "cgroup_mem_some_pressure_stall_time"
labels:
job: "truenas"
dimension: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "ms"

- match: 'truenas\.(.*)\.(.*)\.mem_usage\.(.*)'
match_type: "regex"
name: "cgroup_mem_usage"
labels:
job: "truenas"
type: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "MiB"

- match: 'truenas\.(.*)\.(.*)\.mem_usage_limit\.(.*)'
match_type: "regex"
name: "cgroup_mem_usage_limit"
labels:
job: "truenas"
type: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "MiB"

- match: 'truenas\.(.*)\.(.*)\.mem_utilization'
match_type: "regex"
name: "cgroup_mem_utilization"
labels:
job: "truenas"
instance: "${1}"
cgroup: "${2}"
unit: "percent"

- match: 'truenas\.(.*)\.(.*)\.pgfaults\.(.*)'
match_type: "regex"
name: "cgroup_pgfaults"
labels:
job: "truenas"
type: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "MiB/s"

- match: 'truenas\.(.*)\.(.*)\.throttled'
match_type: "regex"
name: "cgroup_cpu_throttled"
labels:
job: "truenas"
instance: "${1}"
cgroup: "${2}"
unit: "percent"

- match: 'truenas\.(.*)\.(.*)\.throttled_duration'
match_type: "regex"
name: "cgroup_cpu_throttled_duration"
labels:
job: "truenas"
instance: "${1}"
cgroup: "${2}"
unit: "ms"

- match: 'truenas\.(.*)\.(.*)\.writeback\.(.*)'
match_type: "regex"
name: "cgroup_writeback"
labels:
job: "truenas"
type: "${3}"
instance: "${1}"
cgroup: "${2}"
unit: "MiB"

0 comments on commit d642b73

Please sign in to comment.