]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/prometheus: fix and complete PG state names 21288/head
authorJohn Spray <john.spray@redhat.com>
Sun, 8 Apr 2018 14:21:27 +0000 (15:21 +0100)
committerJohn Spray <john.spray@redhat.com>
Mon, 9 Apr 2018 12:23:55 +0000 (13:23 +0100)
...and reformat into a flat list in the same
order as found in osd_types.cc so that it's
easy to cross check.

Fixes: https://tracker.ceph.com/issues/23584
Signed-off-by: John Spray <john.spray@redhat.com>
src/pybind/mgr/prometheus/module.py

index a6dc5d1969e336f9eb09a677c56962caf5d9be74..2414ca5eb2fc630800e28a331b98cb9f43a7088e 100644 (file)
@@ -43,10 +43,37 @@ def health_status_to_number(status):
     elif status == 'HEALTH_ERR':
         return 2
 
-PG_STATES = ['creating', 'active', 'clean', 'down', 'scrubbing', 'deep', 'degraded',
-        'inconsistent', 'peering', 'repair', 'recovering', 'forced-recovery',
-        'backfill', 'forced-backfill', 'wait-backfill', 'backfill-toofull',
-        'incomplete', 'stale', 'remapped', 'undersized', 'peered']
+PG_STATES = [
+        "active",
+        "clean",
+        "down",
+        "recovery_unfound",
+        "backfill_unfound",
+        "scrubbing",
+        "degraded",
+        "inconsistent",
+        "peering",
+        "repair",
+        "recovering",
+        "forced_recovery",
+        "backfill_wait",
+        "incomplete",
+        "stale",
+        "remapped",
+        "deep",
+        "backfilling",
+        "forced_backfill",
+        "backfill_toofull",
+        "recovery_wait",
+        "recovery_toofull",
+        "undersized",
+        "activating",
+        "peered",
+        "snaptrim",
+        "snaptrim_wait",
+        "snaptrim_error",
+        "creating",
+        "unknown"]
 
 DF_CLUSTER = ['total_bytes', 'total_used_bytes', 'total_objects']