diff --git a/check_tor b/check_tor index 76b5d85..dbb2529 100644 --- a/check_tor +++ b/check_tor @@ -82,7 +82,11 @@ def dotorcall(protocol,response): exitnagios("CRITICAL","the result '"+status+"' is not the expected value '"+response+"'") except Exception as e: - exitnagios("CRITICAL","unexpected error during the check "+str(e)) + exceptionmsg = str(e) + if exceptionmsg in [""]: + exitnagios("WARNING","cannot connect") + else: + exitnagios("CRITICAL","unexpected error during the check - "+exceptionmsg) #-------------------------------------------------------------------------------