Exemple #1
0
 def __init__(self, *args, **kwargs):
     super(ZenEventD, self).__init__(*args, **kwargs)
     EventPipelineProcessor.SYNC_EVERY_EVENT = self.options.syncEveryEvent
     self._heartbeatSender = QueueHeartbeatSender('localhost',
                                                  'zeneventd',
                                                  self.options.maintenancecycle *3)
     self._maintenanceCycle = MaintenanceCycle(self.options.maintenancecycle,
                               self._heartbeatSender)
     objectEventNotify(DaemonCreatedEvent(self))
Exemple #2
0
 def __init__(self, *args, **kwargs):
     super(ZenEventD, self).__init__(*args, **kwargs)
     EventPipelineProcessor.SYNC_EVERY_EVENT = self.options.syncEveryEvent
     EventPipelineProcessor.PROCESS_EVENT_TIMEOUT = self.options.process_event_timeout
     self._heartbeatSender = QueueHeartbeatSender(
         'localhost', 'zeneventd', self.options.heartbeatTimeout)
     self._maintenanceCycle = MaintenanceCycle(
         self.options.maintenancecycle, self._heartbeatSender)
     objectEventNotify(DaemonCreatedEvent(self))
     config = ZenEventDConfig(self.options)
     provideUtility(config, IDaemonConfig, 'zeneventd_config')
Exemple #3
0
    def __init__(self):
        super(ZenActionD, self).__init__()
        self._consumer = None
        self._workers = ProcessWorkers(self.options.workers - 1, exec_worker,
                                       "zenactiond worker")
        self._heartbeatSender = QueueHeartbeatSender(
            'localhost', 'zenactiond', self.options.heartbeatTimeout)

        self._maintenanceCycle = MaintenanceCycle(
            self.options.maintenancecycle, self._heartbeatSender)
        self._callHomeCycler = CallHomeCycler(self.dmd)
        self._schedule = Schedule(self.options, self.dmd)
        self._schedule.sendEvent = self.dmd.ZenEventManager.sendEvent
        self._schedule.monitor = self.options.monitor
 def _startMaintenance(self, ignored=None):
     unused(ignored)
     if not self.options.cycle:
         self._maintenanceCycle()
         return
     if self.options.logTaskStats > 0:
         log.debug("Starting Task Stat logging")
         loop = task.LoopingCall(self._displayStatistics, verbose=True)
         loop.start(self.options.logTaskStats, now=False)
     interval = self.preferences.cycleInterval
     self.log.debug("Initializing maintenance Cycle")
     maintenanceCycle = MaintenanceCycle(interval, self,
                                         self._maintenanceCycle)
     maintenanceCycle.start()
Exemple #5
0
    def _startMaintenance(self, ignored=None):
        unused(ignored)
        if not self.options.cycle:
            self._maintenanceCycle()
            return
        if self.options.logTaskStats > 0:
            log.debug("Starting Task Stat logging")
            loop = task.LoopingCall(self._displayStatistics, verbose=True)
            loop.start(self.options.logTaskStats, now=False)

        log.debug("Starting Statistic posting")
        loop = task.LoopingCall(self._postStatistics)
        loop.start(self.options.writeStatistics, now=False)

        interval = self.preferences.cycleInterval
        self.log.debug("Initializing maintenance Cycle")
        heartbeatSender = self if self.worker_id == 0 else None
        maintenanceCycle = MaintenanceCycle(interval, heartbeatSender, self._maintenanceCycle)
        maintenanceCycle.start()