def run(self, hostname): server_info = plugins.get_server_info(hostname) server_json = Json.dumps(server_info.data) print(server_json)
def run(self, hostname): #获取当前主机名的资产信息 server_info = plugins.get_server_info(hostname) server_json = Json.dumps(server_info.data) self.post_asset(server_json, self.callback)
def run(self): server_info = plugins.get_server_info() server_json = Json.dumps(server_info.data) self.post_asset(server_json, self.callback)
def run(self, hostname): # ssh salt 方式会链接hostname来进行执行命令 server_info = plugins.get_server_info(hostname) server_json = Json.dumps(server_info.data) self.post_asset(server_json, self.callback)
def run(self, hostname): server_info = plugins.get_server_info(hostname) #主机信息(基本信息、指标信息) server_json = Json.dumps(server_info.data) self.post_asset(server_json, self.callback) #以post方式提交数据到服务端