Advertisement
Guest User

Untitled

a guest
Sep 6th, 2014
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.25 KB | None | 0 0
  1. 2014-09-06 10:16:47,915 [noc.lib.debug] UNHANDLED EXCEPTION (2014-09-06 10:16:47.912696)
  2. Working directory: /opt/noc
  3. <class 'mongoengine.errors.OperationError'>
  4. Could not save document (command SON([('createIndexes', u'noc.log.sa.interaction'), ('indexes', [{'name': u'expire_1', 'key': SON([('expire', 1)]), 'background': False, 'expireAfterSeconds': 0, 'dropDups': False}])]) failed: Index with name: expire_1 already exists with different options)
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/noc/lib/python2.7/site-packages/mongoengine/document.py (Line: 294)
  8. Function: save
  9. 287 except pymongo.errors.OperationFailure, err:
  10. 288 message = 'Could not save document (%s)'
  11. 289 if re.match('^E1100[01] duplicate key', unicode(err)):
  12. 290 # E11000 - duplicate key error index
  13. 291 # E11001 - duplicate key on update
  14. 292 message = u'Tried to save duplicate unique keys (%s)'
  15. 293 raise NotUniqueError(message % unicode(err))
  16. 294 ==> raise OperationError(message % unicode(err))
  17. 295 id_field = self._meta['id_field']
  18. 296 if id_field not in self._meta.get('shard_key', []):
  19. 297 self[id_field] = self._fields[id_field].to_python(object_id)
  20. 298
  21. 299 self._clear_changed_fields()
  22. 300 self._created = False
  23. Variables:
  24. clean = True
  25. err =
  26. OperationFailure(u"command SON([('createIndexes', u'noc.log.sa.interaction'), ('indexes', [{'name': u'expire_1', 'key': SON([('expire', 1)]), 'background': False, 'expireAfterSeconds': 0, 'dropDups': False}])]) failed: Index with name: expire_1 already exists with different options",)
  27. force_insert = False
  28. doc =
  29. SON([('timestamp', datetime.datetime(2014, 9, 6, 9, 9, 23)), ('expire', datetime.datetime(2014, 10, 6, 9, 9, 23)), ('object', 685), ('user', u'autonoc'), ('op', 0), ('text', u'!exec: enable')])
  30. self = <InteractionLog: None>
  31. created = True
  32. _refs = None
  33. cascade = None
  34. write_concern = {'w': 1}
  35. cascade_kwargs = None
  36. kwargs = {}
  37. message = 'Could not save document (%s)'
  38. validate = True
  39. ------------------------------------------------------------------------
  40. File: /opt/noc/fm/handlers/event/audit.py (Line: 57)
  41. Function: log_cmd
  42. 50 """
  43. 51 InteractionLog(
  44. 52 timestamp=event.timestamp,
  45. 53 expire=event.timestamp + datetime.timedelta(seconds=TTL_COMMAND),
  46. 54 object=event.managed_object.id,
  47. 55 user=event.vars.get("user"),
  48. 56 op=InteractionLog.OP_COMMAND,
  49. 57 ==> text=event.vars.get("command")
  50. 58 ).save()
  51. 59
  52. 60
  53. 61 def log_login(event):
  54. 62 """
  55. 63 Log login event
  56. Variables:
  57. event = <ActiveEvent: 540a9703f3b6826d17eaf856>
  58. ------------------------------------------------------------------------
  59. File: /opt/noc/fm/classifier/__init__.py (Line: 684)
  60. Function: classify_event
  61. 677 event.delete()
  62. 678 event = a_event
  63. 679 # Call handlers
  64. 680 if event_class.id in self.handlers:
  65. 681 event_id = event.id
  66. 682 for h in self.handlers[event_class.id]:
  67. 683 try:
  68. 684 ==> h(event)
  69. 685 except:
  70. 686 error_report()
  71. 687 if event.to_drop:
  72. 688 logging.debug("Event dropped by handler")
  73. 689 event.id = event_id # Restore event id
  74. 690 event.delete()
  75. Variables:
  76. event = <ActiveEvent: 540a9703f3b6826d17eaf856>
  77. nearest = None
  78. a_event = <ActiveEvent: 540a9703f3b6826d17eaf856>
  79. resolved_vars = {'profile': u'Cisco.IOS'}
  80. log =
  81. [<EventLog: 2014-09-06 10:16:47.908741 [N -> A]: Classified as 'Security | Audit | Command' by rule 'Cisco | IOS | Security | Audit | Command #1 (SYSLOG)'>]
  82. vars = {u'command': u'!exec: enable', u'user': u'autonoc'}
  83. event_id = ObjectId('540a9703f3b6826d17eaf856')
  84. h = <function log_cmd at 0x81286ae60>
  85. self = <noc.fm.classifier.Classifier object at 0x80f5bc690>
  86. de = None
  87. disposable = True
  88. rule = <Rule 'Cisco | IOS | Security | Audit | Command #1 (SYSLOG)'>
  89. o_id = 685
  90. suppress = False
  91. message =
  92. u"Classified as 'Security | Audit | Command' by rule 'Cisco | IOS | Security | Audit | Command #1 (SYSLOG)'"
  93. c_vars =
  94. {u'collector': u'0.0.0.0:514',
  95. u'message': u'1368: Sep 6 09:09:22: %PARSER-5-CFGLOG_LOGGEDCMD: User:autonoc logged command:!exec: enable',
  96. 'profile': 'Cisco.IOS',
  97. u'source': u'syslog'}
  98. event_class = <EventClass: Security | Audit | Command>
  99. name = None
  100. ------------------------------------------------------------------------
  101. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement