Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.81 KB | None | 0 0
  1. 2019-02-20 17:18:49,423 [noc.core.dcs.base] Resolve near service postgres
  2. 2019-02-20 17:18:49,423 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/postgres?passing=1&near=_agent
  3. 2019-02-20 17:18:49,427 [noc.core.http.client] HTTP Response 200
  4. 2019-02-20 17:18:49,427 [noc.core.dcs.base] Resolved near service postgres to ['172.31.234.227:5432']
  5. 2019-02-20 17:18:49,716 [noc.core.dcs.base] Running resolver for service mongo
  6. 2019-02-20 17:18:49,717 [noc.core.dcs.base] [mongo] Starting resolver
  7. 2019-02-20 17:18:49,717 [noc.core.dcs.base] [mongo] Requesting changes from index 0
  8. 2019-02-20 17:18:49,717 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?passing=1
  9. 2019-02-20 17:18:49,720 [noc.core.http.client] HTTP Response 200
  10. 2019-02-20 17:18:49,721 [noc.core.dcs.base] [mongo] Index changed 0 -> 309411. Applying changes
  11. 2019-02-20 17:18:49,721 [noc.core.dcs.base] [mongo] Set active services to: mongo: 172.31.234.227:27017
  12. 2019-02-20 17:18:49,721 [noc.core.dcs.base] [mongo] Requesting changes from index 309411
  13. 2019-02-20 17:18:49,721 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?index=309411&passing=1
  14. 2019-02-20 17:18:49,723 [noc.lib.nosql] Connecting to MongoDB {'username': 'noc', 'authentication_source': 'noc', 'readPreference': 'secondaryPreferred', 'replicaSet': 'noc', 'maxIdleTimeMS': 60000, 'db': 'noc', 'socketKeepAlive': True, 'host': 'mongodb://noc:********@172.31.234.227:27017/noc', 'password': '********'}
  15. 2019-02-20 17:18:49,784 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
  16. 2019-02-20 17:18:50,085 [noc.main.models.doccategory] Registering Capability
  17. 2019-02-20 17:18:50,086 [noc.main.models.doccategory] Registering MetricType
  18. 2019-02-20 17:18:50,296 [noc.main.models.doccategory] Registering ConnectionType
  19. 2019-02-20 17:18:50,301 [noc.main.models.doccategory] Registering ObjectModel
  20. 2019-02-20 17:18:50,320 [noc.main.models.textindex] Adding FTS index for sa.managedobject
  21. 2019-02-20 17:18:50,329 [noc.main.models.textindex] Adding FTS index for ip.vrf
  22. 2019-02-20 17:18:50,374 [noc.core.loader.base] [script] Loading script DLink.DxS_Smart.get_portchannel
  23. 2019-02-20 17:18:50,398 [noc.core.loader.base] [profile] Loading profile DLink.DxS_Smart
  24. 2019-02-20 17:18:50,398 [noc.core.loader.base] [profile] Failed to load profile DLink.DxS_Smart: No module named profile
  25. 2019-02-20 17:18:50,398 [noc.core.loader.base] [profile] Deprecation warning on DLink.DxS_Smart profile: __init__.py should be moved to profile.py
  26. 2019-02-20 17:18:50,399 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] Filling get_version cache with {'platform': u'DGS-1210-28P/C1', 'version': u'4.10.B043', 'vendor': u'D-Link'}
  27. 2019-02-20 17:18:50,399 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] Running. Input arguments: {}, timeout 3600
  28. 2019-02-20 17:18:50,399 [noc.core.loader.base] [script] Loading script DLink.DxS_Smart.get_version
  29. 2019-02-20 17:18:50,402 [script] [DLink.DxS_Smart.get_version|192.168.57.69] Running. Input arguments: {}, timeout 3600
  30. 2019-02-20 17:18:50,402 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [snmp] Creating IOLoop
  31. 2019-02-20 17:18:50,402 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [snmp] Create UDP socket
  32. 2019-02-20 17:18:50,402 [noc.core.ioloop.snmp] [192.168.57.69] SNMP GET ['1.3.6.1.2.1.1.1.0']
  33. 2019-02-20 17:18:50,418 [noc.core.ioloop.snmp] [192.168.57.69] GET result: 'DGS-1210-28P/C1 4.10.B043'
  34. 2019-02-20 17:18:50,418 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] Open telnet CLI
  35. 2019-02-20 17:18:50,419 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Creating IOLoop
  36. 2019-02-20 17:18:50,420 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Connecting (u'192.168.57.69', 23)
  37. 2019-02-20 17:18:50,428 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Connected
  38. 2019-02-20 17:18:50,428 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Changing state to <start>
  39. 2019-02-20 17:18:50,429 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Setting timeout: 60s
  40. 2019-02-20 17:18:50,460 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\x1b[H\x1b[J'
  41. 2019-02-20 17:18:50,461 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\r\x1b[100B'
  42. 2019-02-20 17:18:50,462 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received WILL SGA
  43. 2019-02-20 17:18:50,462 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Send DO SGA
  44. 2019-02-20 17:18:50,463 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received WILL ECHO
  45. 2019-02-20 17:18:50,463 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Send DO ECHO
  46. 2019-02-20 17:18:50,464 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received DO NAWS
  47. 2019-02-20 17:18:50,464 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Send WILL NAWS
  48. 2019-02-20 17:18:50,464 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Send IAC SB '\x1f' '\x00\x80\x00\x80' IAC SE
  49. 2019-02-20 17:18:50,466 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\n\n\n\n'
  50. 2019-02-20 17:18:50,467 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'DGS-1210-28P login: '
  51. 2019-02-20 17:18:50,467 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Match: ([Uu]ser ?[Nn]ame|[Ll]ogin): ?
  52. 2019-02-20 17:18:50,467 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Changing state to <username>
  53. 2019-02-20 17:18:50,467 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Send: 'admin\n'
  54. 2019-02-20 17:18:50,468 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Setting timeout: 30s
  55. 2019-02-20 17:18:50,528 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'a'
  56. 2019-02-20 17:18:50,530 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'd'
  57. 2019-02-20 17:18:50,533 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'm'
  58. 2019-02-20 17:18:50,534 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'i'
  59. 2019-02-20 17:18:50,535 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'n'
  60. 2019-02-20 17:18:50,536 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\r\n'
  61. 2019-02-20 17:18:50,537 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\rPassword: '
  62. 2019-02-20 17:18:50,537 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Match: [Pp]ass[Ww]ord: ?
  63. 2019-02-20 17:18:50,538 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Changing state to <password>
  64. 2019-02-20 17:18:50,538 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Send: 'trololo\n'
  65. 2019-02-20 17:18:50,538 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Setting timeout: 30s
  66. 2019-02-20 17:18:50,543 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\r\n'
  67. 2019-02-20 17:18:50,544 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\r\n'
  68. 2019-02-20 17:18:50,546 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\rDGS-1210-28P> '
  69. 2019-02-20 17:18:50,547 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Match: (?P<hostname>\S+(:\S+)*)[#>]
  70. 2019-02-20 17:18:50,547 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Changing state to <prompt>
  71. 2019-02-20 17:18:50,547 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Refining pattern prompt to 'DGS\\-1210\\-28P[#>]'
  72. 2019-02-20 17:18:50,547 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Resetting timeouts
  73. 2019-02-20 17:18:50,548 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Send: 'show switch\n'
  74. 2019-02-20 17:18:50,551 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 's'
  75. 2019-02-20 17:18:50,552 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'h'
  76. 2019-02-20 17:18:50,553 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'o'
  77. 2019-02-20 17:18:50,554 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'w'
  78. 2019-02-20 17:18:50,555 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: ' '
  79. 2019-02-20 17:18:50,556 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 's'
  80. 2019-02-20 17:18:50,557 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'w'
  81. 2019-02-20 17:18:50,558 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'i'
  82. 2019-02-20 17:18:50,560 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 't'
  83. 2019-02-20 17:18:50,561 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'c'
  84. 2019-02-20 17:18:50,562 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'h'
  85. 2019-02-20 17:18:50,563 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\r'
  86. 2019-02-20 17:18:50,564 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\n'
  87. 2019-02-20 17:18:50,568 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'System name : zsw-7\r\n'
  88. 2019-02-20 17:18:50,570 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'System Contact : \r\n'
  89. 2019-02-20 17:18:50,571 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'System Location : Factory\r\n'
  90. 2019-02-20 17:18:50,572 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'System up time : 16 days, 7 hrs, 37 min, 44 secs\r\n'
  91. 2019-02-20 17:18:50,573 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'System Time : 20/02/2019 17:18:50\r\n'
  92. 2019-02-20 17:18:50,574 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'System hardware version : C1\r\n'
  93. 2019-02-20 17:18:50,575 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'System firmware version : 4.10.B043\r\n'
  94. 2019-02-20 17:18:50,576 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'System boot version : 1.00.016\r\n'
  95. 2019-02-20 17:18:50,577 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'System serial number : XXXXXXXXXXXXX\r\n'
  96. 2019-02-20 17:18:50,578 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'MAC Address : C4-12-F5-E6-C4-15\r\n'
  97. 2019-02-20 17:18:50,579 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\r\n'
  98. 2019-02-20 17:18:50,581 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\rDGS-1210-28P> '
  99. 2019-02-20 17:18:50,581 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Match: DGS\-1210\-28P[#>]
  100. 2019-02-20 17:18:50,581 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Changing state to <prompt>
  101. 2019-02-20 17:18:50,582 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Command: show switch
  102. show switch
  103. System name : zsw-7
  104. System Contact :
  105. System Location : Factory
  106. System up time : 16 days, 7 hrs, 37 min, 44 secs
  107. System Time : 20/02/2019 17:18:50
  108. System hardware version : C1
  109. System firmware version : 4.10.B043
  110. System boot version : 1.00.016
  111. System serial number : XXXXXXXXXXXXX
  112. MAC Address : C4-12-F5-E6-C4-15
  113.  
  114.  
  115. 2019-02-20 17:18:50,582 [script] [DLink.DxS_Smart.get_version|192.168.57.69] Caching result
  116. 2019-02-20 17:18:50,583 [script] [DLink.DxS_Smart.get_version|192.168.57.69] Result: {'platform': 'DGS-1210-28P/C1', 'version': '4.10.B043', 'vendor': 'DLink', 'attributes': {'HW version': 'C1', 'Serial Number': 'XXXXXXXXXXXXX', 'Boot PROM': '1.00.016'}}
  117. 2019-02-20 17:18:50,583 [script] [DLink.DxS_Smart.get_version|192.168.57.69] Complete (181.18ms)
  118. 2019-02-20 17:18:50,583 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [snmp] Closing UDP socket
  119. 2019-02-20 17:18:50,583 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [snmp] Closing IOLoop
  120. 2019-02-20 17:18:50,583 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Closing IOStream
  121. 2019-02-20 17:18:50,583 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Closing IOLoop
  122. 2019-02-20 17:18:50,617 [noc.core.debug] UNHANDLED EXCEPTION (2019-02-20 17:18:50.598216)
  123. PROCESS: ./commands/script.py
  124. VERSION: 19.1
  125.  
  126. BRANCH: HEAD CHANGESET: e8d18ab3
  127. ERROR FINGERPRINT: 60c6eac9-3043-533a-93cb-069f27ae447f
  128. WORKING DIRECTORY: /opt/noc
  129. EXCEPTION: <type 'exceptions.NotImplementedError'>
  130. START OF TRACEBACK
  131. ------------------------------------------------------------------------
  132. File: sa/profiles/DLink/DxS_Smart/get_portchannel.py (Line: 40)
  133. Function: execute
  134. 33 for c in ports:
  135. 34 for i in range(len(c)):
  136. 35 p += bin[int(c[i], 16)]
  137. 36 return p
  138. 37 try:
  139. 38 pmib = self.profile.get_pmib(self.scripts.get_version())
  140. 39 if pmib is None:
  141. 40 ==> raise NotImplementedError()
  142. 41 for v in self.snmp.get_tables([
  143. 42 pmib + ".8.1.3.1.1",
  144. 43 pmib + ".8.1.3.1.2",
  145. 44 pmib + ".8.1.3.1.3"], bulk=True):
  146. 45 oid = "1.3.6.1.2.1.31.1.1.1.1." + str(v[1])
  147. 46 port = self.snmp.get(oid, cached=True) # IF-MIB
  148. Variables:
  149. self =
  150. <noc.sa.profiles.DLink.DxS_Smart.get_portchannel.Script object at 0x7fbcdb944e10>
  151. r = []
  152. pmib = None
  153. hex2bin = <function hex2bin at 0x7fbcdb96a488>
  154. ------------------------------------------------------------------------
  155. File: core/script/base.py (Line: 258)
  156. Function: run
  157. 251 self.logger.info("Using cached result")
  158. 252 cache_hit = True
  159. 253 except KeyError:
  160. 254 pass
  161. 255 # Execute script
  162. 256 if not cache_hit:
  163. 257 try:
  164. 258 ==> result = self.execute(**self.args)
  165. 259 if self.cache and self.parent and result:
  166. 260 self.logger.info("Caching result")
  167. 261 self.set_cache(self.name, self.args, result)
  168. 262 finally:
  169. 263 if not self.parent:
  170. 264 # Close SNMP socket when necessary
  171. Variables:
  172. cache_hit = False
  173. self =
  174. <noc.sa.profiles.DLink.DxS_Smart.get_portchannel.Script object at 0x7fbcdb944e10>
  175. ------------------------------------------------------------------------
  176. File: commands/script.py (Line: 122)
  177. Function: handle
  178. 115 args=args,
  179. 116 version=version,
  180. 117 timeout=3600,
  181. 118 name=script
  182. 119 )
  183. 120 span_sample = 1 if update_spec else 0
  184. 121 with Span(sample=span_sample):
  185. 122 ==> result = scr.run()
  186. 123 if pretty:
  187. 124 pprint.pprint(result)
  188. 125 elif yaml:
  189. 126 import yaml
  190. 127 import sys
  191. 128 yaml.dump(result, sys.stdout)
  192. Variables:
  193. obj = <ManagedObject: zsw-7>
  194. service = <__main__.ServiceStub object at 0x7fbcdb944c50>
  195. script = u'DLink.DxS_Smart.get_portchannel'
  196. script_class = <class 'noc.sa.profiles.DLink.DxS_Smart.get_portchannel.Script'>
  197. update_spec = None
  198. args = {}
  199. use_snmp = True
  200. caps =
  201. {u'DB | Interfaces': 28,
  202. u'SNMP': True,
  203. u'SNMP | Bulk': True,
  204. u'SNMP | IF-MIB': True,
  205. u'SNMP | IF-MIB | HC': True,
  206. u'SNMP | v1': True,
  207. u'SNMP | v2c': True}
  208. self = <__main__.Command object at 0x7fbcecc5e090>
  209. yaml = False
  210. object_name = ['zsw-7']
  211. version =
  212. {'platform': u'DGS-1210-28P/C1', 'vendor': u'D-Link', 'version': u'4.10.B043'}
  213. arguments = []
  214. pretty = False
  215. credentials =
  216. {'access_preference': u'SC',
  217. 'address': u'192.168.57.69',
  218. 'cli_protocol': 'telnet',
  219. 'password': u'trololo',
  220. 'path': None,
  221. 'raise_privileges': True,
  222. 'snmp_ro': u'ololo',
  223. 'snmp_version': 'v2c',
  224. 'super_password': None,
  225. 'user': u'admin'}
  226. access_preference = None
  227. options = {}
  228. span_sample = 0
  229. scr =
  230. <noc.sa.profiles.DLink.DxS_Smart.get_portchannel.Script object at 0x7fbcdb944e10>
  231. ------------------------------------------------------------------------
  232. File: core/management/base.py (Line: 78)
  233. Function: run_from_argv
  234. 71 show_metrics = cmd_options.pop("show_metrics", False)
  235. 72 self.no_progressbar = cmd_options.pop("no_progressbar", False)
  236. 73 if enable_profiling:
  237. 74 # Start profiler
  238. 75 import yappi
  239. 76 yappi.start()
  240. 77 try:
  241. 78 ==> return self.handle(*args, **cmd_options) or 0
  242. 79 except CommandError as e:
  243. 80 self.print(str(e))
  244. 81 return 1
  245. 82 except KeyboardInterrupt:
  246. 83 self.print("Ctrl+C")
  247. 84 return 3
  248. Variables:
  249. parser =
  250. ArgumentParser(prog='noc script', usage=None, description=None, version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
  251. loglevel = 'debug'
  252. enable_profiling = False
  253. args = ()
  254. cmd_options =
  255. {'access_preference': None,
  256. 'arguments': [],
  257. 'object_name': ['zsw-7'],
  258. 'pretty': False,
  259. 'script': ['get_portchannel'],
  260. 'update_spec': None,
  261. 'use_snmp': True,
  262. 'yaml': False}
  263. argv = ['--debug', 'get_portchannel', 'zsw-7']
  264. self = <__main__.Command object at 0x7fbcecc5e090>
  265. show_metrics = False
  266. error_report = <function error_report at 0x7fbcff5d85f0>
  267. options =
  268. Namespace(access_preference=None, arguments=[], object_name=['zsw-7'], pretty=False, script=['get_portchannel'], update_spec=None, use_snmp=True, yaml=False)
  269. ------------------------------------------------------------------------
  270. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement