def build_config(self): """Build the config as a Plugins object and return.""" log.info("\tWatching the mon-thresh process.") config = monasca_setup.agent_config.Plugins() for process in ['storm.daemon.nimbus', 'storm.daemon.supervisor', 'storm.daemon.worker']: if find_process_cmdline(process) is not None: config.merge(watch_process([process], 'monitoring', 'apache-storm', exact_match=False, detailed=False)) config.merge(watch_process_by_username('storm', 'monasca-thresh', 'monitoring', 'apache-storm')) return config
def build_config(self): kibana_config = self._get_config_file() try: (kibana_host, kibana_port, kibana_protocol) = self._read_config(kibana_config) except Exception as ex: LOG.error('Failed to read configuration at %s' % kibana_config) LOG.exception(ex) return if kibana_protocol == 'https': LOG.error('"https" protocol is currently not supported') return None config = agent_config.Plugins() # retrieve user name and set in config # if passed in args (note args are optional) if (self.args and 'kibana-user' in self.args and self.args['kibana-user']): process = detection.watch_process_by_username( username=self.args['kibana-user'], process_name='kibana', service='monitoring', component='kibana') else: process = detection.watch_process(['kibana'], service='monitoring', component='kibana', process_name='kibana') config.merge(process) kibana_url = '%s://%s:%d' % (kibana_protocol, kibana_host, kibana_port) if not self._has_metrics_support(kibana_url): LOG.warning('Running kibana does not support metrics, skipping...') return None else: metrics = self._get_all_metrics(kibana_url) config['kibana'] = { 'init_config': { 'url': '%s/%s' % (kibana_url, _API_STATUS), }, 'instances': [{ "name": kibana_url, 'metrics': metrics }] } LOG.info('\tWatching the kibana process.') return config
def build_config(self): """Build the config as a Plugins object and return.""" log.info("\tWatching the mon-thresh process.") config = monasca_setup.agent_config.Plugins() for process in [ 'storm.daemon.nimbus', 'storm.daemon.supervisor', 'storm.daemon.worker' ]: if find_process_cmdline(process) is not None: config.merge( watch_process([process], 'monitoring', 'apache-storm', exact_match=False, detailed=False)) config.merge( watch_process_by_username('storm', 'monasca-thresh', 'monitoring', 'apache-storm')) return config
def build_config(self): """Build the config as a Plugins object and return.""" log.info("\tEnabling the Monasca Agent process check") return watch_process_by_username('mon-agent', 'monasca-agent', 'monitoring', 'monasca-agent')
def build_config(self): """Build the config as a Plugins object and return.""" log.info("\tEnabling the Monasca Notification healthcheck") return watch_process_by_username('mon-notification', 'monasca-notification', 'monitoring', 'monasca-notification')
def build_config(self): kibana_config = self._get_config_file() try: (kibana_host, kibana_port, kibana_protocol) = self._read_config(kibana_config) except Exception as ex: LOG.error('Failed to read configuration at %s' % kibana_config) LOG.exception(ex) return if kibana_protocol == 'https': LOG.error('"https" protocol is currently not supported') return None config = agent_config.Plugins() # retrieve user name and set in config # if passed in args (note args are optional) if (self.args and 'kibana-user' in self.args and self.args['kibana-user']): process = detection.watch_process_by_username( username=self.args['kibana-user'], process_name='kibana', service='monitoring', component='kibana' ) else: process = detection.watch_process(['kibana'], service='monitoring', component='kibana', process_name='kibana') config.merge(process) kibana_url = '%s://%s:%d' % ( kibana_protocol, kibana_host, kibana_port ) if not self._has_metrics_support(kibana_url): LOG.warning('Running kibana does not support metrics, skipping...') return None else: metrics = self._get_all_metrics(kibana_url) config['kibana'] = { 'init_config': { 'url': '%s/%s' % (kibana_url, _API_STATUS), }, 'instances': [ { "name": kibana_url, 'metrics': metrics } ] } LOG.info('\tWatching the kibana process.') return config