Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2014-11-10 15:18:28,944 [noc.lib.debug] UNHANDLED EXCEPTION (2014-11-10 15:18:28.942201)
- Working directory: /opt/noc
- <type 'exceptions.TypeError'>
- unsupported operand type(s) for -: 'list' and 'list'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/pm/probe/metric.py (Line: 99)
- Function: convert_counter
- 92 # Repeat last result, even if None
- 93 return self.last_result
- 94 else:
- 95 # Counter wrap
- 96 return d_wrap / (t - self.last_time)
- 97 else:
- 98 # Normal counter increment
- 99 ==> return (v - self.last_value) / (t - self.last_time)
- 100
- 101 def convert_derive(self, t, v):
- 102 if not self.last_time or not self.last_value:
- 103 return None
- 104 return (v - self.last_value) / (t - self.last_time)
- 105
- Variables:
- self = <noc.pm.probe.metric.Metric object at 0x7f1f04a01fd0>
- t = 1415621908.941991
- v = [1]
- ------------------------------------------------------------------------
- File: /opt/noc/pm/probe/metric.py (Line: 54)
- Function: set_value
- 47 self.scale = scale
- 48 if convert != self.convert:
- 49 self.reset()
- 50 self.convert = convert
- 51 self.cvt = getattr(self, "convert_%s" % convert)
- 52
- 53 def set_value(self, t, v):
- 54 ==> r = self.cvt(t, v)
- 55 self.last_time = t
- 56 self.last_value = v
- 57 self.last_result = r
- 58 if r is not None:
- 59 r *= self.scale
- 60 self.daemon.sender.feed(self.policy, self.metric, int(t), r)
- Variables:
- self = <noc.pm.probe.metric.Metric object at 0x7f1f04a01fd0>
- t = 1415621908.941991
- v = [1]
- ------------------------------------------------------------------------
- File: /opt/noc/pm/probe/task.py (Line: 68)
- Function: run
- 61 self.logger.error("Handler must return dict. Returned: %s", result)
- 62 raise ValueError("Handler must return dict")
- 63 # Feed result
- 64 for m in result:
- 65 if m in self.mdata:
- 66 v = result[m]
- 67 if v is not None:
- 68 ==> self.mdata[m].set_value(t, v)
- 69 self.logger.debug("Done")
- 70 except:
- 71 error_report()
- 72 self.last_run = self.next_run
- 73 self.next_run = self.get_next_run()
- 74 self.running = False
- Variables:
- result = {'Interface | Load | In': [1], 'Interface | Load | Out': [1]}
- self = <Task 27d9abb0-954c-5bf7-b3c9-42e25dd767bd>
- m = 'Interface | Load | In'
- t = 1415621908.941991
- v = [1]
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement