Skip to content

Commit 2f36fdd

Browse files
committed
added timeout
1 parent a9f3761 commit 2f36fdd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

localChecks/check.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/python3
22
"""
3-
This check combines memory, load and disk checks.
3+
This check combines memory, load, disk and network checks.
44
55
This file is under Apache 2.0 License
66

snmpChecks/check_imm2.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ def getOID(property):
8383

8484
def performCheck(oid, user, authPasswd, privPasswd, ip, level, authAlgo, privAlgo):
8585
if level == "authPriv":
86-
output = check_output(['snmpwalk', '-v', '3', '-l', 'authPriv', '-u', user, '-a', authAlgo, '-A', authPasswd, '-x', privAlgo, '-X', privPasswd, ip, oid])
86+
output = check_output(['snmpwalk', '-v', '3', '-l', 'authPriv', '-u', user, '-a', authAlgo, '-A', authPasswd, '-x', privAlgo, '-X', privPasswd, ip, oid, '-t', '10'])
8787
elif level == 'authNoPriv':
88-
output = check_output(['snmpwalk', '-v', '3', '-l', 'authNoPriv', '-u', user, '-a', authAlgo, '-A', authPasswd, ip, oid])
88+
output = check_output(['snmpwalk', '-v', '3', '-l', 'authNoPriv', '-u', user, '-a', authAlgo, '-A', authPasswd, ip, oid, '-t', '10'])
8989
elif level == 'noAuthNoPriv':
90-
output = check_output(['snmpwalk', '-v', '3', '-l', 'noAuthNoPriv', '-u', user, ip, oid])
90+
output = check_output(['snmpwalk', '-v', '3', '-l', 'noAuthNoPriv', '-u', user, ip, oid, '-t', '10'])
9191
return output.decode('utf-8').replace('"', '').split('\n')
9292

9393
# gets: output of snmpwalk

0 commit comments

Comments
 (0)