Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@Node01 noc]# ./noc network-scan --in /tmp/nets --autoadd KORSW --auth korit --community public --pool default --version 1
- 2021-12-15 18:28:50,691 [noc.core.ioloop.util] Setting up asyncio event loop policy
- 2021-12-15 18:28:50,691 [noc.core.ioloop.util] Setting up default event loop
- 2021-12-15 18:28:50,765 [noc.core.dcs.base] Resolve near service postgres
- 2021-12-15 18:28:50,772 [noc.core.dcs.base] Resolved near service postgres to ['10.xxx.xxx.xxx:5432']
- 2021-12-15 16:28:51,145 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
- 2021-12-15 16:28:51,507 [noc.core.dcs.base] [mongo] Starting resolver (near=False)
- 2021-12-15 16:28:51,512 [noc.core.dcs.base] [mongo] Set active services to: mongo: 10.xxx.xxx.xxx:27017
- 2021-12-15 16:28:51,513 [noc.core.dcs.base] [mongo] Stopping resolver
- 2021-12-15 16:28:51,514 [noc.core.mongo.connection] Connecting to MongoDB {'db': 'noc3', 'username': 'noc', 'password': '********', 'authentication_source': 'noc3', 'replicaSet': 'noc', 'readPreference': 'secondaryPreferred', 'maxIdleTimeMS': 60000, 'host': 'mongodb://noc:********@10.82.0.111:27017/noc3'}
- 2021-12-15 16:28:51,628 [noc.core.ioloop.ping] Adjust ping socket buffers: send=425984, recv=425984
- ver.12
- enable_ping 57
- enable_snmp 57
- 2021-12-15 16:28:52,048 [noc.core.debug] UNHANDLED EXCEPTION (2021-12-15 16:28:51.720323)
- PROCESS: ./commands/network-scan.py
- VERSION: 20.4+master.2145.b4200d4d
- BRANCH: master CHANGESET: b4200d4d
- ERROR FINGERPRINT: a72259a2-78b6-53ca-9c8e-c4183360c398
- WORKING DIRECTORY: /opt/noc
- EXCEPTION: <class 'AttributeError'> 'Command' object has no attribute 'auth'
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: commands/network-scan.py (Line: 330)
- Function: handle
- 323 if self.mo[ipx]["labels"]:
- 324 x9 = ",".join(self.mo[ipx]["labels"] if self.mo[ipx]["labels"] else [])
- 325 else:
- 326 if autoadd:
- 327 m = ManagedObject(
- 328 name=ipx,
- 329 is_managed=is_managed,
- 330 ==> auth_profile=self.auth,
- 331 administrative_domain=AdministrativeDomain.objects.get(
- 332 name=administrative_domain
- 333 ),
- 334 profile=Profile.objects.get(name=profile),
- 335 description=description,
- 336 object_profile=self.object_profile,
- Variables:
- imports = None
- jobs = 100
- convert = False
- version = 1
- auth = 'korit'
- pool = 'default'
- autoadd = 'KORSW'
- mail = None
- email = None
- format = 'csv'
- args = ()
- options = {}
- ping_task = <function Command.handle.<locals>.ping_task at 0x7fc537337b80>
- snmp_task = <function Command.handle.<locals>.snmp_task at 0x7fc537337af0>
- is_managed = 'True'
- administrative_domain = 'default'
- profile = 'Generic.Host'
- description = 'create object 20211215'
- segment = 'ALL'
- labels = ['autoadd']
- moall = <QuerySet []>
- data =
- ('IP;Доступен по ICMP;IP есть;is_managed;SMNP sysname;SNMP '
- 'sysObjectId;Vendor;Model;Имя;pool;labels\n')
- ipx = '10.xxx.xxx.xxx'
- x2 = 'Да'
- x4 = 'Не определено'
- x5 = 'Не определено'
- x6 = 'Не определено'
- x7 = 'Не определено'
- x8 = 'Не определено'
- x9 = 'Не определено'
- x11 = 'Не определено'
- addresses = []
- community = ['public']
- exclude = None
- input = ['/tmp/nets']
- oid = ['1.3.6.1.2.1.1.2.0', '1.3.6.1.2.1.1.5.0']
- self = <__main__.Command object at 0x7fc555f20190>
- timeout = 1
- ------------------------------------------------------------------------
- File: core/management/base.py (Line: 84)
- Function: run_from_argv
- 77
- 78 yappi.start()
- 79 try:
- 80 if show_usage:
- 81 import resource
- 82
- 83 start_usage = resource.getrusage(resource.RUSAGE_SELF)
- 84 ==> return self.handle(*args, **cmd_options) or 0
- 85 except CommandError as e:
- 86 self.print(str(e))
- 87 return 1
- 88 except KeyboardInterrupt:
- 89 self.print("Ctrl+C")
- 90 return 3
- Variables:
- self = <__main__.Command object at 0x7fc555f20190>
- argv =
- ['--in',
- '/tmp/nets',
- '--autoadd',
- 'KORSW',
- '--auth',
- 'korit',
- '--community',
- 'public',
- '--pool',
- 'default',
- '--version',
- '1']
- parser =
- ArgumentParser(prog='noc network-scan', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
- options =
- Namespace(addresses=[], auth='korit', autoadd='KORSW', community=['public'], convert=False, email=None, exclude=None, format='csv', imports=None, input=['/tmp/nets'], jobs=100, mail=None, oid=['1.3.6.1.2.1.1.2.0', '1.3.6.1.2.1.1.5.0'], pool='default', timeout=1, version=1)
- cmd_options =
- {'addresses': [],
- 'auth': 'korit',
- 'autoadd': 'KORSW',
- 'community': ['public'],
- 'convert': False,
- 'email': None,
- 'exclude': None,
- 'format': 'csv',
- 'imports': None,
- 'input': ['/tmp/nets'],
- 'jobs': 100,
- 'mail': None,
- 'oid': ['1.3.6.1.2.1.1.2.0', '1.3.6.1.2.1.1.5.0'],
- 'pool': 'default',
- 'timeout': 1,
- 'version': 1}
- args = ()
- loglevel = 'info'
- enable_profiling = False
- show_metrics = False
- show_usage = False
- error_report = <function error_report at 0x7fc53eb00af0>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement