summaryrefslogtreecommitdiffstats
path: root/plugins/nscautils.py.in
diff options
context:
space:
mode:
authorTimothy Asir <tjeyasin@redhat.com>2014-04-16 23:42:27 +0530
committerBala.FA <barumuga@redhat.com>2014-04-29 10:14:33 +0530
commitab257f71eaf7ee61859ba54af36e1725adb6df8d (patch)
tree8785d1293cf0c4f11d7d0bff87b4c2b714784508 /plugins/nscautils.py.in
parent33481089ab443de44bbffca7533e3ab27f65ce8f (diff)
Use hostname from the config for sending proc status thru nsca
fetch the hostname from nagios_server.conf file otherwise use the host-fqdn name for sending proc status thru nsca. And fix the check_proc_status plugin path in cron.d/gluster-proc.crontab file. Change-Id: Ibfc027742b58d87daa7e54aa553892d42c71e795 Signed-off-by: Timothy Asir <tjeyasin@redhat.com>
Diffstat (limited to 'plugins/nscautils.py.in')
-rw-r--r--plugins/nscautils.py.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/nscautils.py.in b/plugins/nscautils.py.in
index 10247e2..6ad96f5 100644
--- a/plugins/nscautils.py.in
+++ b/plugins/nscautils.py.in
@@ -31,6 +31,12 @@ def getNagiosServerIP():
return config.get('NAGIOS-SERVER', 'nagios_server')
+def getCurrentHostNameInNagiosServer():
+ config = ConfigParser.ConfigParser()
+ config.read(__NAGIOSSERVER_CONF)
+ return config.get('HOST-NAME', 'hostname_in_nagios')
+
+
def getNagiosClusterName():
config = ConfigParser.ConfigParser()
config.read(__NAGIOSSERVER_CONF)