Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2014-09-24 17:46:09,309 [noc.lib.debug] UNHANDLED EXCEPTION (2014-09-24 17:46:09.299369)
- Working directory: /opt/noc
- <type 'exceptions.TypeError'>
- unsupported operand type(s) for -: 'NoneType' and 'long'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/pm/probe/metric.py (Line: 70)
- Function: convert_counter
- 63 def convert_counter(self, t, v):
- 64 if not self.last_time or not self.last_value:
- 65 return None
- 66 if v < self.last_value:
- 67 # Counter wrap
- 68 mc = MAX64 if self.last_value >= MAX32 else MAX32
- 69 self.last_value -= mc
- 70 ==> return (v - self.last_value) / (t - self.last_time)
- 71
- 72 def convert_derive(self, t, v):
- 73 if not self.last_time or not self.last_value:
- 74 return None
- 75 return (v - self.last_value) / (t - self.last_time)
- 76
- Variables:
- self = <noc.pm.probe.metric.Metric object at 0x8176f1e10>
- t = 1411566369.299279
- mc = 4294967295L
- v = None
- ------------------------------------------------------------------------
- File: /opt/noc/pm/probe/metric.py (Line: 48)
- Function: set_value
- 41 self.scale = scale
- 42 if convert != self.convert:
- 43 self.reset()
- 44 self.convert = convert
- 45 self.cvt = getattr(self, "convert_%s" % convert)
- 46
- 47 def set_value(self, t, v):
- 48 ==> r = self.cvt(t, v)
- 49 self.last_time = t
- 50 self.last_value = v
- 51 if r is not None:
- 52 r *= self.scale
- 53 self.daemon.sender.feed(self.policy, self.metric, int(t), r)
- 54 # @todo: Check thresholds
- Variables:
- self = <noc.pm.probe.metric.Metric object at 0x8176f1e10>
- t = 1411566369.299279
- v = None
- ------------------------------------------------------------------------
- File: /opt/noc/pm/probe/task.py (Line: 66)
- Function: run
- 59 result = {self.default_metric_type: result}
- 60 else:
- 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 ==> self.mdata[m].set_value(t, result[m])
- 67 self.logger.debug("Done")
- 68 except:
- 69 error_report()
- 70 self.last_run = self.next_run
- 71 self.next_run = self.get_next_run()
- 72 self.running = False
- Variables:
- self = <Task 130557e0-2562-53ad-990f-1ba0015b05a0>
- m = 'Interface | Load | In'
- t = 1411566369.299279
- result = {'Interface | Load | In': None, 'Interface | Load | Out': None}
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement