summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/glustercluster.cfg.sample24
-rw-r--r--plugins/config_generator.py6
-rw-r--r--tests/test_config_generator.py6
3 files changed, 18 insertions, 18 deletions
diff --git a/config/glustercluster.cfg.sample b/config/glustercluster.cfg.sample
index 191b6ee..adf823d 100644
--- a/config/glustercluster.cfg.sample
+++ b/config/glustercluster.cfg.sample
@@ -50,28 +50,32 @@ define host{
# This defines a Brick utilization service
# Edit this sample
# host_name = host the brick is on
-# service_description = brick name of form serverip:brickdir
+# service_description = Brick Utilization - <brickdir>
# _BRICK_DIR = Path to brick on server
+# _VOL_NAME = Volume name the brick is part of
################################################################################
define service {
- use brick-service
- host_name host.ipaddress1
- service_description Brick Utilization - host.ipaddress1:/bricks/b1
- _BRICK_DIR /bricks/b1 ; MUST DECLARE the custom var _BRICK_DIR
+ use brick-service
+ host_name host.ipaddress1
+ service_description Brick Utilization - /bricks/b1
+ _BRICK_DIR /bricks/b1 ; MUST DECLARE the custom var _BRICK_DIR
+ _VOL_NAME Vol-1
}
################################################################################
# This defines a Brick Status service
# Edit this sample
# host_name = host the brick is on
-# service_description = brick name of form serverip:brickdir
+# service_description = Brick Status - <brickdir>
# _BRICK_DIR = Path to brick on server
+# _VOL_NAME = Volume name the brick is part of
################################################################################
define service {
- use brick-passive-service
- host_name host.ipaddress1
- service_description Brick Status - host.ipaddress1:/bricks/b1
- _BRICK_DIR /bricks/b1 ; MUST DECLARE the custom var _BRICK_DIR
+ use brick-passive-service
+ host_name host.ipaddress1
+ service_description Brick Status - /bricks/b1
+ _BRICK_DIR /bricks/b1 ; MUST DECLARE the custom var _BRICK_DIR
+ _VOL_NAME Vol-1
}
################################################################################
diff --git a/plugins/config_generator.py b/plugins/config_generator.py
index f76279f..7e36ae0 100644
--- a/plugins/config_generator.py
+++ b/plugins/config_generator.py
@@ -149,8 +149,7 @@ class GlusterNagiosConfManager:
brickService = {}
brickService['use'] = 'brick-service'
brickService['host_name'] = hostName
- serviceDesc = "Brick Utilization - %s:%s" % (hostName,
- brick['brickpath'])
+ serviceDesc = "Brick Utilization - %s" % brick['brickpath']
brickService['service_description'] = serviceDesc
brickService['_BRICK_DIR'] = brick['brickpath']
brickService['_VOL_NAME'] = brick['volumeName']
@@ -161,8 +160,7 @@ class GlusterNagiosConfManager:
brickService = {}
brickService['use'] = 'gluster-brick-passive-service'
brickService['host_name'] = hostName
- serviceDesc = "Brick Status - %s:%s" % (hostName,
- brick['brickpath'])
+ serviceDesc = "Brick Status - %s" % brick['brickpath']
brickService['service_description'] = serviceDesc
brickService['_BRICK_DIR'] = brick['brickpath']
brickService['_VOL_NAME'] = brick['volumeName']
diff --git a/tests/test_config_generator.py b/tests/test_config_generator.py
index 8c79057..d8e8789 100644
--- a/tests/test_config_generator.py
+++ b/tests/test_config_generator.py
@@ -45,14 +45,12 @@ class TestGlusterNagiosConfManager(TestCaseBase):
def _verifyHostServices(self, hostConfig, hostData):
for brick in hostData['bricks']:
- serviceDesc = "Brick Status - %s:%s" % (hostData['hostname'],
- brick['brickpath'])
+ serviceDesc = "Brick Status - %s" % brick['brickpath']
service = self._findServiceInList(hostConfig['host_services'],
serviceDesc)
self.assertNotEqual(service, None,
"Brick status service is not created")
- serviceDesc = "Brick Utilization - %s:%s" % (hostData['hostname'],
- brick['brickpath'])
+ serviceDesc = "Brick Utilization - %s" % brick['brickpath']
service = self._findServiceInList(hostConfig['host_services'],
serviceDesc)
self.assertNotEqual(service, None,