예제 #1
0
    def get_introspect_for_service(self, service, host_ip):
        if service == 'contrail-svc-monitor':
            inspect = SvcMonInspect(host_ip,
                port=CONTRAIL_INTROSPECT_PORTS[service], logger=self.logger,
                args=self.inputs)
        elif service == 'contrail-vrouter-agent':
            agent_inspect = AgentInspect(host_ip,
                CONTRAIL_INTROSPECT_PORTS[service], self.logger,
                inputs=self.inputs)
        elif service in ['contrail-query-engine', 'contrail-analytics-api', 'contrail-collector']:
            inspect = VerificationOpsSrvIntrospect(host_ip,
                CONTRAIL_INTROSPECT_PORTS[service], self.logger,
                inputs=self.inputs)
        elif service == 'contrail-dns':
            inspect = DnsAgentInspect(host_ip,
                CONTRAIL_INTROSPECT_PORTS[service], self.logger,
                args=self.inputs)
        elif service == 'contrail-control':
            inspect = ControlNodeInspect(host_ip,
                CONTRAIL_INTROSPECT_PORTS[service], self.logger,
                args=self.inputs)
        elif service in ['contrail-api', 'contrail-schema']:
            inspect = VerificationUtilBase(host_ip,
                CONTRAIL_INTROSPECT_PORTS[service], drv=XmlDrv, logger=self.logger,
                args=self.inputs)
        else:
            inspect = None

        return inspect
예제 #2
0
 def get_svc_mon_h(self, refresh=False):
     if not getattr(self, '_svc_mon_inspect', None) or refresh:
         for cfgm_ip in self.inputs.cfgm_ips:
             #contrail-status would increase run time hence netstat approach
             cmd = 'netstat -antp | grep 8088 | grep LISTEN'
             if self.inputs.run_cmd_on_server(cfgm_ip, cmd) is not None:
                 self._svc_mon_inspect = SvcMonInspect(cfgm_ip,
                                        logger=self.logger)
                 break
     return self._svc_mon_inspect
예제 #3
0
 def get_svc_mon_h(self, refresh=False):
     if not getattr(self, '_svc_mon_inspect', None) or refresh:
         for cfgm_ip in self.inputs.cfgm_ips:
             #contrail-status would increase run time hence netstat approach
             cmd = 'netstat -antp | grep :8088 | grep LISTEN'
             if 'LISTEN' in self.inputs.run_cmd_on_server(cfgm_ip, cmd, container='svc-monitor'):
                 self._svc_mon_inspect = SvcMonInspect(cfgm_ip,
                                        logger=self.logger,
                                        args=self.inputs,
                                        protocol=self.inputs.introspect_protocol)
                 break
     return self._svc_mon_inspect