예제 #1
0
    def __init__(self, settings):
        super().__init__(settings)

        self.sampler = PSStats(hosts=self.nodes,
                               workers=self.workers,
                               user=self.ssh_username,
                               password=self.ssh_password,
                               interval=self.interval)
예제 #2
0
 def __init__(self, settings):
     super(PS, self).__init__(settings)
     self.nodes = settings.hostnames or list(self.get_nodes())
     if hasattr(settings,
                "sync_gateway_nodes") and settings.sync_gateway_nodes:
         self.nodes += settings.sync_gateway_nodes
     self.ps = PSStats(hosts=self.nodes,
                       user=self.ssh_username,
                       password=self.ssh_password)
예제 #3
0
class PS(Collector):

    COLLECTOR = "atop"  # Legacy

    KNOWN_PROCESSES = ("beam.smp", "memcached", "indexer", "projector",
                       "cbq-engine", "sync_gateway")

    def __init__(self, settings):
        super(PS, self).__init__(settings)
        self.nodes = settings.hostnames or list(self.get_nodes())
        if hasattr(settings, "sync_gateway_nodes") and settings.sync_gateway_nodes:
            self.nodes += settings.sync_gateway_nodes
        if hasattr(settings, "monitor_clients") and settings.monitor_clients\
                and settings.master_node in settings.monitor_clients:
            self.nodes = settings.monitor_clients
            self.KNOWN_PROCESSES = ("backup", "cbbackupwrapper", )
        if hasattr(settings, "fts_server"):
            self.KNOWN_PROCESSES = ("beam.smp", "memcached", "cbft",)
        self.ps = PSStats(hosts=self.nodes,
                          user=self.ssh_username,
                          password=self.ssh_password)

    def update_metadata(self):
        self.mc.add_cluster()
        for node in self.nodes:
            self.mc.add_server(node)

    def sample(self):
        for process in self.KNOWN_PROCESSES:
            for node, stats in self.ps.get_samples(process).items():
                if stats:
                    self.update_metric_metadata(stats.keys(), server=node)
                    self.store.append(stats,
                                      cluster=self.cluster, server=node,
                                      collector=self.COLLECTOR)
예제 #4
0
파일: ps.py 프로젝트: mahesh152/perfrunner
class PS(Collector):

    COLLECTOR = "atop"  # Legacy / compatibility

    def get_nodes(self):
        return self.settings.hostnames or super(PS, self).get_nodes()

    def __init__(self, settings):
        self.settings = settings

        super(PS, self).__init__(settings)

        self.ps = PSStats(hosts=self.nodes,
                          user=self.ssh_username, password=self.ssh_password)

        if hasattr(settings, "fts_server") and settings.fts_server:
            self.KNOWN_PROCESSES = ("beam.smp", "memcached", "cbft")

    def update_metadata(self):
        self.mc.add_cluster()
        for node in self.nodes:
            self.mc.add_server(node)

    def sample(self):
        for process in self.settings.monitored_processes:
            for node, stats in self.ps.get_samples(process).items():
                if stats:
                    self.update_metric_metadata(stats.keys(), server=node)
                    self.store.append(stats,
                                      cluster=self.cluster, server=node,
                                      collector=self.COLLECTOR)
예제 #5
0
class PS(Collector):

    COLLECTOR = "atop"  # Legacy

    KNOWN_PROCESSES = ("beam.smp", "memcached", "indexer", "projector",
                       "cbq-engine", "sync_gateway")

    def __init__(self, settings):
        super(PS, self).__init__(settings)
        self.nodes = settings.hostnames or list(self.get_nodes())
        if hasattr(settings,
                   "sync_gateway_nodes") and settings.sync_gateway_nodes:
            self.nodes += settings.sync_gateway_nodes
        self.ps = PSStats(hosts=self.nodes,
                          user=self.ssh_username,
                          password=self.ssh_password)

    def update_metadata(self):
        self.mc.add_cluster()
        for node in self.nodes:
            self.mc.add_server(node)

    def sample(self):
        for process in self.KNOWN_PROCESSES:
            for node, stats in self.ps.get_samples(process).items():
                if stats:
                    self.update_metric_metadata(stats.keys(), server=node)
                    self.store.append(stats,
                                      cluster=self.cluster,
                                      server=node,
                                      collector=self.COLLECTOR)
예제 #6
0
파일: ps.py 프로젝트: EricACooper/cbagent
 def __init__(self, settings):
     super(PS, self).__init__(settings)
     self.nodes = settings.hostnames or list(self.get_nodes())
     if hasattr(settings, "sync_gateway_nodes") and settings.sync_gateway_nodes:
         self.nodes += settings.sync_gateway_nodes
     self.ps = PSStats(hosts=self.nodes,
                       user=self.ssh_username,
                       password=self.ssh_password)
예제 #7
0
파일: ps.py 프로젝트: mahesh152/perfrunner
    def __init__(self, settings):
        self.settings = settings

        super(PS, self).__init__(settings)

        self.ps = PSStats(hosts=self.nodes,
                          user=self.ssh_username, password=self.ssh_password)

        if hasattr(settings, "fts_server") and settings.fts_server:
            self.KNOWN_PROCESSES = ("beam.smp", "memcached", "cbft")
예제 #8
0
파일: ps.py 프로젝트: sandipnd/cbagent
 def __init__(self, settings):
     super(PS, self).__init__(settings)
     self.nodes = settings.hostnames or list(self.get_nodes())
     if hasattr(settings, "sync_gateway_nodes") and settings.sync_gateway_nodes:
         self.nodes += settings.sync_gateway_nodes
     if hasattr(settings, "monitor_clients") and settings.monitor_clients\
             and settings.master_node in settings.monitor_clients:
         self.nodes = settings.monitor_clients
         self.KNOWN_PROCESSES = ("backup", "cbbackupwrapper", )
     self.ps = PSStats(hosts=self.nodes,
                       user=self.ssh_username,
                       password=self.ssh_password)
예제 #9
0
파일: ps.py 프로젝트: bharath-gp/cbagent
 def __init__(self, settings):
     super(PS, self).__init__(settings)
     self.nodes = settings.hostnames or list(self.get_nodes())
     if hasattr(settings,
                "sync_gateway_nodes") and settings.sync_gateway_nodes:
         self.nodes += settings.sync_gateway_nodes
     if hasattr(settings, "monitor_clients") and settings.monitor_clients\
             and settings.master_node in settings.monitor_clients:
         self.nodes = settings.monitor_clients
         self.KNOWN_PROCESSES = (
             "backup",
             "cbbackupwrapper",
         )
     if hasattr(settings, "fts_server"):
         self.KNOWN_PROCESSES = (
             "beam.smp",
             "memcached",
             "cbft",
         )
     self.ps = PSStats(hosts=self.nodes,
                       user=self.ssh_username,
                       password=self.ssh_password)
예제 #10
0
class PS(System):

    COLLECTOR = "atop"  # Legacy / compatibility

    def __init__(self, settings):
        super().__init__(settings)

        self.sampler = PSStats(hosts=self.nodes,
                               workers=self.workers,
                               user=self.ssh_username,
                               password=self.ssh_password)

    def sample(self):
        for process in self.settings.server_processes:
            for node, stats in self.sampler.get_server_samples(
                    process).items():
                self.add_stats(node, stats)

        for process in self.settings.client_processes:
            for node, stats in self.sampler.get_client_samples(
                    process).items():
                self.add_stats(node, stats)