From 87b137f76266e2232445c0b7ba16f2feacf2b4cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1ll=20Gu=C3=B0j=C3=B3n=20Sigur=C3=B0sson?= Date: Mon, 18 Oct 2010 12:27:03 +0000 Subject: [PATCH] system name added to phone_home options --- check_eva/trunk/check_eva.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/check_eva/trunk/check_eva.py b/check_eva/trunk/check_eva.py index 6e43e16..c6da5fd 100644 --- a/check_eva/trunk/check_eva.py +++ b/check_eva/trunk/check_eva.py @@ -308,6 +308,7 @@ def end(summary,perfdata,longserviceoutput,nagios_state): global hostname global mode global escape_newlines + global check_system message = "%s - %s" % ( state[nagios_state], summary) if show_perfdata: @@ -321,7 +322,7 @@ def end(summary,perfdata,longserviceoutput,nagios_state): if do_phone_home == True: try: if nagios_myhostname == None: nagios_myhostname = hostname - phone_home(nagios_server,nagios_port, status=nagios_state, message=message, hostname=nagios_myhostname, servicename=mode) + phone_home(nagios_server,nagios_port, status=nagios_state, message=message, hostname=nagios_myhostname, servicename=mode,system=check_system) except: raise print message @@ -341,8 +342,9 @@ class ProxiedTransport(xmlrpclib.Transport): ''' phone_home: Sends results to remote nagios server via python xml-rpc ''' -def phone_home(nagios_server,nagios_port, status, message, hostname=None, servicename=None): +def phone_home(nagios_server,nagios_port, status, message, hostname=None, servicename=None,system=None): debug("phoning home: %s" % (servicename) ) + servicename = str(servicename) + str(system) uri = "http://%s:%s" % (nagios_server,nagios_port) global proxyserver