Module: check_mk
Branch: master
Commit: b46e3345dd05f1ad117390e60dbcf826785648d2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b46e3345dd05f1…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Nov 26 15:31:58 2014 +0100
Always activate agent simulator for stored SNMP walks
---
modules/check_mk.py | 3 +--
modules/snmp.py | 4 +---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/modules/check_mk.py b/modules/check_mk.py
index 66abbe4..426962a 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -5832,8 +5832,7 @@ def read_config_files(with_autochecks=True, with_conf_d=True):
]
# Load agent simulator if enabled in configuration
- if agent_simulator:
- execfile(modules_dir + "/agent_simulator.py", globals(), globals())
+ execfile(modules_dir + "/agent_simulator.py", globals(), globals())
# Compute parameters for a check honoring factory settings,
diff --git a/modules/snmp.py b/modules/snmp.py
index 159e2a4..22dd216 100644
--- a/modules/snmp.py
+++ b/modules/snmp.py
@@ -360,9 +360,7 @@ def get_stored_snmpwalk(hostname, oid):
o = o[1:]
if o == oid or o.startswith(oid_prefix + "."):
if len(parts) > 1:
- value = parts[1]
- if agent_simulator:
- value = agent_simulator_process(value)
+ value = agent_simulator_process(parts[1])
else:
value = ""
# Fix for missing starting oids