Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
flucas1 committed Aug 11, 2024
1 parent 690acc6 commit 6c4f148
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion check_tor
Original file line number Diff line number Diff line change
Expand Up @@ -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 ["<urlopen error [Errno 104] Connection reset by peer>"]:
exitnagios("WARNING","cannot connect")
else:
exitnagios("CRITICAL","unexpected error during the check - "+exceptionmsg)

#-------------------------------------------------------------------------------

Expand Down

0 comments on commit 6c4f148

Please sign in to comment.