Skip to content

Commit

Permalink
Merge pull request djmitche#4 from diogokiss/patch-1
Browse files Browse the repository at this point in the history
Update pynsca.py
  • Loading branch information
djmitche committed Dec 21, 2012
2 parents 75a0ef4 + 79f96dc commit 88c55a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pynsca.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def host_result(self, host_name, return_code, plugin_output):
"""
self.svc_result(host_name, '', return_code, plugin_output)

def svc_result(self, host_name, svc_description, return_code, plugin_output):
def svc_result(self, host_name, svc_description, return_code, plugin_output, timeout=5):
"""
Send a service result to the configured monitoring host
Expand All @@ -129,6 +129,7 @@ def svc_result(self, host_name, svc_description, return_code, plugin_output):
@param plugin_output: textual output
"""
sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sk.settimeout(timeout)
sk.connect((self.monitoring_server, self.monitoring_port))

# read packet
Expand Down

0 comments on commit 88c55a8

Please sign in to comment.