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
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
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
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
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