Added prototype of GlusterFS mount alert and report rate recording.
Related-PROD: PROD-35536
Change-Id: If08ee29c45c85c6c623fc69fd01bc308e418981b
diff --git a/glusterfs/meta/prometheus.yml b/glusterfs/meta/prometheus.yml
index c6c4fd7..bfee436 100644
--- a/glusterfs/meta/prometheus.yml
+++ b/glusterfs/meta/prometheus.yml
@@ -1,7 +1,8 @@
-{%- from "glusterfs/map.jinja" import server, monitoring with context %}
-{%- if server.get('enabled', False) %}
+{%- from "glusterfs/map.jinja" import client, server, monitoring with context %}
+{%- if server.get('enabled', False) or client.get('enabled', False) %}
server:
alert:
+{%- if server.get('enabled', False) %}
GlusterfsServiceOutage:
if: >-
glusterfs_up != 1
@@ -73,3 +74,21 @@
description: "{{ $value }}% of GlusterFS {{ $labels.volume }} volume disk space is used for 2 minutes."
{%- endraw %}
{%- endif %}
+{%- if client.get('enabled', False) %}
+ {%- raw %}
+ GlusterfsMountMissing:
+ if: >-
+ delta(glusterfs_mount_scrapes:rate5m{fstype=~"(fuse.)?glusterfs"}[5m]) < 0 or glusterfs_mount_scrapes:rate5m{fstype=~"(fuse.)?glusterfs"} == 0
+ labels:
+ severity: major
+ service: glusterfs
+ annotations:
+ summary: "GlusterFS mountpoint is not mounted"
+ description: "GlusterFS mountpoint {{ $labels.path }} on node {{ $labels.host }} of device {{ $labels.device }} is not mounted."
+ recording:
+ glusterfs_mount_scrapes:rate5m:
+ query: >-
+ count_over_time(disk_total{fstype=~"(fuse.)?glusterfs"}[5m]) or 0*(glusterfs_mount_scrapes:rate5m offset 1m)
+ {%- endraw %}
+{%- endif %}
+{%- endif %}