Advertisement
STAVR

Collecting metrics

Jul 26th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.25 KB | None | 0 0
  1. 2016-07-26 13:09:38.895486 [discovery|periodic|10.26.144.9|metrics] Collecting metrics
  2. 2016-07-26 13:09:38.897976 [discovery|periodic|10.26.144.9|metrics] UNHANDLED EXCEPTION (2016-07-26 13:09:38.896600)
  3. BRANCH: feature/microservices TIP: 0f116464e015
  4. PROCESS: ./services/discovery/service.py
  5. ERROR FINGERPRINT: ac22a5eb-c7e5-5c85-9b85-62352368fbfe
  6. WORKING DIRECTORY: /opt/noc
  7. EXCEPTION: <type 'exceptions.TypeError'> list indices must be integers, not str
  8. START OF TRACEBACK
  9. ------------------------------------------------------------------------
  10. File: services/discovery/jobs/periodic/metrics.py (Line: 133)
  11. Function: handler
  12. 126 ipr = self.interface_profile_metrics_cache[i["profile"]]
  13. 127 self.logger.debug("Interface %s. ipr=%s", i["name"], ipr)
  14. 128 if not ipr:
  15. 129 continue
  16. 130 if "ifindex" in i:
  17. 131 hints["ifindexes"][i["name"]] = i["ifindex"]
  18. 132 for metric in ipr:
  19. 133 ==> if ipr[metric]["scope"] != "i":
  20. 134 continue # Ignore non-interface scoped metrics
  21. 135 if metric in metrics:
  22. 136 metrics[metric]["interfaces"] += [i["name"]]
  23. 137 else:
  24. 138 metrics[metric] = {
  25. 139 "interfaces": [i["name"]],
  26. Variables:
  27. i_thresholds = defaultdict(<type 'dict'>, {})
  28. metrics = {}
  29. i =
  30. {u'_id': ObjectId('57922f98d2ebdb021b8716e5'),
  31. u'ifindex': 1,
  32. u'name': u'1',
  33. u'profile': ObjectId('57971669d2ebdb1cbc096ce2')}
  34. q_tags = <function q_tags at 0x7ff741a24c08>
  35. metric = u'Interface | Load | In'
  36. o_thresholds = defaultdict(<type 'dict'>, {})
  37. ipr =
  38. {u'Interface | Load | In': [None, None, None, None],
  39. u'Interface | Load | Out': [None, None, None, None],
  40. u'Interface | Packets | In': [None, None, None, None],
  41. u'Interface | Packets | Out': [None, None, None, None]}
  42. o_metrics = []
  43. q = <function q at 0x7ff741a24d70>
  44. self =
  45. <noc.services.discovery.jobs.periodic.metrics.MetricsCheck object at 0x7ff7438dc310>
  46. hints = {'ifindexes': {u'1': 1}}
  47. ------------------------------------------------------------------------
  48. File: services/discovery/jobs/base.py (Line: 130)
  49. Function: run
  50. 123 self.logger.info(
  51. 124 "Capability '%s' is disabled. Skipping",
  52. 125 cn
  53. 126 )
  54. 127 return
  55. 128 # Run check
  56. 129 try:
  57. 130 ==> self.handler()
  58. 131 except RPCError as e:
  59. 132 self.logger.error("Terminated due RPC error: %s", e)
  60. 133 except Exception:
  61. 134 error_report(logger=self.logger)
  62. 135
  63. 136 def handler(self):
  64. Variables:
  65. self =
  66. <noc.services.discovery.jobs.periodic.metrics.MetricsCheck object at 0x7ff7438dc310>
  67. ------------------------------------------------------------------------
  68. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement