Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2016-07-26 13:09:38.895486 [discovery|periodic|10.26.144.9|metrics] Collecting metrics
- 2016-07-26 13:09:38.897976 [discovery|periodic|10.26.144.9|metrics] UNHANDLED EXCEPTION (2016-07-26 13:09:38.896600)
- BRANCH: feature/microservices TIP: 0f116464e015
- PROCESS: ./services/discovery/service.py
- ERROR FINGERPRINT: ac22a5eb-c7e5-5c85-9b85-62352368fbfe
- WORKING DIRECTORY: /opt/noc
- EXCEPTION: <type 'exceptions.TypeError'> list indices must be integers, not str
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: services/discovery/jobs/periodic/metrics.py (Line: 133)
- Function: handler
- 126 ipr = self.interface_profile_metrics_cache[i["profile"]]
- 127 self.logger.debug("Interface %s. ipr=%s", i["name"], ipr)
- 128 if not ipr:
- 129 continue
- 130 if "ifindex" in i:
- 131 hints["ifindexes"][i["name"]] = i["ifindex"]
- 132 for metric in ipr:
- 133 ==> if ipr[metric]["scope"] != "i":
- 134 continue # Ignore non-interface scoped metrics
- 135 if metric in metrics:
- 136 metrics[metric]["interfaces"] += [i["name"]]
- 137 else:
- 138 metrics[metric] = {
- 139 "interfaces": [i["name"]],
- Variables:
- i_thresholds = defaultdict(<type 'dict'>, {})
- metrics = {}
- i =
- {u'_id': ObjectId('57922f98d2ebdb021b8716e5'),
- u'ifindex': 1,
- u'name': u'1',
- u'profile': ObjectId('57971669d2ebdb1cbc096ce2')}
- q_tags = <function q_tags at 0x7ff741a24c08>
- metric = u'Interface | Load | In'
- o_thresholds = defaultdict(<type 'dict'>, {})
- ipr =
- {u'Interface | Load | In': [None, None, None, None],
- u'Interface | Load | Out': [None, None, None, None],
- u'Interface | Packets | In': [None, None, None, None],
- u'Interface | Packets | Out': [None, None, None, None]}
- o_metrics = []
- q = <function q at 0x7ff741a24d70>
- self =
- <noc.services.discovery.jobs.periodic.metrics.MetricsCheck object at 0x7ff7438dc310>
- hints = {'ifindexes': {u'1': 1}}
- ------------------------------------------------------------------------
- File: services/discovery/jobs/base.py (Line: 130)
- Function: run
- 123 self.logger.info(
- 124 "Capability '%s' is disabled. Skipping",
- 125 cn
- 126 )
- 127 return
- 128 # Run check
- 129 try:
- 130 ==> self.handler()
- 131 except RPCError as e:
- 132 self.logger.error("Terminated due RPC error: %s", e)
- 133 except Exception:
- 134 error_report(logger=self.logger)
- 135
- 136 def handler(self):
- Variables:
- self =
- <noc.services.discovery.jobs.periodic.metrics.MetricsCheck object at 0x7ff7438dc310>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement