def register(self, registry): super(CustomGraphPlugin, self).register(registry) registry.register_message( "custom-graph-add", self._handle_custom_graph_add) registry.register_message( "custom-graph-remove", self._handle_custom_graph_remove) self._persist = StoreProxy(self.registry.store) self._accumulate = Accumulator(self._persist, self.run_interval)
def register(self, registry): super(MountInfo, self).register(registry) self._accumulate = Accumulator(self._persist, self.registry.step_size) self._monitor = CoverageMonitor(self.run_interval, 0.8, "mount info snapshot", create_time=self._create_time) self.registry.reactor.call_every(self._monitor_interval, self._monitor.log) self.registry.reactor.call_on("stop", self._monitor.log, priority=2000) self.call_on_accepted("mount-info", self.send_messages, True)
def register(self, registry): super(SwiftUsage, self).register(registry) self._accumulate = Accumulator(self._persist, self._interval) self._monitor = CoverageMonitor(self.run_interval, 0.8, "Swift device usage snapshot", create_time=self._create_time) self.registry.reactor.call_every(self._monitor_interval, self._monitor.log) self.registry.reactor.call_on("stop", self._monitor.log, priority=2000) self.call_on_accepted("swift-usage", self.send_message, True)
def register(self, registry): super(LoadAverage, self).register(registry) self._accumulate = Accumulator(self._persist, registry.step_size) self.registry.reactor.call_every(self._interval, self.run) self._monitor = CoverageMonitor(self._interval, 0.8, "load average snapshot", create_time=self._create_time) self.registry.reactor.call_every(self._monitor_interval, self._monitor.log) self.registry.reactor.call_on("stop", self._monitor.log, priority=2000) self.call_on_accepted("load-average", self.send_message, True)
def register(self, registry): super(Temperature, self).register(registry) if self._thermal_zones: self._accumulate = Accumulator(self._persist, self.registry.step_size) registry.reactor.call_every(self._interval, self.run) self._monitor = CoverageMonitor(self._interval, 0.8, "temperature snapshot", create_time=self._create_time) registry.reactor.call_every(self._monitor_interval, self._monitor.log) registry.reactor.call_on("stop", self._monitor.log, priority=2000) self.call_on_accepted("temperature", self.exchange, True)
def register(self, registry): super(CephUsage, self).register(registry) self._ceph_config = os.path.join(self.registry.config.data_path, "ceph-client", "ceph.landscape-client.conf") self._accumulate = Accumulator(self._persist, self._interval) self._monitor = CoverageMonitor(self._interval, 0.8, "Ceph usage snapshot", create_time=self._create_time) self.registry.reactor.call_every(self._interval, self.run) self.registry.reactor.call_every(self._monitor_interval, self._monitor.log) self.registry.reactor.call_on("stop", self._monitor.log, priority=2000) self.call_on_accepted("ceph-usage", self.send_message, True)
def register(self, registry): super(NetworkActivity, self).register(registry) self._accumulate = Accumulator(self._persist, self.registry.step_size) self.call_on_accepted("network-activity", self.exchange, True)