创建可重用请求取决于用户的选择
有人知道下面的场景是如何模拟并以可重用的格式编写的吗?非常感谢您的答复。谢谢!
例如,我有这个用户定义变量名"userInput“,如果用户试图输入以下指标,它也应该生成相应的请求。注意,变量名称可能会不时地取决于用户的选择。
方案1-网络、cpu、进程
{ "os":"Linux","timeOffset":"0",“子管理器日志”:"false",“度量”:{ "com.cixsoft.agent.metric.NetworkMetric":"NetworkMetric.json","com.cixsoft.agent.metric.CpukMetric":"CpukMetric.json","com.cixsoft.agent.metric.ProcessInfoMetric":"ProcessInfoMetric.json“},"preDefinedAgents":{}
场景2- cpu,进程
{ "os":"Linux","timeOffset":"0",“子管理器日志”:"false",“度量”:{ "com.cixsoft.agent.metric.CpukMetric":"CpukMetric.json","com.cixsoft.agent.metric.ProcessInfoMetric":"ProcessInfoMetric.json“},"preDefinedAgents":{}
场景3:-network,cpu
{ "os":"Linux","timeOffset":"0",“子管理器日志”:"false",“度量”:{ "com.cixsoft.agent.metric.NetworkMetric":"NetworkMetric.json","com.cixsoft.agent.metric.CpukMetric":"CpukMetric.json“},"preDefinedAgents":{}
方案4-进程
{ "os":"Linux","timeOffset":"0",“子管理器日志”:"false",“度量”:{ "com.cixsoft.agent.metric.ProcessInfoMetric":"ProcessInfoMetric.json“},"preDefinedAgents":{} }
发布于 2022-07-29 12:55:44
https://stackoverflow.com/questions/73166743
复制相似问题