From 6c4f1488c630357e003c010875c2ada3726fc403 Mon Sep 17 00:00:00 2001 From: Fernando Lucas Date: Sun, 11 Aug 2024 20:29:22 +0200 Subject: [PATCH] update --- check_tor | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) #-------------------------------------------------------------------------------