diff options
author | bc1610@student.uni-lj.si <bc1610@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2014-12-12 15:17:23 +0000 |
---|---|---|
committer | bc1610@student.uni-lj.si <bc1610@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2014-12-12 15:17:23 +0000 |
commit | e3b69adf81a9e73a54414c4db1411bcaf4614f9a (patch) | |
tree | 2543c7312c0c65429a99306ea4fd9a1dfe422c29 | |
parent | 536746cd396a7d3a27e9b04cc8154f5f62e4bd07 (diff) |
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@46 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
-rw-r--r-- | kpov_judge/tasks/snmp_agent_uptime/task.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kpov_judge/tasks/snmp_agent_uptime/task.py b/kpov_judge/tasks/snmp_agent_uptime/task.py index 38072f8..a32a607 100644 --- a/kpov_judge/tasks/snmp_agent_uptime/task.py +++ b/kpov_judge/tasks/snmp_agent_uptime/task.py @@ -107,8 +107,12 @@ def task(SNMP_VALUE, SNMP_OID_ON_SERVER, SNMP_OID_ON_CLIENT): # read data from SNMP server import netsnmp session = netsnmp.Session(DestHost=SNMP_VALUE['type'],Version=2,Community='public') - vars=netsnmp.VarList(netsnmp.Varbind(SNMP_OID_SERVER['type']) - + #Dobimo vrednost casa + vars=netsnmp.Varbind(SNMP_OID_ON_SERVER['type']) + #Shranimo vrednost casa v imenik od SNMP_OID_ON_SERVER + var=netsnmp.Varbind(SNMP_OID_ON_SERVER['descriptions'['si'],'0',session.get(vars),SNMP_OID_ON_SERVER['type']) + netsnmp.snmpset(var,Version=2,DestHost=SNMP_VALUE['type'],Community='public') + return session.get(vars) |