Allow threshold to be modified for individual pools
https://mirantis.jira.com/browse/PROD-22888
Change-Id: Id37414158b426f072eac9f12918b319094b11f1e
diff --git a/README.rst b/README.rst
index bc8e2b6..825f128 100644
--- a/README.rst
+++ b/README.rst
@@ -678,12 +678,21 @@
space_used_critical_threshold: 0.85
apply_latency_threshold: 0.007
commit_latency_threshold: 0.7
- pool_space_used_utilization_warning_threshold: 0.75
- pool_space_used_critical_threshold: 0.85
- pool_write_ops_threshold: 200
- pool_write_bytes_threshold: 70000000
- pool_read_bytes_threshold: 70000000
- pool_read_ops_threshold: 1000
+ pool:
+ vms:
+ pool_space_used_utilization_warning_threshold: 0.75
+ pool_space_used_critical_threshold: 0.85
+ pool_write_ops_threshold: 200
+ pool_write_bytes_threshold: 70000000
+ pool_read_bytes_threshold: 70000000
+ pool_read_ops_threshold: 1000
+ images:
+ pool_space_used_utilization_warning_threshold: 0.50
+ pool_space_used_critical_threshold: 0.95
+ pool_write_ops_threshold: 100
+ pool_write_bytes_threshold: 50000000
+ pool_read_bytes_threshold: 50000000
+ pool_read_ops_threshold: 500
Ceph monitor backups
--------------------
diff --git a/ceph/meta/prometheus.yml b/ceph/meta/prometheus.yml
index e8dc6ca..0afcfc2 100644
--- a/ceph/meta/prometheus.yml
+++ b/ceph/meta/prometheus.yml
@@ -99,8 +99,13 @@
{% endraw %}
{%- if setup.pool is defined %}
{%- for pool_name, pool in setup.pool.iteritems() %}
+ {%- if monitoring.pool is defined and monitoring.pool[pool_name] is defined %}
+ {%- set monitoring_pool = monitoring.pool[pool_name] %}
+ {%- else %}
+ {%- set monitoring_pool = monitoring %}
+ {%- endif %}
CephPool{{pool_name|replace(".", "")|replace("-", "")}}SpaceUsageWarning:
- {%- set threshold = monitoring.pool_space_used_utilization_warning_threshold|default('0.75')|float %}
+ {%- set threshold = monitoring_pool.pool_space_used_utilization_warning_threshold|default('0.75')|float %}
if: >-
ceph_pool_usage_bytes_used{name="{{pool_name}}"} / ceph_pool_usage_max_avail{name="{{pool_name}}"} > {{threshold}}
for: 3m
@@ -111,7 +116,7 @@
summary: "{{100*threshold}}% of Ceph pool space is used"
description: "The Ceph {{pool_name}} pool uses {{100*threshold}}% of available space for 3 minutes. For details, run 'ceph df'."
CephPool{{pool_name|replace(".", "")|replace("-", "")}}SpaceUsageMinor:
- {%- set threshold = monitoring.pool_space_used_critical_threshold|default('0.85')|float %}
+ {%- set threshold = monitoring_pool.pool_space_used_critical_threshold|default('0.85')|float %}
if: >-
ceph_pool_usage_bytes_used{name="{{pool_name}}"} / ceph_pool_usage_max_avail{name="{{pool_name}}"} > {{threshold}}
for: 3m
@@ -122,7 +127,7 @@
summary: "{{100*threshold}}% of Ceph pool space is used"
description: "The Ceph {{pool_name}} pool uses {{100*threshold}}% of available space for 3 minutes. For details, run 'ceph df'."
CephPool{{pool_name|replace(".", "")|replace("-", "")}}WriteOpsTooHigh:
- {%- set threshold = monitoring.pool_write_ops_threshold|default('200')|float %}
+ {%- set threshold = monitoring_pool.pool_write_ops_threshold|default('200')|float %}
if: >-
ceph_pool_stats_write_op_per_sec{name="{{pool_name}}"} > {{threshold}}
for: 3m
@@ -133,7 +138,7 @@
summary: "{{threshold}} Ceph pool write operations per second"
description: "The number of Ceph {{pool_name}} pool write operations per second is {{threshold}} for 3 minutes."
CephPool{{pool_name|replace(".", "")|replace("-", "")}}WriteBytesTooHigh:
- {%- set threshold = monitoring.pool_write_bytes_threshold|default('70000000')|float %}
+ {%- set threshold = monitoring_pool.pool_write_bytes_threshold|default('70000000')|float %}
if: >-
ceph_pool_stats_write_bytes_sec{name="{{pool_name}}"} > {{threshold}}
for: 3m
@@ -144,7 +149,7 @@
summary: "{{threshold}} Ceph pool write bytes per second"
description: "The number of Ceph {{pool_name}} pool write bytes per second is {{threshold}} for 3 minutes."
CephPool{{pool_name|replace(".", "")|replace("-", "")}}ReadOpsTooHigh:
- {%- set threshold = monitoring.pool_read_ops_threshold|default('1000')|float %}
+ {%- set threshold = monitoring_pool.pool_read_ops_threshold|default('1000')|float %}
if: >-
ceph_pool_stats_read_op_per_sec{name="{{pool_name}}"} > {{threshold}}
for: 3m
@@ -155,7 +160,7 @@
summary: "{{threshold}} Ceph pool read operations per second"
description: "The number of Ceph {{pool_name}} pool read operations per second is {{threshold}} for 3 minutes."
CephPool{{pool_name|replace(".", "")|replace("-", "")}}ReadBytesTooHigh:
- {%- set threshold = monitoring.pool_read_bytes_threshold|default('70000000')|float %}
+ {%- set threshold = monitoring_pool.pool_read_bytes_threshold|default('70000000')|float %}
if: >-
ceph_pool_stats_read_bytes_sec{name="{{pool_name}}"} > {{threshold}}
for: 3m