예제 #1
0
파일: utils.py 프로젝트: akaasjager/vFense
    def save_file_system_data(agent=None, data=None):
        """Saves file system data.
        """

        if not data or not agent:
            return None

        new_data = []
        for fs in data:
            new_data.append(Monitor._totalfy(fs))

        result = _db._save_data_point(
            agent=agent, collection=Collection.FileSystem, data=new_data
        )

        return result
예제 #2
0
파일: utils.py 프로젝트: vFense/vFense
    def save_file_system_data(agent=None, data=None):
        """Saves file system data.
        """

        if not data or not agent:
            return None

        new_data = []
        for fs in data:
            new_data.append(Monitor._totalfy(fs))

        result = _db._save_data_point(agent=agent,
                                      collection=Collection.FileSystem,
                                      data=new_data)

        return result
예제 #3
0
    def save_cpu_data(agent=None, data=None):
        """Saves cpu data.

        Args:

            agent: The agent id the data belongs to.

            data: Basic data type (str, int, list, dict, etc) to save as is.
        """

        if not data or not agent:

            return None

        result = _db._save_data_point(agent=agent, collection=Collection.Cpu,
                                      data=data)

        return result
예제 #4
0
파일: utils.py 프로젝트: vFense/vFense
    def save_cpu_data(agent=None, data=None):
        """Saves cpu data.

        Args:

            agent: The agent id the data belongs to.

            data: Basic data type (str, int, list, dict, etc) to save as is.
        """

        if not data or not agent:
            return None

        result = _db._save_data_point(agent=agent,
                                      collection=Collection.Cpu,
                                      data=data)

        return result
예제 #5
0
파일: utils.py 프로젝트: akaasjager/vFense
    def save_memory_data(agent=None, data=None):
        """Saves memory data.

        Args:

            agent: The agent id the data belongs to.

            data: Basic data type (str, int, list, dict, etc) to save as is.
        """

        if not data or not agent:
            return None

        data = Monitor._totalfy(data)
        result = _db._save_data_point(
            agent=agent, collection=Collection.Memory, data=data
        )

        return result
예제 #6
0
파일: utils.py 프로젝트: vFense/vFense
    def save_memory_data(agent=None, data=None):
        """Saves memory data.

        Args:

            agent: The agent id the data belongs to.

            data: Basic data type (str, int, list, dict, etc) to save as is.
        """

        if not data or not agent:
            return None

        data = Monitor._totalfy(data)
        result = _db._save_data_point(agent=agent,
                                      collection=Collection.Memory,
                                      data=data)

        return result