Advertisement
Guest User

Untitled

a guest
Dec 15th, 2021
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.27 KB | None | 0 0
  1. [root@Node01 noc]# ./noc network-scan --in /tmp/nets --autoadd KORSW --auth korit --community public --pool default --version 1
  2. 2021-12-15 18:28:50,691 [noc.core.ioloop.util] Setting up asyncio event loop policy
  3. 2021-12-15 18:28:50,691 [noc.core.ioloop.util] Setting up default event loop
  4. 2021-12-15 18:28:50,765 [noc.core.dcs.base] Resolve near service postgres
  5. 2021-12-15 18:28:50,772 [noc.core.dcs.base] Resolved near service postgres to ['10.xxx.xxx.xxx:5432']
  6. 2021-12-15 16:28:51,145 [noc.core.cache.base] Using cache backend: noc.core.cache.mongo.MongoCache
  7. 2021-12-15 16:28:51,507 [noc.core.dcs.base] [mongo] Starting resolver (near=False)
  8. 2021-12-15 16:28:51,512 [noc.core.dcs.base] [mongo] Set active services to: mongo: 10.xxx.xxx.xxx:27017
  9. 2021-12-15 16:28:51,513 [noc.core.dcs.base] [mongo] Stopping resolver
  10. 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'}
  11. 2021-12-15 16:28:51,628 [noc.core.ioloop.ping] Adjust ping socket buffers: send=425984, recv=425984
  12. ver.12
  13. enable_ping 57
  14. enable_snmp 57
  15. 2021-12-15 16:28:52,048 [noc.core.debug] UNHANDLED EXCEPTION (2021-12-15 16:28:51.720323)
  16. PROCESS: ./commands/network-scan.py
  17. VERSION: 20.4+master.2145.b4200d4d
  18. BRANCH: master CHANGESET: b4200d4d
  19. ERROR FINGERPRINT: a72259a2-78b6-53ca-9c8e-c4183360c398
  20. WORKING DIRECTORY: /opt/noc
  21. EXCEPTION: <class 'AttributeError'> 'Command' object has no attribute 'auth'
  22. START OF TRACEBACK
  23. ------------------------------------------------------------------------
  24. File: commands/network-scan.py (Line: 330)
  25. Function: handle
  26. 323 if self.mo[ipx]["labels"]:
  27. 324 x9 = ",".join(self.mo[ipx]["labels"] if self.mo[ipx]["labels"] else [])
  28. 325 else:
  29. 326 if autoadd:
  30. 327 m = ManagedObject(
  31. 328 name=ipx,
  32. 329 is_managed=is_managed,
  33. 330 ==> auth_profile=self.auth,
  34. 331 administrative_domain=AdministrativeDomain.objects.get(
  35. 332 name=administrative_domain
  36. 333 ),
  37. 334 profile=Profile.objects.get(name=profile),
  38. 335 description=description,
  39. 336 object_profile=self.object_profile,
  40. Variables:
  41. imports = None
  42. jobs = 100
  43. convert = False
  44. version = 1
  45. auth = 'korit'
  46. pool = 'default'
  47. autoadd = 'KORSW'
  48. mail = None
  49. email = None
  50. format = 'csv'
  51. args = ()
  52. options = {}
  53. ping_task = <function Command.handle.<locals>.ping_task at 0x7fc537337b80>
  54. snmp_task = <function Command.handle.<locals>.snmp_task at 0x7fc537337af0>
  55. is_managed = 'True'
  56. administrative_domain = 'default'
  57. profile = 'Generic.Host'
  58. description = 'create object 20211215'
  59. segment = 'ALL'
  60. labels = ['autoadd']
  61. moall = <QuerySet []>
  62. data =
  63. ('IP;Доступен по ICMP;IP есть;is_managed;SMNP sysname;SNMP '
  64. 'sysObjectId;Vendor;Model;Имя;pool;labels\n')
  65. ipx = '10.xxx.xxx.xxx'
  66. x2 = 'Да'
  67. x4 = 'Не определено'
  68. x5 = 'Не определено'
  69. x6 = 'Не определено'
  70. x7 = 'Не определено'
  71. x8 = 'Не определено'
  72. x9 = 'Не определено'
  73. x11 = 'Не определено'
  74. addresses = []
  75. community = ['public']
  76. exclude = None
  77. input = ['/tmp/nets']
  78. oid = ['1.3.6.1.2.1.1.2.0', '1.3.6.1.2.1.1.5.0']
  79. self = <__main__.Command object at 0x7fc555f20190>
  80. timeout = 1
  81. ------------------------------------------------------------------------
  82. File: core/management/base.py (Line: 84)
  83. Function: run_from_argv
  84. 77
  85. 78 yappi.start()
  86. 79 try:
  87. 80 if show_usage:
  88. 81 import resource
  89. 82
  90. 83 start_usage = resource.getrusage(resource.RUSAGE_SELF)
  91. 84 ==> return self.handle(*args, **cmd_options) or 0
  92. 85 except CommandError as e:
  93. 86 self.print(str(e))
  94. 87 return 1
  95. 88 except KeyboardInterrupt:
  96. 89 self.print("Ctrl+C")
  97. 90 return 3
  98. Variables:
  99. self = <__main__.Command object at 0x7fc555f20190>
  100. argv =
  101. ['--in',
  102. '/tmp/nets',
  103. '--autoadd',
  104. 'KORSW',
  105. '--auth',
  106. 'korit',
  107. '--community',
  108. 'public',
  109. '--pool',
  110. 'default',
  111. '--version',
  112. '1']
  113. parser =
  114. ArgumentParser(prog='noc network-scan', usage=None, description=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
  115. options =
  116. 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)
  117. cmd_options =
  118. {'addresses': [],
  119. 'auth': 'korit',
  120. 'autoadd': 'KORSW',
  121. 'community': ['public'],
  122. 'convert': False,
  123. 'email': None,
  124. 'exclude': None,
  125. 'format': 'csv',
  126. 'imports': None,
  127. 'input': ['/tmp/nets'],
  128. 'jobs': 100,
  129. 'mail': None,
  130. 'oid': ['1.3.6.1.2.1.1.2.0', '1.3.6.1.2.1.1.5.0'],
  131. 'pool': 'default',
  132. 'timeout': 1,
  133. 'version': 1}
  134. args = ()
  135. loglevel = 'info'
  136. enable_profiling = False
  137. show_metrics = False
  138. show_usage = False
  139. error_report = <function error_report at 0x7fc53eb00af0>
  140. ------------------------------------------------------------------------
  141. END OF TRACEBACK
  142.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement