Advertisement
Izya12

UZA-3

Apr 29th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.49 KB | None | 0 0
  1. root@Node1:/opt/noc# ./noc script --debug --pretty get_lldp_neighbors "UZA-3"
  2. 2018-04-29 17:06:05,476 [noc.core.dcs.base] Resolve near service postgres
  3. 2018-04-29 17:06:05,477 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/postgres?passing=1&near=_agent
  4. 2018-04-29 17:06:05,479 [noc.core.http.client] HTTP Response 200
  5. 2018-04-29 17:06:05,480 [noc.core.dcs.base] Resolved near service postgres to ['10.220.21.122:5432']
  6. 2018-04-29 17:06:06,344 [noc.core.dcs.base] Running resolver for service mongo
  7. 2018-04-29 17:06:06,345 [noc.core.dcs.base] [mongo] Starting resolver
  8. 2018-04-29 17:06:06,345 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?passing=1
  9. 2018-04-29 17:06:06,346 [noc.core.http.client] HTTP Response 200
  10. 2018-04-29 17:06:06,347 [noc.core.dcs.base] [mongo] Set active services to: mongo: 10.220.21.122:27017
  11. 2018-04-29 17:06:06,347 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?index=2246065&passing=1
  12. 2018-04-29 17:06:06,348 [noc.lib.nosql] Connecting to MongoDB {'username': 'noc', 'authentication_source': 'noc', 'readPreference': 'secondaryPreferred', 'replicaSet': 'noc', 'db': 'noc', 'socketKeepAlive': True, 'host': 'mongodb://noc:********@10.220.21.122:27017/noc', 'password': '********'}
  13. 2018-04-29 17:06:06,422 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
  14. 2018-04-29 17:06:06,488 [noc.main.models.doccategory] Registering Capability
  15. 2018-04-29 17:06:06,489 [noc.main.models.doccategory] Registering MetricType
  16. 2018-04-29 17:06:06,523 [noc.main.models.doccategory] Registering ConnectionType
  17. 2018-04-29 17:06:06,527 [noc.main.models.doccategory] Registering ObjectModel
  18. 2018-04-29 17:06:06,537 [noc.main.models.textindex] Adding FTS index for sa.managedobject
  19. 2018-04-29 17:06:06,552 [noc.main.models.textindex] Adding FTS index for ip.vrf
  20. 2018-04-29 17:06:06,555 [noc.main.models.textindex] Adding FTS index for vc.vc
  21. 2018-04-29 17:06:06,557 [noc.main.models.textindex] Adding FTS index for ip.prefix
  22. 2018-04-29 17:06:06,562 [noc.main.models.textindex] Adding FTS index for ip.address
  23. 2018-04-29 17:06:06,612 [noc.core.script.loader] Loading script Nateks.NetXpert.get_lldp_neighbors
  24. 2018-04-29 17:06:06,632 [noc.core.profile.loader] Loading profile Nateks.NetXpert
  25. 2018-04-29 17:06:06,633 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] Filling get_version cache with {'platform': u'NX-3424', 'version': u'2.1.1A Build 13295', 'vendor': u'Nateks'}
  26. 2018-04-29 17:06:06,633 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] Running. Input arguments: {}, timeout 3600
  27. 2018-04-29 17:06:06,633 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] Open telnet CLI
  28. 2018-04-29 17:06:06,636 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Creating IOLoop
  29. 2018-04-29 17:06:06,636 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Connecting (u'xx.xx.xx.16', 23)
  30. 2018-04-29 17:06:06,669 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Connected
  31. 2018-04-29 17:06:06,669 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <START>
  32. 2018-04-29 17:06:06,669 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Setting timeout: 60s
  33. 2018-04-29 17:06:06,707 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received WILL ECHO
  34. 2018-04-29 17:06:06,707 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send DO ECHO
  35. 2018-04-29 17:06:06,741 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received WILL SGA
  36. 2018-04-29 17:06:06,741 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send DO SGA
  37. 2018-04-29 17:06:06,741 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received DO TTYPE
  38. 2018-04-29 17:06:06,741 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send WILL TTYPE
  39. 2018-04-29 17:06:06,741 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received DO NAWS
  40. 2018-04-29 17:06:06,741 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send WILL NAWS
  41. 2018-04-29 17:06:06,741 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send IAC SB '\x1f' '\x00\x80\x00\x80' IAC SE
  42. 2018-04-29 17:06:06,742 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'User Access Verification\r\n\r\nUsername: '
  43. 2018-04-29 17:06:06,742 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: ([Uu]ser ?[Nn]ame|[Ll]ogin): ?
  44. 2018-04-29 17:06:06,742 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <USERNAME>
  45. 2018-04-29 17:06:06,742 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'admin\n'
  46. 2018-04-29 17:06:06,742 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Setting timeout: 30s
  47. 2018-04-29 17:06:06,775 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received IAC SB 1801 SE
  48. 2018-04-29 17:06:06,776 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: '\xf0'
  49. 2018-04-29 17:06:06,809 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'admin\r\n'
  50. 2018-04-29 17:06:06,899 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'Password: '
  51. 2018-04-29 17:06:06,899 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: [Pp]ass[Ww]ord: ?
  52. 2018-04-29 17:06:06,900 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <PASSWORD>
  53. 2018-04-29 17:06:06,900 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'admin\n'
  54. 2018-04-29 17:06:06,900 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Setting timeout: 30s
  55. 2018-04-29 17:06:07,099 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: '\r\n'
  56. 2018-04-29 17:06:07,161 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: '\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n Welcome to Nateks NX-3424 Ethernet Switch\r\n\r\n\r\n\r\n\r\n\r\nUZA-3>'
  57. 2018-04-29 17:06:07,161 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: ^\S+?>
  58. 2018-04-29 17:06:07,162 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <UNPRIVILEGED_PROMPT>
  59. 2018-04-29 17:06:07,162 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'enable\n'
  60. 2018-04-29 17:06:07,162 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Setting timeout: 10s
  61. 2018-04-29 17:06:07,189 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'e'
  62. 2018-04-29 17:06:07,254 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'nable\r\nUZA-3#'
  63. 2018-04-29 17:06:07,254 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: ^(?P<hostname>[a-zA-Z0-9/.]\S{0,35})(?:[-_\d\w]+)?(?:\(_config[^\)]*\))?#
  64. 2018-04-29 17:06:07,254 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <PROMT>
  65. 2018-04-29 17:06:07,254 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Refining pattern prompt to '^UZA\\-3(?:[-_\\d\\w]+)?(?:\\(_config[^\\)]*\\))?#'
  66. 2018-04-29 17:06:07,255 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Resetting timeouts
  67. 2018-04-29 17:06:07,255 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'show lldp neighbors\n'
  68. 2018-04-29 17:06:07,280 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 's'
  69. 2018-04-29 17:06:07,349 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'how lldp neighbors\r\nCapability Codes:\r\n (R)Router,(B)Bridge,(C)DOCSIS Cable Device,(T)Telephone\r\n (W)WLAN Access Point, (P)Repeater,(S)Station,(O)Other\r\n\r\nDevice-ID Local-Intf Hldtme Port-ID Capability\r\nUZA-4 Gig0/2 115 Gig0/1 B \r\nUZA-2 Gig0/1 116 Gig0/2 B \r\n\r\nTotal entries displayed: 2\r\nUZA-3#'
  70. 2018-04-29 17:06:07,350 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: ^UZA\-3(?:[-_\d\w]+)?(?:\(_config[^\)]*\))?#
  71. 2018-04-29 17:06:07,350 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <PROMT>
  72. 2018-04-29 17:06:07,350 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Command: show lldp neighbors
  73. show lldp neighbors
  74. Capability Codes:
  75. (R)Router,(B)Bridge,(C)DOCSIS Cable Device,(T)Telephone
  76. (W)WLAN Access Point, (P)Repeater,(S)Station,(O)Other
  77.  
  78. Device-ID Local-Intf Hldtme Port-ID Capability
  79. UZA-4 Gig0/2 115 Gig0/1 B
  80. UZA-2 Gig0/1 116 Gig0/2 B
  81.  
  82. Total entries displayed: 2
  83.  
  84. 2018-04-29 17:06:07,351 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'sh lldp neighbors interface Gig0/2\n'
  85. 2018-04-29 17:06:07,385 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 's'
  86. 2018-04-29 17:06:07,386 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'h lldp neighbors interface Gig0/2\r\n\r\nchassis id: 000f.d907.162e\r\nport id: Gig0/1\r\nport description: GigaEthernet0/1\r\nsystem name: UZA-4\r\n\r\nsystem description: Nateks(tm) NX-3424 Software, Version 2.1.1A\r\nSerial: S20083180, Copyright (c) 2011 by Nateks Networks Co.Ltd \r\nCompiled: 2013-6-5 17:32:1 by SYS\r\n\r\nTime remaining: 115\r\nsystem capabilities: R B \r\nenabled capabilities: B \r\nManagement Address: \r\n IP: xx.xx.xx.17\r\n\r\nPort VLAN ID: 22\r\nVLAN 112 name: VLAN0112\r\nVLAN 108 name: VLAN0108\r\nVLAN 102 name: VLAN'
  87. 2018-04-29 17:06:07,387 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: '0102\r\nVLAN 23 name: VLAN0023\r\nVLAN 22 name: VLAN0022\r\nVLAN 1 name: Default\r\nAuto Negotiation: supported,not enabled\r\nPhysical media capabilities: \r\n 1000baseX(FD)\r\n 1000baseX(HD)\r\n 100baseTX(FD)\r\n 100baseTX(HD)\r\nOperational MAU type: Four-pair Category 5 UTP, half duplex mode(30)\r\n\r\nLink Aggregation: \r\n\tAggregation capability: capable of being aggregated\r\n\tAggregation status: not currently in aggregation\r\nMaximum frame size: 1500\r\n------------------------------------------\r\n\r\n\r\nTotal entries display'
  88. 2018-04-29 17:06:07,459 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'ed: 1\r\nUZA-3#'
  89. 2018-04-29 17:06:07,459 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: ^UZA\-3(?:[-_\d\w]+)?(?:\(_config[^\)]*\))?#
  90. 2018-04-29 17:06:07,460 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <PROMT>
  91. 2018-04-29 17:06:07,460 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Command: sh lldp neighbors interface Gig0/2
  92. sh lldp neighbors interface Gig0/2
  93.  
  94. chassis id: 000f.d907.162e
  95. port id: Gig0/1
  96. port description: GigaEthernet0/1
  97. system name: UZA-4
  98.  
  99. system description: Nateks(tm) NX-3424 Software, Version 2.1.1A
  100. Serial: S20083180, Copyright (c) 2011 by Nateks Networks Co.Ltd
  101. Compiled: 2013-6-5 17:32:1 by SYS
  102.  
  103. Time remaining: 115
  104. system capabilities: R B
  105. enabled capabilities: B
  106. Management Address:
  107. IP: xx.xx.xx.17
  108.  
  109. Port VLAN ID: 22
  110. VLAN 112 name: VLAN0112
  111. VLAN 108 name: VLAN0108
  112. VLAN 102 name: VLAN0102
  113. VLAN 23 name: VLAN0023
  114. VLAN 22 name: VLAN0022
  115. VLAN 1 name: Default
  116. Auto Negotiation: supported,not enabled
  117. Physical media capabilities:
  118. 1000baseX(FD)
  119. 1000baseX(HD)
  120. 100baseTX(FD)
  121. 100baseTX(HD)
  122. Operational MAU type: Four-pair Category 5 UTP, half duplex mode(30)
  123.  
  124. Link Aggregation:
  125. Aggregation capability: capable of being aggregated
  126. Aggregation status: not currently in aggregation
  127. Maximum frame size: 1500
  128. ------------------------------------------
  129.  
  130.  
  131. Total entries displayed: 1
  132.  
  133. 2018-04-29 17:06:07,461 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'sh lldp neighbors interface Gig0/1\n'
  134. 2018-04-29 17:06:07,492 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 's'
  135. 2018-04-29 17:06:07,495 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'h lldp neighbors interface Gig0/1\r\n\r\nchassis id: 000f.d907.230c\r\nport id: Gig0/2\r\nport description: GigaEthernet0/2\r\nsystem name: UZA-2\r\n\r\nsystem description: Nateks(tm) NX-3424 Software, Version 2.1.1A\r\nSerial: S20083302, Copyright (c) 2011 by Nateks Networks Co.Ltd \r\nCompiled: 2013-6-5 17:32:1 by SYS\r\n\r\nTime remaining: 116\r\nsystem capabilities: R B \r\nenabled capabilities: B \r\nManagement Address: \r\n IP: xx.xx.xx.15\r\n\r\nPort VLAN ID: 22\r\nVLAN 112 name: VLAN0112\r\nVLAN 108 name: VLAN0108\r\nVLAN 102 name: VLAN'
  136. 2018-04-29 17:06:07,495 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: '0102\r\nVLAN 23 name: VLAN0023\r\nVLAN 22 name: VLAN0022\r\nVLAN 1 name: Default\r\nAuto Negotiation: supported,not enabled\r\nPhysical media capabilities: \r\n 1000baseX(FD)\r\n 1000baseX(HD)\r\n 100baseTX(FD)\r\n 100baseTX(HD)\r\nOperational MAU type: Four-pair Category 5 UTP, half duplex mode(30)\r\n\r\nLink Aggregation: \r\n\tAggregation capability: capable of being aggregated\r\n\tAggregation status: not currently in aggregation\r\nMaximum frame size: 1500\r\n------------------------------------------\r\n\r\n\r\nTotal entries display'
  137. 2018-04-29 17:06:07,562 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'ed: 1\r\nUZA-3#'
  138. 2018-04-29 17:06:07,562 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: ^UZA\-3(?:[-_\d\w]+)?(?:\(_config[^\)]*\))?#
  139. 2018-04-29 17:06:07,562 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <PROMT>
  140. 2018-04-29 17:06:07,562 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Command: sh lldp neighbors interface Gig0/1
  141. sh lldp neighbors interface Gig0/1
  142.  
  143. chassis id: 000f.d907.230c
  144. port id: Gig0/2
  145. port description: GigaEthernet0/2
  146. system name: UZA-2
  147.  
  148. system description: Nateks(tm) NX-3424 Software, Version 2.1.1A
  149. Serial: S20083302, Copyright (c) 2011 by Nateks Networks Co.Ltd
  150. Compiled: 2013-6-5 17:32:1 by SYS
  151.  
  152. Time remaining: 116
  153. system capabilities: R B
  154. enabled capabilities: B
  155. Management Address:
  156. IP: xx.xx.xx.15
  157.  
  158. Port VLAN ID: 22
  159. VLAN 112 name: VLAN0112
  160. VLAN 108 name: VLAN0108
  161. VLAN 102 name: VLAN0102
  162. VLAN 23 name: VLAN0023
  163. VLAN 22 name: VLAN0022
  164. VLAN 1 name: Default
  165. Auto Negotiation: supported,not enabled
  166. Physical media capabilities:
  167. 1000baseX(FD)
  168. 1000baseX(HD)
  169. 100baseTX(FD)
  170. 100baseTX(HD)
  171. Operational MAU type: Four-pair Category 5 UTP, half duplex mode(30)
  172.  
  173. Link Aggregation:
  174. Aggregation capability: capable of being aggregated
  175. Aggregation status: not currently in aggregation
  176. Maximum frame size: 1500
  177. ------------------------------------------
  178.  
  179.  
  180. Total entries displayed: 1
  181.  
  182. 2018-04-29 17:06:07,562 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Closing IOLoop
  183. 2018-04-29 17:06:07,563 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] Result: [{'neighbors': [{'remote_port_subtype': 1, 'remote_port_description': 'GigaEthernet0/1', 'remote_port': 'Gig0/1', 'remote_capabilities': 4, 'remote_chassis_id': '00:0F:D9:07:16:2E', 'remote_system_name': 'UZA-4', 'remote_chassis_id_subtype': 4}], 'local_interface': 'Gig0/2'}, {'neighbors': [{'remote_port_subtype': 1, 'remote_port_description': 'GigaEthernet0/2', 'remote_port': 'Gig0/2', 'remote_capabilities': 4, 'remote_chassis_id': '00:0F:D9:07:23:0C', 'remote_system_name': 'UZA-2', 'remote_chassis_id_subtype': 4}], 'local_interface': 'Gig0/1'}]
  184. 2018-04-29 17:06:07,563 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] Complete (929.84ms)
  185. [{'local_interface': 'Gig0/2',
  186. 'neighbors': [{'remote_capabilities': 4,
  187. 'remote_chassis_id': '00:0F:D9:07:16:2E',
  188. 'remote_chassis_id_subtype': 4,
  189. 'remote_port': 'Gig0/1',
  190. 'remote_port_description': 'GigaEthernet0/1',
  191. 'remote_port_subtype': 1,
  192. 'remote_system_name': 'UZA-4'}]},
  193. {'local_interface': 'Gig0/1',
  194. 'neighbors': [{'remote_capabilities': 4,
  195. 'remote_chassis_id': '00:0F:D9:07:23:0C',
  196. 'remote_chassis_id_subtype': 4,
  197. 'remote_port': 'Gig0/2',
  198. 'remote_port_description': 'GigaEthernet0/2',
  199. 'remote_port_subtype': 1,
  200. 'remote_system_name': 'UZA-2'}]}]
  201. root@Node1:/opt/noc#
  202. root@Node1:/opt/noc#
  203. root@Node1:/opt/noc#
  204. root@Node1:/opt/noc#
  205. root@Node1:/opt/noc#
  206. root@Node1:/opt/noc#
  207. root@Node1:/opt/noc#
  208. root@Node1:/opt/noc# ./noc script --debug --pretty get_fqdn "UZA-3"
  209. 2018-04-29 17:06:22,867 [noc.core.dcs.base] Resolve near service postgres
  210. 2018-04-29 17:06:22,868 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/postgres?passing=1&near=_agent
  211. 2018-04-29 17:06:22,873 [noc.core.http.client] HTTP Response 200
  212. 2018-04-29 17:06:22,873 [noc.core.dcs.base] Resolved near service postgres to ['10.220.21.122:5432']
  213. 2018-04-29 17:06:23,729 [noc.core.dcs.base] Running resolver for service mongo
  214. 2018-04-29 17:06:23,730 [noc.core.dcs.base] [mongo] Starting resolver
  215. 2018-04-29 17:06:23,730 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?passing=1
  216. 2018-04-29 17:06:23,731 [noc.core.http.client] HTTP Response 200
  217. 2018-04-29 17:06:23,732 [noc.core.dcs.base] [mongo] Set active services to: mongo: 10.220.21.122:27017
  218. 2018-04-29 17:06:23,732 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?index=2246065&passing=1
  219. 2018-04-29 17:06:23,733 [noc.lib.nosql] Connecting to MongoDB {'username': 'noc', 'authentication_source': 'noc', 'readPreference': 'secondaryPreferred', 'replicaSet': 'noc', 'db': 'noc', 'socketKeepAlive': True, 'host': 'mongodb://noc:********@10.220.21.122:27017/noc', 'password': '********'}
  220. 2018-04-29 17:06:23,789 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
  221. 2018-04-29 17:06:23,853 [noc.main.models.doccategory] Registering Capability
  222. 2018-04-29 17:06:23,854 [noc.main.models.doccategory] Registering MetricType
  223. 2018-04-29 17:06:23,897 [noc.main.models.doccategory] Registering ConnectionType
  224. 2018-04-29 17:06:23,902 [noc.main.models.doccategory] Registering ObjectModel
  225. 2018-04-29 17:06:23,912 [noc.main.models.textindex] Adding FTS index for sa.managedobject
  226. 2018-04-29 17:06:23,927 [noc.main.models.textindex] Adding FTS index for ip.vrf
  227. 2018-04-29 17:06:23,930 [noc.main.models.textindex] Adding FTS index for vc.vc
  228. 2018-04-29 17:06:23,932 [noc.main.models.textindex] Adding FTS index for ip.prefix
  229. 2018-04-29 17:06:23,937 [noc.main.models.textindex] Adding FTS index for ip.address
  230. 2018-04-29 17:06:23,991 [noc.core.script.loader] Loading script Nateks.NetXpert.get_fqdn
  231. 2018-04-29 17:06:24,012 [noc.core.profile.loader] Loading profile Nateks.NetXpert
  232. 2018-04-29 17:06:24,013 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] Filling get_version cache with {'platform': u'NX-3424', 'version': u'2.1.1A Build 13295', 'vendor': u'Nateks'}
  233. 2018-04-29 17:06:24,013 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] Running. Input arguments: {}, timeout 3600
  234. 2018-04-29 17:06:24,013 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] [snmp] Creating IOLoop
  235. 2018-04-29 17:06:24,013 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] [snmp] Create UDP socket
  236. 2018-04-29 17:06:24,014 [noc.core.ioloop.snmp] [xx.xx.xx.16] SNMP GET ['1.3.6.1.2.1.1.5.0']
  237. 2018-04-29 17:06:24,039 [noc.core.ioloop.snmp] [xx.xx.xx.16] GET result: 'UZA-3'
  238. 2018-04-29 17:06:24,039 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] [snmp] Closing UDP socket
  239. 2018-04-29 17:06:24,039 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] [snmp] Closing IOLoop
  240. 2018-04-29 17:06:24,040 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] Result: UZA-3
  241. 2018-04-29 17:06:24,040 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] Complete (26.81ms)
  242. 'UZA-3'
  243. root@Node1:/opt/noc#
  244. root@Node1:/opt/noc#
  245. root@Node1:/opt/noc#
  246. root@Node1:/opt/noc#
  247. root@Node1:/opt/noc# ./noc script --debug --pretty get_chassis_id "UZA-3"
  248. 2018-04-29 17:06:56,362 [noc.core.dcs.base] Resolve near service postgres
  249. 2018-04-29 17:06:56,362 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/postgres?passing=1&near=_agent
  250. 2018-04-29 17:06:56,365 [noc.core.http.client] HTTP Response 200
  251. 2018-04-29 17:06:56,365 [noc.core.dcs.base] Resolved near service postgres to ['10.220.21.122:5432']
  252. 2018-04-29 17:06:57,230 [noc.core.dcs.base] Running resolver for service mongo
  253. 2018-04-29 17:06:57,231 [noc.core.dcs.base] [mongo] Starting resolver
  254. 2018-04-29 17:06:57,231 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?passing=1
  255. 2018-04-29 17:06:57,233 [noc.core.http.client] HTTP Response 200
  256. 2018-04-29 17:06:57,234 [noc.core.dcs.base] [mongo] Set active services to: mongo: 10.220.21.122:27017
  257. 2018-04-29 17:06:57,234 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?index=2246065&passing=1
  258. 2018-04-29 17:06:57,235 [noc.lib.nosql] Connecting to MongoDB {'username': 'noc', 'authentication_source': 'noc', 'readPreference': 'secondaryPreferred', 'replicaSet': 'noc', 'db': 'noc', 'socketKeepAlive': True, 'host': 'mongodb://noc:********@10.220.21.122:27017/noc', 'password': '********'}
  259. 2018-04-29 17:06:57,296 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
  260. 2018-04-29 17:06:57,357 [noc.main.models.doccategory] Registering Capability
  261. 2018-04-29 17:06:57,358 [noc.main.models.doccategory] Registering MetricType
  262. 2018-04-29 17:06:57,392 [noc.main.models.doccategory] Registering ConnectionType
  263. 2018-04-29 17:06:57,396 [noc.main.models.doccategory] Registering ObjectModel
  264. 2018-04-29 17:06:57,405 [noc.main.models.textindex] Adding FTS index for sa.managedobject
  265. 2018-04-29 17:06:57,420 [noc.main.models.textindex] Adding FTS index for ip.vrf
  266. 2018-04-29 17:06:57,423 [noc.main.models.textindex] Adding FTS index for vc.vc
  267. 2018-04-29 17:06:57,425 [noc.main.models.textindex] Adding FTS index for ip.prefix
  268. 2018-04-29 17:06:57,430 [noc.main.models.textindex] Adding FTS index for ip.address
  269. 2018-04-29 17:06:57,478 [noc.core.script.loader] Loading script Nateks.NetXpert.get_chassis_id
  270. 2018-04-29 17:06:57,499 [noc.core.profile.loader] Loading profile Nateks.NetXpert
  271. 2018-04-29 17:06:57,500 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] Filling get_version cache with {'platform': u'NX-3424', 'version': u'2.1.1A Build 13295', 'vendor': u'Nateks'}
  272. 2018-04-29 17:06:57,500 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] Running. Input arguments: {}, timeout 3600
  273. 2018-04-29 17:06:57,500 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] Open telnet CLI
  274. 2018-04-29 17:06:57,503 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Creating IOLoop
  275. 2018-04-29 17:06:57,503 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Connecting (u'xx.xx.xx.16', 23)
  276. 2018-04-29 17:06:57,528 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Connected
  277. 2018-04-29 17:06:57,529 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <START>
  278. 2018-04-29 17:06:57,530 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Setting timeout: 60s
  279. 2018-04-29 17:06:57,554 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received WILL ECHO
  280. 2018-04-29 17:06:57,555 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send DO ECHO
  281. 2018-04-29 17:06:57,577 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received WILL SGA
  282. 2018-04-29 17:06:57,577 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send DO SGA
  283. 2018-04-29 17:06:57,577 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received DO TTYPE
  284. 2018-04-29 17:06:57,577 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send WILL TTYPE
  285. 2018-04-29 17:06:57,578 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received DO NAWS
  286. 2018-04-29 17:06:57,578 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send WILL NAWS
  287. 2018-04-29 17:06:57,578 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send IAC SB '\x1f' '\x00\x80\x00\x80' IAC SE
  288. 2018-04-29 17:06:57,578 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'User Access Verification\r\n\r\nUsername: '
  289. 2018-04-29 17:06:57,578 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Match: ([Uu]ser ?[Nn]ame|[Ll]ogin): ?
  290. 2018-04-29 17:06:57,578 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <USERNAME>
  291. 2018-04-29 17:06:57,578 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send: 'admin\n'
  292. 2018-04-29 17:06:57,579 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Setting timeout: 30s
  293. 2018-04-29 17:06:57,601 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received IAC SB 1801 SE
  294. 2018-04-29 17:06:57,602 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: '\xf0'
  295. 2018-04-29 17:06:57,649 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'a'
  296. 2018-04-29 17:06:57,708 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'dmin\r\n'
  297. 2018-04-29 17:06:57,749 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'Password: '
  298. 2018-04-29 17:06:57,749 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Match: [Pp]ass[Ww]ord: ?
  299. 2018-04-29 17:06:57,750 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <PASSWORD>
  300. 2018-04-29 17:06:57,750 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send: 'admin\n'
  301. 2018-04-29 17:06:57,750 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Setting timeout: 30s
  302. 2018-04-29 17:06:57,951 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: '\r\n'
  303. 2018-04-29 17:06:58,013 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: '\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n Welcome to Nateks NX-3424 Ethernet Switch\r\n\r\n\r\n\r\n\r\n\r\nUZA-3>'
  304. 2018-04-29 17:06:58,013 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Match: ^\S+?>
  305. 2018-04-29 17:06:58,013 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <UNPRIVILEGED_PROMPT>
  306. 2018-04-29 17:06:58,013 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send: 'enable\n'
  307. 2018-04-29 17:06:58,013 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Setting timeout: 10s
  308. 2018-04-29 17:06:58,039 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'e'
  309. 2018-04-29 17:06:58,100 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'nable\r\nUZA-3#'
  310. 2018-04-29 17:06:58,101 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Match: ^(?P<hostname>[a-zA-Z0-9/.]\S{0,35})(?:[-_\d\w]+)?(?:\(_config[^\)]*\))?#
  311. 2018-04-29 17:06:58,101 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <PROMT>
  312. 2018-04-29 17:06:58,101 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Refining pattern prompt to '^UZA\\-3(?:[-_\\d\\w]+)?(?:\\(_config[^\\)]*\\))?#'
  313. 2018-04-29 17:06:58,102 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Resetting timeouts
  314. 2018-04-29 17:06:58,102 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send: 'sh ver\n\n'
  315. 2018-04-29 17:06:58,127 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 's'
  316. 2018-04-29 17:06:58,128 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'h ver\r\nNateks Networks Co.Ltd Internetwork Operating System Software\r\nNX-3424 Series Software, Version 2.1.1A Build 13295, RELEASE SOFTWARE\r\nCopyright (c) 2011 by Nateks Networks Co.Ltd \r\nCompiled: 2013-6-5 17:32:1 by SYS_13295, Image text-base: 0x10000\r\nROM: System Bootstrap, Version 0.3.5\r\nSerial num:S20083360, ID num:S20083360\r\nSystem image file is "switch.bin"\r\nNateks NX-3424 RISC\r\n65536K bytes of memory,8192K bytes of flash\r\nBase ethernet MAC Address: 00:0f:d9:07:29:2a\r\nsnmp info:\r\n vend_ID:4249 pro'
  317. 2018-04-29 17:06:58,151 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'duct_ID:162 system_ID:1.3.6.1.4.1.4249.21.162\r\nUZA-3 uptime is 3:03:30:43, The current time: 1970-1-4 3:30:42\r\nUZA-3#\r\nUZA-3#'
  318. 2018-04-29 17:06:58,151 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Match: ^UZA\-3(?:[-_\d\w]+)?(?:\(_config[^\)]*\))?#
  319. 2018-04-29 17:06:58,151 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <PROMT>
  320. 2018-04-29 17:06:58,152 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Command: sh ver
  321. sh ver
  322. Nateks Networks Co.Ltd Internetwork Operating System Software
  323. NX-3424 Series Software, Version 2.1.1A Build 13295, RELEASE SOFTWARE
  324. Copyright (c) 2011 by Nateks Networks Co.Ltd
  325. Compiled: 2013-6-5 17:32:1 by SYS_13295, Image text-base: 0x10000
  326. ROM: System Bootstrap, Version 0.3.5
  327. Serial num:S20083360, ID num:S20083360
  328. System image file is "switch.bin"
  329. Nateks NX-3424 RISC
  330. 65536K bytes of memory,8192K bytes of flash
  331. Base ethernet MAC Address: 00:0f:d9:07:29:2a
  332. snmp info:
  333. vend_ID:4249 product_ID:162 system_ID:1.3.6.1.4.1.4249.21.162
  334. UZA-3 uptime is 3:03:30:43, The current time: 1970-1-4 3:30:42
  335.  
  336. 2018-04-29 17:06:58,152 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Closing IOLoop
  337. 2018-04-29 17:06:58,153 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] Result: [{'last_chassis_mac': '00:0F:D9:07:29:2A', 'first_chassis_mac': '00:0F:D9:07:29:2A'}]
  338. 2018-04-29 17:06:58,153 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] Complete (652.64ms)
  339. [{'first_chassis_mac': '00:0F:D9:07:29:2A',
  340. 'last_chassis_mac': '00:0F:D9:07:29:2A'}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement