summaryrefslogtreecommitdiffstats
path: root/plugins/config_generator.py
diff options
context:
space:
mode:
authorSahina Bose <sabose@redhat.com>2014-04-11 12:08:22 +0530
committerBala.FA <barumuga@redhat.com>2014-04-29 10:21:37 +0530
commit4e1d15a964e5745a6ecea57082e4ce762fe96e98 (patch)
tree61c85ca68ae979e60f8bfae022d7c355ec0ed0c4 /plugins/config_generator.py
parent10c414706c2c77225c014673f03b8e3166b82ff2 (diff)
plugins: Added quota NRPE to volume status
Added a way to query for quota status to the check_vol_server plugin This will poll for quota status only if the service status for quota returns non-OK status Change-Id: I6260042ef54308a1f4f7b6d482a2b58a4682d36c Signed-off-by: Sahina Bose <sabose@redhat.com>
Diffstat (limited to 'plugins/config_generator.py')
-rw-r--r--plugins/config_generator.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/plugins/config_generator.py b/plugins/config_generator.py
index 9941028..02c5f67 100644
--- a/plugins/config_generator.py
+++ b/plugins/config_generator.py
@@ -73,7 +73,7 @@ class GlusterNagiosConfManager:
def __createVolumeStatusService(self, volume, clusterName):
volumeService = {}
volumeService['host_name'] = clusterName
- volumeService['use'] = 'gluster-service-withoout-graph'
+ volumeService['use'] = 'gluster-service-without-graph'
serviceDesc = 'Volume Status - %s' % (volume['name'])
volumeService['service_description'] = serviceDesc
volumeService['_VOL_NAME'] = volume['name']
@@ -83,6 +83,18 @@ class GlusterNagiosConfManager:
volumeService['notes'] = "Volume type : %s" % (volume['typeStr'])
return volumeService
+ def __createVolumeQuotaStatusService(self, volume, clusterName):
+ volumeService = {}
+ volumeService['host_name'] = clusterName
+ volumeService['use'] = 'gluster-service-without-graph'
+ serviceDesc = 'Volume Status Quota - %s' % (volume['name'])
+ volumeService['service_description'] = serviceDesc
+ volumeService['_VOL_NAME'] = volume['name']
+ checkCommand = 'check_vol_quota_status!%s!%s' % \
+ (clusterName, volume['name'])
+ volumeService['check_command'] = checkCommand
+ return volumeService
+
def createClusterUtilizationService(self, clusterName):
service = {}
service['host_name'] = clusterName
@@ -106,6 +118,9 @@ class GlusterNagiosConfManager:
volumeService = self.__createVolumeUtilizationService(volume,
clusterName)
volumeServices.append(volumeService)
+ volumeService = self.__createVolumeQuotaStatusService(volume,
+ clusterName)
+ volumeServices.append(volumeService)
return volumeServices
def __createBrickUtilizationService(self, brick, hostName):