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:06:05,476 [noc.core.dcs.base] Resolve near service postgres
- 2018-04-29 17:06:05,477 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/postgres?passing=1&near=_agent
- 2018-04-29 17:06:05,479 [noc.core.http.client] HTTP Response 200
- 2018-04-29 17:06:05,480 [noc.core.dcs.base] Resolved near service postgres to ['10.220.21.122:5432']
- 2018-04-29 17:06:06,344 [noc.core.dcs.base] Running resolver for service mongo
- 2018-04-29 17:06:06,345 [noc.core.dcs.base] [mongo] Starting resolver
- 2018-04-29 17:06:06,345 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?passing=1
- 2018-04-29 17:06:06,346 [noc.core.http.client] HTTP Response 200
- 2018-04-29 17:06:06,347 [noc.core.dcs.base] [mongo] Set active services to: mongo: 10.220.21.122:27017
- 2018-04-29 17:06:06,347 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?index=2246065&passing=1
- 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': '********'}
- 2018-04-29 17:06:06,422 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
- 2018-04-29 17:06:06,488 [noc.main.models.doccategory] Registering Capability
- 2018-04-29 17:06:06,489 [noc.main.models.doccategory] Registering MetricType
- 2018-04-29 17:06:06,523 [noc.main.models.doccategory] Registering ConnectionType
- 2018-04-29 17:06:06,527 [noc.main.models.doccategory] Registering ObjectModel
- 2018-04-29 17:06:06,537 [noc.main.models.textindex] Adding FTS index for sa.managedobject
- 2018-04-29 17:06:06,552 [noc.main.models.textindex] Adding FTS index for ip.vrf
- 2018-04-29 17:06:06,555 [noc.main.models.textindex] Adding FTS index for vc.vc
- 2018-04-29 17:06:06,557 [noc.main.models.textindex] Adding FTS index for ip.prefix
- 2018-04-29 17:06:06,562 [noc.main.models.textindex] Adding FTS index for ip.address
- 2018-04-29 17:06:06,612 [noc.core.script.loader] Loading script Nateks.NetXpert.get_lldp_neighbors
- 2018-04-29 17:06:06,632 [noc.core.profile.loader] Loading profile Nateks.NetXpert
- 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'}
- 2018-04-29 17:06:06,633 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] Running. Input arguments: {}, timeout 3600
- 2018-04-29 17:06:06,633 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] Open telnet CLI
- 2018-04-29 17:06:06,636 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Creating IOLoop
- 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)
- 2018-04-29 17:06:06,669 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Connected
- 2018-04-29 17:06:06,669 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <START>
- 2018-04-29 17:06:06,669 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Setting timeout: 60s
- 2018-04-29 17:06:06,707 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received WILL ECHO
- 2018-04-29 17:06:06,707 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send DO ECHO
- 2018-04-29 17:06:06,741 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received WILL SGA
- 2018-04-29 17:06:06,741 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send DO SGA
- 2018-04-29 17:06:06,741 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received DO TTYPE
- 2018-04-29 17:06:06,741 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send WILL TTYPE
- 2018-04-29 17:06:06,741 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received DO NAWS
- 2018-04-29 17:06:06,741 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send WILL NAWS
- 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
- 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: '
- 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): ?
- 2018-04-29 17:06:06,742 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <USERNAME>
- 2018-04-29 17:06:06,742 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'admin\n'
- 2018-04-29 17:06:06,742 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Setting timeout: 30s
- 2018-04-29 17:06:06,775 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received IAC SB 1801 SE
- 2018-04-29 17:06:06,776 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: '\xf0'
- 2018-04-29 17:06:06,809 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'admin\r\n'
- 2018-04-29 17:06:06,899 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'Password: '
- 2018-04-29 17:06:06,899 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: [Pp]ass[Ww]ord: ?
- 2018-04-29 17:06:06,900 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <PASSWORD>
- 2018-04-29 17:06:06,900 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'admin\n'
- 2018-04-29 17:06:06,900 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Setting timeout: 30s
- 2018-04-29 17:06:07,099 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: '\r\n'
- 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>'
- 2018-04-29 17:06:07,161 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: ^\S+?>
- 2018-04-29 17:06:07,162 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <UNPRIVILEGED_PROMPT>
- 2018-04-29 17:06:07,162 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'enable\n'
- 2018-04-29 17:06:07,162 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Setting timeout: 10s
- 2018-04-29 17:06:07,189 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'e'
- 2018-04-29 17:06:07,254 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'nable\r\nUZA-3#'
- 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[^\)]*\))?#
- 2018-04-29 17:06:07,254 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <PROMT>
- 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[^\\)]*\\))?#'
- 2018-04-29 17:06:07,255 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Resetting timeouts
- 2018-04-29 17:06:07,255 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'show lldp neighbors\n'
- 2018-04-29 17:06:07,280 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 's'
- 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#'
- 2018-04-29 17:06:07,350 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: ^UZA\-3(?:[-_\d\w]+)?(?:\(_config[^\)]*\))?#
- 2018-04-29 17:06:07,350 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <PROMT>
- 2018-04-29 17:06:07,350 [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 115 Gig0/1 B
- UZA-2 Gig0/1 116 Gig0/2 B
- Total entries displayed: 2
- 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'
- 2018-04-29 17:06:07,385 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 's'
- 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'
- 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'
- 2018-04-29 17:06:07,459 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'ed: 1\r\nUZA-3#'
- 2018-04-29 17:06:07,459 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: ^UZA\-3(?:[-_\d\w]+)?(?:\(_config[^\)]*\))?#
- 2018-04-29 17:06:07,460 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <PROMT>
- 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
- 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: 115
- 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:06:07,461 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Send: 'sh lldp neighbors interface Gig0/1\n'
- 2018-04-29 17:06:07,492 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 's'
- 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'
- 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'
- 2018-04-29 17:06:07,562 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Received: 'ed: 1\r\nUZA-3#'
- 2018-04-29 17:06:07,562 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Match: ^UZA\-3(?:[-_\d\w]+)?(?:\(_config[^\)]*\))?#
- 2018-04-29 17:06:07,562 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] State: <PROMT>
- 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
- 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: 116
- 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:06:07,562 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] [telnet] Closing IOLoop
- 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'}]
- 2018-04-29 17:06:07,563 [script] [Nateks.NetXpert.get_lldp_neighbors|xx.xx.xx.16] Complete (929.84ms)
- [{'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#
- root@Node1:/opt/noc#
- root@Node1:/opt/noc#
- root@Node1:/opt/noc# ./noc script --debug --pretty get_fqdn "UZA-3"
- 2018-04-29 17:06:22,867 [noc.core.dcs.base] Resolve near service postgres
- 2018-04-29 17:06:22,868 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/postgres?passing=1&near=_agent
- 2018-04-29 17:06:22,873 [noc.core.http.client] HTTP Response 200
- 2018-04-29 17:06:22,873 [noc.core.dcs.base] Resolved near service postgres to ['10.220.21.122:5432']
- 2018-04-29 17:06:23,729 [noc.core.dcs.base] Running resolver for service mongo
- 2018-04-29 17:06:23,730 [noc.core.dcs.base] [mongo] Starting resolver
- 2018-04-29 17:06:23,730 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?passing=1
- 2018-04-29 17:06:23,731 [noc.core.http.client] HTTP Response 200
- 2018-04-29 17:06:23,732 [noc.core.dcs.base] [mongo] Set active services to: mongo: 10.220.21.122:27017
- 2018-04-29 17:06:23,732 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?index=2246065&passing=1
- 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': '********'}
- 2018-04-29 17:06:23,789 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
- 2018-04-29 17:06:23,853 [noc.main.models.doccategory] Registering Capability
- 2018-04-29 17:06:23,854 [noc.main.models.doccategory] Registering MetricType
- 2018-04-29 17:06:23,897 [noc.main.models.doccategory] Registering ConnectionType
- 2018-04-29 17:06:23,902 [noc.main.models.doccategory] Registering ObjectModel
- 2018-04-29 17:06:23,912 [noc.main.models.textindex] Adding FTS index for sa.managedobject
- 2018-04-29 17:06:23,927 [noc.main.models.textindex] Adding FTS index for ip.vrf
- 2018-04-29 17:06:23,930 [noc.main.models.textindex] Adding FTS index for vc.vc
- 2018-04-29 17:06:23,932 [noc.main.models.textindex] Adding FTS index for ip.prefix
- 2018-04-29 17:06:23,937 [noc.main.models.textindex] Adding FTS index for ip.address
- 2018-04-29 17:06:23,991 [noc.core.script.loader] Loading script Nateks.NetXpert.get_fqdn
- 2018-04-29 17:06:24,012 [noc.core.profile.loader] Loading profile Nateks.NetXpert
- 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'}
- 2018-04-29 17:06:24,013 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] Running. Input arguments: {}, timeout 3600
- 2018-04-29 17:06:24,013 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] [snmp] Creating IOLoop
- 2018-04-29 17:06:24,013 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] [snmp] Create UDP socket
- 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']
- 2018-04-29 17:06:24,039 [noc.core.ioloop.snmp] [xx.xx.xx.16] GET result: 'UZA-3'
- 2018-04-29 17:06:24,039 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] [snmp] Closing UDP socket
- 2018-04-29 17:06:24,039 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] [snmp] Closing IOLoop
- 2018-04-29 17:06:24,040 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] Result: UZA-3
- 2018-04-29 17:06:24,040 [script] [Nateks.NetXpert.get_fqdn|xx.xx.xx.16] Complete (26.81ms)
- 'UZA-3'
- 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_chassis_id "UZA-3"
- 2018-04-29 17:06:56,362 [noc.core.dcs.base] Resolve near service postgres
- 2018-04-29 17:06:56,362 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/postgres?passing=1&near=_agent
- 2018-04-29 17:06:56,365 [noc.core.http.client] HTTP Response 200
- 2018-04-29 17:06:56,365 [noc.core.dcs.base] Resolved near service postgres to ['10.220.21.122:5432']
- 2018-04-29 17:06:57,230 [noc.core.dcs.base] Running resolver for service mongo
- 2018-04-29 17:06:57,231 [noc.core.dcs.base] [mongo] Starting resolver
- 2018-04-29 17:06:57,231 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?passing=1
- 2018-04-29 17:06:57,233 [noc.core.http.client] HTTP Response 200
- 2018-04-29 17:06:57,234 [noc.core.dcs.base] [mongo] Set active services to: mongo: 10.220.21.122:27017
- 2018-04-29 17:06:57,234 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?index=2246065&passing=1
- 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': '********'}
- 2018-04-29 17:06:57,296 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
- 2018-04-29 17:06:57,357 [noc.main.models.doccategory] Registering Capability
- 2018-04-29 17:06:57,358 [noc.main.models.doccategory] Registering MetricType
- 2018-04-29 17:06:57,392 [noc.main.models.doccategory] Registering ConnectionType
- 2018-04-29 17:06:57,396 [noc.main.models.doccategory] Registering ObjectModel
- 2018-04-29 17:06:57,405 [noc.main.models.textindex] Adding FTS index for sa.managedobject
- 2018-04-29 17:06:57,420 [noc.main.models.textindex] Adding FTS index for ip.vrf
- 2018-04-29 17:06:57,423 [noc.main.models.textindex] Adding FTS index for vc.vc
- 2018-04-29 17:06:57,425 [noc.main.models.textindex] Adding FTS index for ip.prefix
- 2018-04-29 17:06:57,430 [noc.main.models.textindex] Adding FTS index for ip.address
- 2018-04-29 17:06:57,478 [noc.core.script.loader] Loading script Nateks.NetXpert.get_chassis_id
- 2018-04-29 17:06:57,499 [noc.core.profile.loader] Loading profile Nateks.NetXpert
- 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'}
- 2018-04-29 17:06:57,500 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] Running. Input arguments: {}, timeout 3600
- 2018-04-29 17:06:57,500 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] Open telnet CLI
- 2018-04-29 17:06:57,503 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Creating IOLoop
- 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)
- 2018-04-29 17:06:57,528 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Connected
- 2018-04-29 17:06:57,529 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <START>
- 2018-04-29 17:06:57,530 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Setting timeout: 60s
- 2018-04-29 17:06:57,554 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received WILL ECHO
- 2018-04-29 17:06:57,555 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send DO ECHO
- 2018-04-29 17:06:57,577 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received WILL SGA
- 2018-04-29 17:06:57,577 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send DO SGA
- 2018-04-29 17:06:57,577 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received DO TTYPE
- 2018-04-29 17:06:57,577 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send WILL TTYPE
- 2018-04-29 17:06:57,578 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received DO NAWS
- 2018-04-29 17:06:57,578 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send WILL NAWS
- 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
- 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: '
- 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): ?
- 2018-04-29 17:06:57,578 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <USERNAME>
- 2018-04-29 17:06:57,578 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send: 'admin\n'
- 2018-04-29 17:06:57,579 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Setting timeout: 30s
- 2018-04-29 17:06:57,601 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received IAC SB 1801 SE
- 2018-04-29 17:06:57,602 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: '\xf0'
- 2018-04-29 17:06:57,649 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'a'
- 2018-04-29 17:06:57,708 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'dmin\r\n'
- 2018-04-29 17:06:57,749 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'Password: '
- 2018-04-29 17:06:57,749 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Match: [Pp]ass[Ww]ord: ?
- 2018-04-29 17:06:57,750 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <PASSWORD>
- 2018-04-29 17:06:57,750 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send: 'admin\n'
- 2018-04-29 17:06:57,750 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Setting timeout: 30s
- 2018-04-29 17:06:57,951 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: '\r\n'
- 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>'
- 2018-04-29 17:06:58,013 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Match: ^\S+?>
- 2018-04-29 17:06:58,013 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <UNPRIVILEGED_PROMPT>
- 2018-04-29 17:06:58,013 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send: 'enable\n'
- 2018-04-29 17:06:58,013 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Setting timeout: 10s
- 2018-04-29 17:06:58,039 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'e'
- 2018-04-29 17:06:58,100 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 'nable\r\nUZA-3#'
- 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[^\)]*\))?#
- 2018-04-29 17:06:58,101 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <PROMT>
- 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[^\\)]*\\))?#'
- 2018-04-29 17:06:58,102 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Resetting timeouts
- 2018-04-29 17:06:58,102 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Send: 'sh ver\n\n'
- 2018-04-29 17:06:58,127 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Received: 's'
- 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'
- 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#'
- 2018-04-29 17:06:58,151 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Match: ^UZA\-3(?:[-_\d\w]+)?(?:\(_config[^\)]*\))?#
- 2018-04-29 17:06:58,151 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] State: <PROMT>
- 2018-04-29 17:06:58,152 [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:30:43, The current time: 1970-1-4 3:30:42
- 2018-04-29 17:06:58,152 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] [telnet] Closing IOLoop
- 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'}]
- 2018-04-29 17:06:58,153 [script] [InfiNet.WANFlexX.get_chassis_id|xx.xx.xx.16] Complete (652.64ms)
- [{'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