Skip to content

Commit

Permalink
add storage-engine.evict-used-pct and stop-used and stop-avail to inf…
Browse files Browse the repository at this point in the history
…o namespace usage table
  • Loading branch information
Jesse Schmidt committed Oct 13, 2023
1 parent 88017eb commit 7278162
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions lib/view/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,16 +437,25 @@ def usage_weighted_avg(edatas: list[EntryData]):
converter=Converters.ratio_to_pct,
),
formatters=(
Formatters.yellow_alert(
Formatters.red_alert(
lambda edata: edata.value * 100
>= edata.record["Storage Engine"]["Evict%"]
and edata.record["Storage Engine"]["Evict%"] != 0
or edata.value * 100
>= edata.record["Storage Engine"]["Used Stop%"]
),
),
),
Field(
"Evict%",
Projectors.Number("ns_stats", "evict-used-pct"),
Projectors.Number("ns_stats", "storage-engine.evict-used-pct"),
converter=Converters.pct,
),
Field(
"Used Stop%",
Projectors.Number(
"ns_stats", "storage-engine.stop-writes-used-pct"
),
converter=Converters.pct,
),
Field(
Expand All @@ -456,7 +465,19 @@ def usage_weighted_avg(edatas: list[EntryData]):
"data_avail_pct",
),
converter=Converters.pct,
formatters=(Formatters.red_alert(lambda edata: edata.value < 10),),
formatters=(
Formatters.red_alert(
lambda edata: edata.value
<= edata.record["Storage Engine"]["Avail Stop%"]
),
),
),
Field(
"Avail Stop%",
Projectors.Number(
"ns_stats", "storage-engine.stop-writes-avail-pct"
),
converter=Converters.pct,
),
),
),
Expand Down

0 comments on commit 7278162

Please sign in to comment.