Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2019-02-20 17:18:49,423 [noc.core.dcs.base] Resolve near service postgres
- 2019-02-20 17:18:49,423 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/postgres?passing=1&near=_agent
- 2019-02-20 17:18:49,427 [noc.core.http.client] HTTP Response 200
- 2019-02-20 17:18:49,427 [noc.core.dcs.base] Resolved near service postgres to ['172.31.234.227:5432']
- 2019-02-20 17:18:49,716 [noc.core.dcs.base] Running resolver for service mongo
- 2019-02-20 17:18:49,717 [noc.core.dcs.base] [mongo] Starting resolver
- 2019-02-20 17:18:49,717 [noc.core.dcs.base] [mongo] Requesting changes from index 0
- 2019-02-20 17:18:49,717 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?passing=1
- 2019-02-20 17:18:49,720 [noc.core.http.client] HTTP Response 200
- 2019-02-20 17:18:49,721 [noc.core.dcs.base] [mongo] Index changed 0 -> 309411. Applying changes
- 2019-02-20 17:18:49,721 [noc.core.dcs.base] [mongo] Set active services to: mongo: 172.31.234.227:27017
- 2019-02-20 17:18:49,721 [noc.core.dcs.base] [mongo] Requesting changes from index 309411
- 2019-02-20 17:18:49,721 [noc.core.http.client] HTTP GET http://consul:8500/v1/health/service/mongo?index=309411&passing=1
- 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': '********'}
- 2019-02-20 17:18:49,784 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
- 2019-02-20 17:18:50,085 [noc.main.models.doccategory] Registering Capability
- 2019-02-20 17:18:50,086 [noc.main.models.doccategory] Registering MetricType
- 2019-02-20 17:18:50,296 [noc.main.models.doccategory] Registering ConnectionType
- 2019-02-20 17:18:50,301 [noc.main.models.doccategory] Registering ObjectModel
- 2019-02-20 17:18:50,320 [noc.main.models.textindex] Adding FTS index for sa.managedobject
- 2019-02-20 17:18:50,329 [noc.main.models.textindex] Adding FTS index for ip.vrf
- 2019-02-20 17:18:50,374 [noc.core.loader.base] [script] Loading script DLink.DxS_Smart.get_portchannel
- 2019-02-20 17:18:50,398 [noc.core.loader.base] [profile] Loading profile DLink.DxS_Smart
- 2019-02-20 17:18:50,398 [noc.core.loader.base] [profile] Failed to load profile DLink.DxS_Smart: No module named profile
- 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
- 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'}
- 2019-02-20 17:18:50,399 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] Running. Input arguments: {}, timeout 3600
- 2019-02-20 17:18:50,399 [noc.core.loader.base] [script] Loading script DLink.DxS_Smart.get_version
- 2019-02-20 17:18:50,402 [script] [DLink.DxS_Smart.get_version|192.168.57.69] Running. Input arguments: {}, timeout 3600
- 2019-02-20 17:18:50,402 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [snmp] Creating IOLoop
- 2019-02-20 17:18:50,402 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [snmp] Create UDP socket
- 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']
- 2019-02-20 17:18:50,418 [noc.core.ioloop.snmp] [192.168.57.69] GET result: 'DGS-1210-28P/C1 4.10.B043'
- 2019-02-20 17:18:50,418 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] Open telnet CLI
- 2019-02-20 17:18:50,419 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Creating IOLoop
- 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)
- 2019-02-20 17:18:50,428 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Connected
- 2019-02-20 17:18:50,428 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Changing state to <start>
- 2019-02-20 17:18:50,429 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Setting timeout: 60s
- 2019-02-20 17:18:50,460 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\x1b[H\x1b[J'
- 2019-02-20 17:18:50,461 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\r\x1b[100B'
- 2019-02-20 17:18:50,462 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received WILL SGA
- 2019-02-20 17:18:50,462 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Send DO SGA
- 2019-02-20 17:18:50,463 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received WILL ECHO
- 2019-02-20 17:18:50,463 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Send DO ECHO
- 2019-02-20 17:18:50,464 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received DO NAWS
- 2019-02-20 17:18:50,464 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Send WILL NAWS
- 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
- 2019-02-20 17:18:50,466 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\n\n\n\n'
- 2019-02-20 17:18:50,467 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'DGS-1210-28P login: '
- 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): ?
- 2019-02-20 17:18:50,467 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Changing state to <username>
- 2019-02-20 17:18:50,467 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Send: 'admin\n'
- 2019-02-20 17:18:50,468 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Setting timeout: 30s
- 2019-02-20 17:18:50,528 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'a'
- 2019-02-20 17:18:50,530 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'd'
- 2019-02-20 17:18:50,533 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'm'
- 2019-02-20 17:18:50,534 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'i'
- 2019-02-20 17:18:50,535 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'n'
- 2019-02-20 17:18:50,536 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\r\n'
- 2019-02-20 17:18:50,537 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\rPassword: '
- 2019-02-20 17:18:50,537 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Match: [Pp]ass[Ww]ord: ?
- 2019-02-20 17:18:50,538 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Changing state to <password>
- 2019-02-20 17:18:50,538 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Send: 'trololo\n'
- 2019-02-20 17:18:50,538 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Setting timeout: 30s
- 2019-02-20 17:18:50,543 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\r\n'
- 2019-02-20 17:18:50,544 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\r\n'
- 2019-02-20 17:18:50,546 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\rDGS-1210-28P> '
- 2019-02-20 17:18:50,547 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Match: (?P<hostname>\S+(:\S+)*)[#>]
- 2019-02-20 17:18:50,547 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Changing state to <prompt>
- 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[#>]'
- 2019-02-20 17:18:50,547 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Resetting timeouts
- 2019-02-20 17:18:50,548 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Send: 'show switch\n'
- 2019-02-20 17:18:50,551 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 's'
- 2019-02-20 17:18:50,552 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'h'
- 2019-02-20 17:18:50,553 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'o'
- 2019-02-20 17:18:50,554 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'w'
- 2019-02-20 17:18:50,555 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: ' '
- 2019-02-20 17:18:50,556 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 's'
- 2019-02-20 17:18:50,557 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'w'
- 2019-02-20 17:18:50,558 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'i'
- 2019-02-20 17:18:50,560 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 't'
- 2019-02-20 17:18:50,561 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'c'
- 2019-02-20 17:18:50,562 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'h'
- 2019-02-20 17:18:50,563 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\r'
- 2019-02-20 17:18:50,564 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\n'
- 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'
- 2019-02-20 17:18:50,570 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'System Contact : \r\n'
- 2019-02-20 17:18:50,571 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: 'System Location : Factory\r\n'
- 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'
- 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'
- 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'
- 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'
- 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'
- 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'
- 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'
- 2019-02-20 17:18:50,579 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\r\n'
- 2019-02-20 17:18:50,581 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Received: '\rDGS-1210-28P> '
- 2019-02-20 17:18:50,581 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Match: DGS\-1210\-28P[#>]
- 2019-02-20 17:18:50,581 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Changing state to <prompt>
- 2019-02-20 17:18:50,582 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Command: show switch
- show switch
- System name : zsw-7
- System Contact :
- System Location : Factory
- System up time : 16 days, 7 hrs, 37 min, 44 secs
- System Time : 20/02/2019 17:18:50
- System hardware version : C1
- System firmware version : 4.10.B043
- System boot version : 1.00.016
- System serial number : XXXXXXXXXXXXX
- MAC Address : C4-12-F5-E6-C4-15
- 2019-02-20 17:18:50,582 [script] [DLink.DxS_Smart.get_version|192.168.57.69] Caching result
- 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'}}
- 2019-02-20 17:18:50,583 [script] [DLink.DxS_Smart.get_version|192.168.57.69] Complete (181.18ms)
- 2019-02-20 17:18:50,583 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [snmp] Closing UDP socket
- 2019-02-20 17:18:50,583 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [snmp] Closing IOLoop
- 2019-02-20 17:18:50,583 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Closing IOStream
- 2019-02-20 17:18:50,583 [script] [DLink.DxS_Smart.get_portchannel|192.168.57.69] [telnet] Closing IOLoop
- 2019-02-20 17:18:50,617 [noc.core.debug] UNHANDLED EXCEPTION (2019-02-20 17:18:50.598216)
- PROCESS: ./commands/script.py
- VERSION: 19.1
- BRANCH: HEAD CHANGESET: e8d18ab3
- ERROR FINGERPRINT: 60c6eac9-3043-533a-93cb-069f27ae447f
- WORKING DIRECTORY: /opt/noc
- EXCEPTION: <type 'exceptions.NotImplementedError'>
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: sa/profiles/DLink/DxS_Smart/get_portchannel.py (Line: 40)
- Function: execute
- 33 for c in ports:
- 34 for i in range(len(c)):
- 35 p += bin[int(c[i], 16)]
- 36 return p
- 37 try:
- 38 pmib = self.profile.get_pmib(self.scripts.get_version())
- 39 if pmib is None:
- 40 ==> raise NotImplementedError()
- 41 for v in self.snmp.get_tables([
- 42 pmib + ".8.1.3.1.1",
- 43 pmib + ".8.1.3.1.2",
- 44 pmib + ".8.1.3.1.3"], bulk=True):
- 45 oid = "1.3.6.1.2.1.31.1.1.1.1." + str(v[1])
- 46 port = self.snmp.get(oid, cached=True) # IF-MIB
- Variables:
- self =
- <noc.sa.profiles.DLink.DxS_Smart.get_portchannel.Script object at 0x7fbcdb944e10>
- r = []
- pmib = None
- hex2bin = <function hex2bin at 0x7fbcdb96a488>
- ------------------------------------------------------------------------
- File: core/script/base.py (Line: 258)
- Function: run
- 251 self.logger.info("Using cached result")
- 252 cache_hit = True
- 253 except KeyError:
- 254 pass
- 255 # Execute script
- 256 if not cache_hit:
- 257 try:
- 258 ==> result = self.execute(**self.args)
- 259 if self.cache and self.parent and result:
- 260 self.logger.info("Caching result")
- 261 self.set_cache(self.name, self.args, result)
- 262 finally:
- 263 if not self.parent:
- 264 # Close SNMP socket when necessary
- Variables:
- cache_hit = False
- self =
- <noc.sa.profiles.DLink.DxS_Smart.get_portchannel.Script object at 0x7fbcdb944e10>
- ------------------------------------------------------------------------
- File: commands/script.py (Line: 122)
- Function: handle
- 115 args=args,
- 116 version=version,
- 117 timeout=3600,
- 118 name=script
- 119 )
- 120 span_sample = 1 if update_spec else 0
- 121 with Span(sample=span_sample):
- 122 ==> result = scr.run()
- 123 if pretty:
- 124 pprint.pprint(result)
- 125 elif yaml:
- 126 import yaml
- 127 import sys
- 128 yaml.dump(result, sys.stdout)
- Variables:
- obj = <ManagedObject: zsw-7>
- service = <__main__.ServiceStub object at 0x7fbcdb944c50>
- script = u'DLink.DxS_Smart.get_portchannel'
- script_class = <class 'noc.sa.profiles.DLink.DxS_Smart.get_portchannel.Script'>
- update_spec = None
- args = {}
- use_snmp = True
- caps =
- {u'DB | Interfaces': 28,
- u'SNMP': True,
- u'SNMP | Bulk': True,
- u'SNMP | IF-MIB': True,
- u'SNMP | IF-MIB | HC': True,
- u'SNMP | v1': True,
- u'SNMP | v2c': True}
- self = <__main__.Command object at 0x7fbcecc5e090>
- yaml = False
- object_name = ['zsw-7']
- version =
- {'platform': u'DGS-1210-28P/C1', 'vendor': u'D-Link', 'version': u'4.10.B043'}
- arguments = []
- pretty = False
- credentials =
- {'access_preference': u'SC',
- 'address': u'192.168.57.69',
- 'cli_protocol': 'telnet',
- 'password': u'trololo',
- 'path': None,
- 'raise_privileges': True,
- 'snmp_ro': u'ololo',
- 'snmp_version': 'v2c',
- 'super_password': None,
- 'user': u'admin'}
- access_preference = None
- options = {}
- span_sample = 0
- scr =
- <noc.sa.profiles.DLink.DxS_Smart.get_portchannel.Script object at 0x7fbcdb944e10>
- ------------------------------------------------------------------------
- File: core/management/base.py (Line: 78)
- Function: run_from_argv
- 71 show_metrics = cmd_options.pop("show_metrics", False)
- 72 self.no_progressbar = cmd_options.pop("no_progressbar", False)
- 73 if enable_profiling:
- 74 # Start profiler
- 75 import yappi
- 76 yappi.start()
- 77 try:
- 78 ==> return self.handle(*args, **cmd_options) or 0
- 79 except CommandError as e:
- 80 self.print(str(e))
- 81 return 1
- 82 except KeyboardInterrupt:
- 83 self.print("Ctrl+C")
- 84 return 3
- Variables:
- parser =
- ArgumentParser(prog='noc script', usage=None, description=None, version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
- loglevel = 'debug'
- enable_profiling = False
- args = ()
- cmd_options =
- {'access_preference': None,
- 'arguments': [],
- 'object_name': ['zsw-7'],
- 'pretty': False,
- 'script': ['get_portchannel'],
- 'update_spec': None,
- 'use_snmp': True,
- 'yaml': False}
- argv = ['--debug', 'get_portchannel', 'zsw-7']
- self = <__main__.Command object at 0x7fbcecc5e090>
- show_metrics = False
- error_report = <function error_report at 0x7fbcff5d85f0>
- options =
- Namespace(access_preference=None, arguments=[], object_name=['zsw-7'], pretty=False, script=['get_portchannel'], update_spec=None, use_snmp=True, yaml=False)
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement