Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@Node1:/opt/noc# ./noc script --debug --pretty get_lldp_neighbors "UZA-3"
- 2018-04-29 17:08:48,946 [noc.core.dcs.base] Resolve near service postgres
- 2018-04-29 17:08:48,946 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/postgres?passing=1&near=_agent
- 2018-04-29 17:08:48,949 [noc.core.http.client] HTTP Response 200
- 2018-04-29 17:08:48,949 [noc.core.dcs.base] Resolved near service postgres to ['10.220.21.122:5432']
- 2018-04-29 17:08:49,851 [noc.core.dcs.base] Running resolver for service mongo
- 2018-04-29 17:08:49,852 [noc.core.dcs.base] [mongo] Starting resolver
- 2018-04-29 17:08:49,852 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?passing=1
- 2018-04-29 17:08:49,854 [noc.core.http.client] HTTP Response 200
- 2018-04-29 17:08:49,854 [noc.core.dcs.base] [mongo] Set active services to: mongo: 10.220.21.122:27017
- 2018-04-29 17:08:49,854 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?index=2246178&passing=1
- 2018-04-29 17:08:49,855 [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': '********'}
- 2018-04-29 17:08:49,915 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
- 2018-04-29 17:08:49,976 [noc.main.models.doccategory] Registering Capability
- 2018-04-29 17:08:49,977 [noc.main.models.doccategory] Registering MetricType
- 2018-04-29 17:08:50,038 [noc.main.models.doccategory] Registering ConnectionType
- 2018-04-29 17:08:50,072 [noc.main.models.doccategory] Registering ObjectModel
- 2018-04-29 17:08:50,092 [noc.main.models.textindex] Adding FTS index for sa.managedobject
- 2018-04-29 17:08:50,132 [noc.main.models.textindex] Adding FTS index for ip.vrf
- 2018-04-29 17:08:50,135 [noc.main.models.textindex] Adding FTS index for vc.vc
- 2018-04-29 17:08:50,138 [noc.main.models.textindex] Adding FTS index for ip.prefix
- 2018-04-29 17:08:50,148 [noc.main.models.textindex] Adding FTS index for ip.address
- 2018-04-29 17:08:50,213 [noc.core.script.loader] Loading script Nateks.NetXpert.get_lldp_neighbors
- 2018-04-29 17:08:50,235 [noc.core.profile.loader] Loading profile Nateks.NetXpert
- 2018-04-29 17:08:50,236 [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'}
- 2018-04-29 17:08:50,236 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] Running. Input arguments: {}, timeout 3600
- 2018-04-29 17:08:50,236 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] Open telnet CLI
- 2018-04-29 17:08:50,238 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Creating IOLoop
- 2018-04-29 17:08:50,239 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Connecting (u'xx.xx.xx.16', 23)
- 2018-04-29 17:08:50,264 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Connected
- 2018-04-29 17:08:50,265 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <START>
- 2018-04-29 17:08:50,265 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Setting timeout: 60s
- 2018-04-29 17:08:50,291 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received WILL ECHO
- 2018-04-29 17:08:50,291 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send DO ECHO
- 2018-04-29 17:08:50,516 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received WILL SGA
- 2018-04-29 17:08:50,517 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send DO SGA
- 2018-04-29 17:08:50,517 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received DO TTYPE
- 2018-04-29 17:08:50,517 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send WILL TTYPE
- 2018-04-29 17:08:50,517 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received DO NAWS
- 2018-04-29 17:08:50,517 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send WILL NAWS
- 2018-04-29 17:08:50,517 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send IAC SB '\x1f' '\x00\x80\x00\x80' IAC SE
- 2018-04-29 17:08:50,518 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'User Access Verification\r\n\r\nUsername: '
- 2018-04-29 17:08:50,518 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: ([Uu]ser ?[Nn]ame|[Ll]ogin): ?
- 2018-04-29 17:08:50,518 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <USERNAME>
- 2018-04-29 17:08:50,518 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'admin\n'
- 2018-04-29 17:08:50,518 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Setting timeout: 30s
- 2018-04-29 17:08:51,073 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received IAC SB 1801 SE
- 2018-04-29 17:08:51,074 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: '\xf0'
- 2018-04-29 17:08:51,097 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'admin\r\n'
- 2018-04-29 17:08:51,169 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'Password: '
- 2018-04-29 17:08:51,169 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: [Pp]ass[Ww]ord: ?
- 2018-04-29 17:08:51,169 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <PASSWORD>
- 2018-04-29 17:08:51,169 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'admin\n'
- 2018-04-29 17:08:51,170 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Setting timeout: 30s
- 2018-04-29 17:08:51,370 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: '\r\n'
- 2018-04-29 17:08:51,433 [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>'
- 2018-04-29 17:08:51,433 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: ^\S+?>
- 2018-04-29 17:08:51,433 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <UNPRIVILEGED_PROMPT>
- 2018-04-29 17:08:51,433 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'enable\n'
- 2018-04-29 17:08:51,434 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Setting timeout: 10s
- 2018-04-29 17:08:51,457 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'e'
- 2018-04-29 17:08:51,517 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'nable\r\nUZA-3#'
- 2018-04-29 17:08:51,517 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: ^(?P<hostname>[a-zA-Z0-9/.]\S{0,35})(?:[-_\d\w]+)?(?:\(_config[^\)]*\))?#
- 2018-04-29 17:08:51,517 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <PROMT>
- 2018-04-29 17:08:51,517 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Refining pattern prompt to '^UZA\\-3(?:[-_\\d\\w]+)?(?:\\(_config[^\\)]*\\))?#'
- 2018-04-29 17:08:51,518 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Resetting timeouts
- 2018-04-29 17:08:51,518 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'show lldp neighbors\n'
- 2018-04-29 17:08:51,542 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 's'
- 2018-04-29 17:08:51,613 [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 101 Gig0/1 B \r\nUZA-2 Gig0/1 101 Gig0/2 B \r\n\r\nTotal entries displayed: 2\r\nUZA-3#'
- 2018-04-29 17:08:51,613 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: ^UZA\-3(?:[-_\d\w]+)?(?:\(_config[^\)]*\))?#
- 2018-04-29 17:08:51,613 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <PROMT>
- 2018-04-29 17:08:51,613 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Command: show lldp neighbors
- show lldp neighbors
- Capability Codes:
- (R)Router,(B)Bridge,(C)DOCSIS Cable Device,(T)Telephone
- (W)WLAN Access Point, (P)Repeater,(S)Station,(O)Other
- Device-ID Local-Intf Hldtme Port-ID Capability
- UZA-4 Gig0/2 101 Gig0/1 B
- UZA-2 Gig0/1 101 Gig0/2 B
- Total entries displayed: 2
- 2018-04-29 17:08:51,614 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'sh lldp neighbors interface Gig0/2\n'
- 2018-04-29 17:08:51,641 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 's'
- 2018-04-29 17:08:51,643 [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: 100\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'
- 2018-04-29 17:08:51,643 [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'
- 2018-04-29 17:08:51,708 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'ed: 1\r\nUZA-3#'
- 2018-04-29 17:08:51,709 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: ^UZA\-3(?:[-_\d\w]+)?(?:\(_config[^\)]*\))?#
- 2018-04-29 17:08:51,709 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <PROMT>
- 2018-04-29 17:08:51,709 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Command: sh lldp neighbors interface Gig0/2
- sh lldp neighbors interface Gig0/2
- chassis id: 000f.d907.162e
- port id: Gig0/1
- port description: GigaEthernet0/1
- system name: UZA-4
- system description: Nateks(tm) NX-3424 Software, Version 2.1.1A
- Serial: S20083180, Copyright (c) 2011 by Nateks Networks Co.Ltd
- Compiled: 2013-6-5 17:32:1 by SYS
- Time remaining: 100
- system capabilities: R B
- enabled capabilities: B
- Management Address:
- IP: xx.xx.xx.17
- Port VLAN ID: 22
- VLAN 112 name: VLAN0112
- VLAN 108 name: VLAN0108
- VLAN 102 name: VLAN0102
- VLAN 23 name: VLAN0023
- VLAN 22 name: VLAN0022
- VLAN 1 name: Default
- Auto Negotiation: supported,not enabled
- Physical media capabilities:
- 1000baseX(FD)
- 1000baseX(HD)
- 100baseTX(FD)
- 100baseTX(HD)
- Operational MAU type: Four-pair Category 5 UTP, half duplex mode(30)
- Link Aggregation:
- Aggregation capability: capable of being aggregated
- Aggregation status: not currently in aggregation
- Maximum frame size: 1500
- ------------------------------------------
- Total entries displayed: 1
- 2018-04-29 17:08:51,711 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'sh lldp neighbors interface Gig0/1\n'
- 2018-04-29 17:08:51,737 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 's'
- 2018-04-29 17:08:51,739 [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: 101\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'
- 2018-04-29 17:08:51,739 [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'
- 2018-04-29 17:08:51,801 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'ed: 1\r\nUZA-3#'
- 2018-04-29 17:08:51,801 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: ^UZA\-3(?:[-_\d\w]+)?(?:\(_config[^\)]*\))?#
- 2018-04-29 17:08:51,801 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <PROMT>
- 2018-04-29 17:08:51,801 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Command: sh lldp neighbors interface Gig0/1
- sh lldp neighbors interface Gig0/1
- chassis id: 000f.d907.230c
- port id: Gig0/2
- port description: GigaEthernet0/2
- system name: UZA-2
- system description: Nateks(tm) NX-3424 Software, Version 2.1.1A
- Serial: S20083302, Copyright (c) 2011 by Nateks Networks Co.Ltd
- Compiled: 2013-6-5 17:32:1 by SYS
- Time remaining: 101
- system capabilities: R B
- enabled capabilities: B
- Management Address:
- IP: xx.xx.xx.15
- Port VLAN ID: 22
- VLAN 112 name: VLAN0112
- VLAN 108 name: VLAN0108
- VLAN 102 name: VLAN0102
- VLAN 23 name: VLAN0023
- VLAN 22 name: VLAN0022
- VLAN 1 name: Default
- Auto Negotiation: supported,not enabled
- Physical media capabilities:
- 1000baseX(FD)
- 1000baseX(HD)
- 100baseTX(FD)
- 100baseTX(HD)
- Operational MAU type: Four-pair Category 5 UTP, half duplex mode(30)
- Link Aggregation:
- Aggregation capability: capable of being aggregated
- Aggregation status: not currently in aggregation
- Maximum frame size: 1500
- ------------------------------------------
- Total entries displayed: 1
- 2018-04-29 17:08:51,802 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Closing IOLoop
- 2018-04-29 17:08:51,802 [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'}]
- 2018-04-29 17:08:51,802 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] Complete (1566.10ms)
- [{'local_interface': 'Gig0/2',
- 'neighbors': [{'remote_capabilities': 4,
- 'remote_chassis_id': '00:0F:D9:07:16:2E',
- 'remote_chassis_id_subtype': 4,
- 'remote_port': 'Gig0/1',
- 'remote_port_description': 'GigaEthernet0/1',
- 'remote_port_subtype': 1,
- 'remote_system_name': 'UZA-4'}]},
- {'local_interface': 'Gig0/1',
- 'neighbors': [{'remote_capabilities': 4,
- 'remote_chassis_id': '00:0F:D9:07:23:0C',
- 'remote_chassis_id_subtype': 4,
- 'remote_port': 'Gig0/2',
- 'remote_port_description': 'GigaEthernet0/2',
- 'remote_port_subtype': 1,
- 'remote_system_name': 'UZA-2'}]}]
- root@Node1:/opt/noc#
- root@Node1:/opt/noc#
- root@Node1:/opt/noc#
- root@Node1:/opt/noc#
- root@Node1:/opt/noc# ./noc script --debug --pretty get_fqdn "UZA-3"
- 2018-04-29 17:08:56,068 [noc.core.dcs.base] Resolve near service postgres
- 2018-04-29 17:08:56,069 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/postgres?passing=1&near=_agent
- 2018-04-29 17:08:56,071 [noc.core.http.client] HTTP Response 200
- 2018-04-29 17:08:56,072 [noc.core.dcs.base] Resolved near service postgres to ['10.220.21.122:5432']
- 2018-04-29 17:08:56,924 [noc.core.dcs.base] Running resolver for service mongo
- 2018-04-29 17:08:56,925 [noc.core.dcs.base] [mongo] Starting resolver
- 2018-04-29 17:08:56,925 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?passing=1
- 2018-04-29 17:08:56,926 [noc.core.http.client] HTTP Response 200
- 2018-04-29 17:08:56,926 [noc.core.dcs.base] [mongo] Set active services to: mongo: 10.220.21.122:27017
- 2018-04-29 17:08:56,927 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?index=2246178&passing=1
- 2018-04-29 17:08:56,927 [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': '********'}
- 2018-04-29 17:08:56,987 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
- 2018-04-29 17:08:57,047 [noc.main.models.doccategory] Registering Capability
- 2018-04-29 17:08:57,048 [noc.main.models.doccategory] Registering MetricType
- 2018-04-29 17:08:57,082 [noc.main.models.doccategory] Registering ConnectionType
- 2018-04-29 17:08:57,086 [noc.main.models.doccategory] Registering ObjectModel
- 2018-04-29 17:08:57,096 [noc.main.models.textindex] Adding FTS index for sa.managedobject
- 2018-04-29 17:08:57,113 [noc.main.models.textindex] Adding FTS index for ip.vrf
- 2018-04-29 17:08:57,116 [noc.main.models.textindex] Adding FTS index for vc.vc
- 2018-04-29 17:08:57,118 [noc.main.models.textindex] Adding FTS index for ip.prefix
- 2018-04-29 17:08:57,125 [noc.main.models.textindex] Adding FTS index for ip.address
- 2018-04-29 17:08:57,174 [noc.core.script.loader] Loading script Nateks.NetXpert.get_fqdn
- 2018-04-29 17:08:57,195 [noc.core.profile.loader] Loading profile Nateks.NetXpert
- 2018-04-29 17:08:57,196 [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'}
- 2018-04-29 17:08:57,196 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] Running. Input arguments: {}, timeout 3600
- 2018-04-29 17:08:57,196 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] [snmp] Creating IOLoop
- 2018-04-29 17:08:57,196 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] [snmp] Create UDP socket
- 2018-04-29 17:08:57,196 [noc.core.ioloop.snmp] [xx.xx.xx.16] SNMP GET ['1.3.6.1.2.1.1.5.0']
- 2018-04-29 17:08:57,221 [noc.core.ioloop.snmp] [xx.xx.xx.16] GET result: 'UZA-3'
- 2018-04-29 17:08:57,221 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] [snmp] Closing UDP socket
- 2018-04-29 17:08:57,221 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] [snmp] Closing IOLoop
- 2018-04-29 17:08:57,221 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] Result: UZA-3
- 2018-04-29 17:08:57,221 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] Complete (25.44ms)
- 'UZA-3'
- root@Node1:/opt/noc#
- root@Node1:/opt/noc#
- root@Node1:/opt/noc#
- root@Node1:/opt/noc# ./noc script --debug --pretty get_chassis_id "UZA-3"
- 2018-04-29 17:09:02,325 [noc.core.dcs.base] Resolve near service postgres
- 2018-04-29 17:09:02,326 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/postgres?passing=1&near=_agent
- 2018-04-29 17:09:02,328 [noc.core.http.client] HTTP Response 200
- 2018-04-29 17:09:02,329 [noc.core.dcs.base] Resolved near service postgres to ['10.220.21.122:5432']
- 2018-04-29 17:09:03,259 [noc.core.dcs.base] Running resolver for service mongo
- 2018-04-29 17:09:03,260 [noc.core.dcs.base] [mongo] Starting resolver
- 2018-04-29 17:09:03,260 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?passing=1
- 2018-04-29 17:09:03,261 [noc.core.http.client] HTTP Response 200
- 2018-04-29 17:09:03,261 [noc.core.dcs.base] [mongo] Set active services to: mongo: 10.220.21.122:27017
- 2018-04-29 17:09:03,262 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?index=2246178&passing=1
- 2018-04-29 17:09:03,262 [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': '********'}
- 2018-04-29 17:09:03,326 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
- 2018-04-29 17:09:03,389 [noc.main.models.doccategory] Registering Capability
- 2018-04-29 17:09:03,390 [noc.main.models.doccategory] Registering MetricType
- 2018-04-29 17:09:03,424 [noc.main.models.doccategory] Registering ConnectionType
- 2018-04-29 17:09:03,427 [noc.main.models.doccategory] Registering ObjectModel
- 2018-04-29 17:09:03,437 [noc.main.models.textindex] Adding FTS index for sa.managedobject
- 2018-04-29 17:09:03,453 [noc.main.models.textindex] Adding FTS index for ip.vrf
- 2018-04-29 17:09:03,456 [noc.main.models.textindex] Adding FTS index for vc.vc
- 2018-04-29 17:09:03,458 [noc.main.models.textindex] Adding FTS index for ip.prefix
- 2018-04-29 17:09:03,463 [noc.main.models.textindex] Adding FTS index for ip.address
- 2018-04-29 17:09:03,510 [noc.core.script.loader] Loading script Nateks.NetXpert.get_chassis_id
- 2018-04-29 17:09:03,530 [noc.core.profile.loader] Loading profile Nateks.NetXpert
- 2018-04-29 17:09:03,530 [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'}
- 2018-04-29 17:09:03,530 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] Running. Input arguments: {}, timeout 3600
- 2018-04-29 17:09:03,530 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] Open telnet CLI
- 2018-04-29 17:09:03,533 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Creating IOLoop
- 2018-04-29 17:09:03,533 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Connecting (u'xx.xx.xx.16', 23)
- 2018-04-29 17:09:03,556 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Connected
- 2018-04-29 17:09:03,557 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <START>
- 2018-04-29 17:09:03,557 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Setting timeout: 60s
- 2018-04-29 17:09:03,581 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received WILL ECHO
- 2018-04-29 17:09:03,581 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send DO ECHO
- 2018-04-29 17:09:03,604 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received WILL SGA
- 2018-04-29 17:09:03,604 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send DO SGA
- 2018-04-29 17:09:03,604 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received DO TTYPE
- 2018-04-29 17:09:03,604 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send WILL TTYPE
- 2018-04-29 17:09:03,604 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received DO NAWS
- 2018-04-29 17:09:03,604 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send WILL NAWS
- 2018-04-29 17:09:03,604 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send IAC SB '\x1f' '\x00\x80\x00\x80' IAC SE
- 2018-04-29 17:09:03,605 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'User Access Verification\r\n\r\nUsername: '
- 2018-04-29 17:09:03,605 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Match: ([Uu]ser ?[Nn]ame|[Ll]ogin): ?
- 2018-04-29 17:09:03,605 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <USERNAME>
- 2018-04-29 17:09:03,605 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send: 'admin\n'
- 2018-04-29 17:09:03,605 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Setting timeout: 30s
- 2018-04-29 17:09:03,643 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received IAC SB 1801 SE
- 2018-04-29 17:09:03,644 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: '\xf0'
- 2018-04-29 17:09:03,679 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'a'
- 2018-04-29 17:09:03,741 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'dmin\r\n'
- 2018-04-29 17:09:03,779 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'Password: '
- 2018-04-29 17:09:03,779 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Match: [Pp]ass[Ww]ord: ?
- 2018-04-29 17:09:03,779 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <PASSWORD>
- 2018-04-29 17:09:03,780 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send: 'admin\n'
- 2018-04-29 17:09:03,780 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Setting timeout: 30s
- 2018-04-29 17:09:03,979 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: '\r\n'
- 2018-04-29 17:09:04,057 [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>'
- 2018-04-29 17:09:04,057 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Match: ^\S+?>
- 2018-04-29 17:09:04,057 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <UNPRIVILEGED_PROMPT>
- 2018-04-29 17:09:04,057 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send: 'enable\n'
- 2018-04-29 17:09:04,058 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Setting timeout: 10s
- 2018-04-29 17:09:04,087 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'e'
- 2018-04-29 17:09:04,163 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'nable\r\nUZA-3#'
- 2018-04-29 17:09:04,163 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Match: ^(?P<hostname>[a-zA-Z0-9/.]\S{0,35})(?:[-_\d\w]+)?(?:\(_config[^\)]*\))?#
- 2018-04-29 17:09:04,163 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <PROMT>
- 2018-04-29 17:09:04,163 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Refining pattern prompt to '^UZA\\-3(?:[-_\\d\\w]+)?(?:\\(_config[^\\)]*\\))?#'
- 2018-04-29 17:09:04,164 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Resetting timeouts
- 2018-04-29 17:09:04,164 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send: 'sh ver\n\n'
- 2018-04-29 17:09:04,188 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 's'
- 2018-04-29 17:09:04,189 [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'
- 2018-04-29 17:09:04,213 [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:32:49, The current time: 1970-1-4 3:32:48\r\nUZA-3#\r\nUZA-3#'
- 2018-04-29 17:09:04,213 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Match: ^UZA\-3(?:[-_\d\w]+)?(?:\(_config[^\)]*\))?#
- 2018-04-29 17:09:04,213 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <PROMT>
- 2018-04-29 17:09:04,214 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Command: sh ver
- sh ver
- Nateks Networks Co.Ltd Internetwork Operating System Software
- NX-3424 Series Software, Version 2.1.1A Build 13295, RELEASE SOFTWARE
- Copyright (c) 2011 by Nateks Networks Co.Ltd
- Compiled: 2013-6-5 17:32:1 by SYS_13295, Image text-base: 0x10000
- ROM: System Bootstrap, Version 0.3.5
- Serial num:S20083360, ID num:S20083360
- System image file is "switch.bin"
- Nateks NX-3424 RISC
- 65536K bytes of memory,8192K bytes of flash
- Base ethernet MAC Address: 00:0f:d9:07:29:2a
- snmp info:
- vend_ID:4249 product_ID:162 system_ID:1.3.6.1.4.1.4249.21.162
- UZA-3 uptime is 3:03:32:49, The current time: 1970-1-4 3:32:48
- 2018-04-29 17:09:04,214 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Closing IOLoop
- 2018-04-29 17:09:04,215 [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'}]
- 2018-04-29 17:09:04,215 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] Complete (684.75ms)
- [{'first_chassis_mac': '00:0F:D9:07:29:2A',
- 'last_chassis_mac': '00:0F:D9:07:29:2A'}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement