Пример #1
0
    def __init__(self, cluster_name, **kwargs):
        BaseCollector.__init__(self, cluster_name, **kwargs)
        self.timestamp = int(time.time())

        self.osd = {}		# dict of disk objects, each disk contains osd_id
        self.jrnl = {}      # dict of journal devices (if not collocated)
        self.osd_id_list = []
        self.dev_lookup = {}    # dict dev_name -> osd | jrnl
Пример #2
0
    def __init__(self, *args, **kwargs):
        BaseCollector.__init__(self, *args, **kwargs)

        self.admin_socket = ('/var/run/ceph/{}-mon.'
                             '{}.asok'.format(self.cluster_name,
                                              get_hostname()))

        self.last_state = CephState()

        self.ip_names = get_names()

        if self.version < 12:
            self.get_mon_health = self._mon_health
        else:
            self.get_mon_health = self._mon_health_new

        if self._parent:
            self.logger.debug("Event URL is : "
                              "{}".format(self._parent.event_url))
Пример #3
0
    def __init__(self, *args, **kwargs):
        BaseCollector.__init__(self, *args, **kwargs)

        # Since the module can be imported by a parent class but not
        # instantiated, the rtslib import is deferred until the first instance
        # of the the class is created. This keeps the parent module simple
        # and more importantly generic
        if 'rtslib_fb.root' not in sys.modules.keys():

            try:
                from rtslib_fb.root import RTSRoot
            except ImportError:
                raise

        self._root = RTSRoot()

        self.clients = {}
        self.cycle = 0

        self.iops = 0
        self.read_bytes_per_sec = 0
        self.write_bytes_per_sec = 0
        self.total_bytes_per_sec = 0
Пример #4
0
 def __init__(self, *args, **kwargs):
     BaseCollector.__init__(self, *args, **kwargs)
Пример #5
0
    def __init__(self, cluster_name):
        BaseCollector.__init__(self, cluster_name)
        self.timestamp = int(time.time())

        self.osd = {}  # dict of disk objects, each disk contains osd_id
Пример #6
0
    def __init__(self, *args, **kwargs):
        BaseCollector.__init__(self, *args, **kwargs)

        self.host_name = get_hostname()
Пример #7
0
 def __init__(self, cluster_name, admin_socket, **kwargs):
     BaseCollector.__init__(self, cluster_name, admin_socket, **kwargs)
     self.host_name = get_hostname()