-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
When SNMP asset (PDU/UPS) with 0
in its key is created, snmpsimd.py
reports evalsha execution error (script passed to snmpsimd.py
located in enginecore/scriptsnmppub.lua
);
Request var-binds: 1.3.6.1.2.1.1.2.0=<>, flags: NEXT, GET
data error at /tmp/simengine/190/public.snmprec controller for 1.3.6.1.2.1.1.2.0: Error running script (call to f_14c4ad5b88087a058dff387f56cbe4c356819080): @user_script:18: user_script:18: attempt to perform arithmetic on local 'start_time' (a boolean value)
Most likely happening due to 0
substitution with key:gsub('0', '')
in the evalsha lua script:
simengine/enginecore/script/snmppub.lua
Lines 9 to 12 in e9629a4
if oid == "1.3.6.1.2.1.1.3.0" then | |
local formatted_key, _ = key:gsub('0', '') | |
local start_time = redis.call('get', (tonumber(formatted_key)..":start_time")) | |
local now = redis.call('TIME') |
Metadata
Metadata
Assignees
Labels
No labels