Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 2014-09-06 10:16:47,915 [noc.lib.debug] UNHANDLED EXCEPTION (2014-09-06 10:16:47.912696)
- Working directory: /opt/noc
- <class 'mongoengine.errors.OperationError'>
- 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)
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/lib/python2.7/site-packages/mongoengine/document.py (Line: 294)
- Function: save
- 287 except pymongo.errors.OperationFailure, err:
- 288 message = 'Could not save document (%s)'
- 289 if re.match('^E1100[01] duplicate key', unicode(err)):
- 290 # E11000 - duplicate key error index
- 291 # E11001 - duplicate key on update
- 292 message = u'Tried to save duplicate unique keys (%s)'
- 293 raise NotUniqueError(message % unicode(err))
- 294 ==> raise OperationError(message % unicode(err))
- 295 id_field = self._meta['id_field']
- 296 if id_field not in self._meta.get('shard_key', []):
- 297 self[id_field] = self._fields[id_field].to_python(object_id)
- 298
- 299 self._clear_changed_fields()
- 300 self._created = False
- Variables:
- clean = True
- err =
- 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",)
- force_insert = False
- doc =
- 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')])
- self = <InteractionLog: None>
- created = True
- _refs = None
- cascade = None
- write_concern = {'w': 1}
- cascade_kwargs = None
- kwargs = {}
- message = 'Could not save document (%s)'
- validate = True
- ------------------------------------------------------------------------
- File: /opt/noc/fm/handlers/event/audit.py (Line: 57)
- Function: log_cmd
- 50 """
- 51 InteractionLog(
- 52 timestamp=event.timestamp,
- 53 expire=event.timestamp + datetime.timedelta(seconds=TTL_COMMAND),
- 54 object=event.managed_object.id,
- 55 user=event.vars.get("user"),
- 56 op=InteractionLog.OP_COMMAND,
- 57 ==> text=event.vars.get("command")
- 58 ).save()
- 59
- 60
- 61 def log_login(event):
- 62 """
- 63 Log login event
- Variables:
- event = <ActiveEvent: 540a9703f3b6826d17eaf856>
- ------------------------------------------------------------------------
- File: /opt/noc/fm/classifier/__init__.py (Line: 684)
- Function: classify_event
- 677 event.delete()
- 678 event = a_event
- 679 # Call handlers
- 680 if event_class.id in self.handlers:
- 681 event_id = event.id
- 682 for h in self.handlers[event_class.id]:
- 683 try:
- 684 ==> h(event)
- 685 except:
- 686 error_report()
- 687 if event.to_drop:
- 688 logging.debug("Event dropped by handler")
- 689 event.id = event_id # Restore event id
- 690 event.delete()
- Variables:
- event = <ActiveEvent: 540a9703f3b6826d17eaf856>
- nearest = None
- a_event = <ActiveEvent: 540a9703f3b6826d17eaf856>
- resolved_vars = {'profile': u'Cisco.IOS'}
- log =
- [<EventLog: 2014-09-06 10:16:47.908741 [N -> A]: Classified as 'Security | Audit | Command' by rule 'Cisco | IOS | Security | Audit | Command #1 (SYSLOG)'>]
- vars = {u'command': u'!exec: enable', u'user': u'autonoc'}
- event_id = ObjectId('540a9703f3b6826d17eaf856')
- h = <function log_cmd at 0x81286ae60>
- self = <noc.fm.classifier.Classifier object at 0x80f5bc690>
- de = None
- disposable = True
- rule = <Rule 'Cisco | IOS | Security | Audit | Command #1 (SYSLOG)'>
- o_id = 685
- suppress = False
- message =
- u"Classified as 'Security | Audit | Command' by rule 'Cisco | IOS | Security | Audit | Command #1 (SYSLOG)'"
- c_vars =
- {u'collector': u'0.0.0.0:514',
- u'message': u'1368: Sep 6 09:09:22: %PARSER-5-CFGLOG_LOGGEDCMD: User:autonoc logged command:!exec: enable',
- 'profile': 'Cisco.IOS',
- u'source': u'syslog'}
- event_class = <EventClass: Security | Audit | Command>
- name = None
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement