public void CreateCustomMonitor() { authentication = new Authentication(apiKey: MonitisAccountInformation.ApiKey, secretKey: MonitisAccountInformation.SekretKey); customMonitor = new CustomMonitor(); customMonitor.SetAuthenticationParams(authentication); agent = new CustomUserAgent(); agent.SetAuthenticationParams(authentication); var a1 = agent.AddAgent("TestAgent1" + DateTime.Now.Ticks.ToString(), "internal", new JObject(), 100000, OutputType.JSON); _agentID = JObject.Parse(a1.Content).Value<int>("data"); customMonitor = new CustomMonitor(); customMonitor.SetAuthenticationParams(authentication); MonitorParameter param = new MonitorParameter("param1", "param1d", "val", DataType.String, false); MonResultParameter resParam = new MonResultParameter("MonResparam1", "MonResparam1d", "MonResval", DataType.String); MonResultParameter resAddParam = new MonResultParameter("MonAddResparam1", "MonAddResparam1d", "MonAddResval", DataType.String); var s = customMonitor.AddMonitor(_agentID, TestCustomMonitorName + DateTime.Now.Ticks.ToString(), "Test", "internal", new List<MonitorParameter>() { param }, new List<MonResultParameter>() { resParam }, new List<MonResultParameter>() { resAddParam }); _customMonitorID = JObject.Parse(s.Content).Value<int>("data"); GetTestMonitor(); }
public MonitisClrMethodInfoAnalizer(Authentication authentification) { _monitor = new CustomMonitor(); _monitor.SetAuthenticationParams(authentification); _agent = new CustomUserAgent(); _agent.SetAuthenticationParams(authentification); }
private void CreateCustomUserAgent() { authentication = new Authentication(apiKey: MonitisAccountInformation.ApiKey, secretKey: MonitisAccountInformation.SekretKey); _agent = new CustomUserAgent(); _agent.SetAuthenticationParams(authentication); var a1 = _agent.AddAgent("agent" + DateTime.Now.Ticks.ToString(), "internal", new JObject(), 100000, OutputType.JSON); _agentID = JObject.Parse(a1.Content).Value<int>("data"); }
private void CreateCustomUserAgent() { authentication = new Authentication(apiKey: MonitisAccountInformation.ApiKey, secretKey: MonitisAccountInformation.SekretKey); _agent = new CustomUserAgent(); _agent.SetAuthenticationParams(authentication); var a1 = _agent.AddAgent("agent" + DateTime.Now.Ticks.ToString(), "internal", new JObject(), 100000, OutputType.JSON); _agentID = JObject.Parse(a1.Content).Value <int>("data"); }
public void CreateCustomMonitor() { authentication = new Authentication(apiKey: MonitisAccountInformation.ApiKey, secretKey: MonitisAccountInformation.SekretKey); customMonitor = new CustomMonitor(); customMonitor.SetAuthenticationParams(authentication); agent = new CustomUserAgent(); agent.SetAuthenticationParams(authentication); var a1 = agent.AddAgent("TestAgent1" + DateTime.Now.Ticks.ToString(), "internal", new JObject(), 100000, OutputType.JSON); _agentID = JObject.Parse(a1.Content).Value <int>("data"); customMonitor = new CustomMonitor(); customMonitor.SetAuthenticationParams(authentication); MonitorParameter param = new MonitorParameter("param1", "param1d", "val", DataType.String, false); MonResultParameter resParam = new MonResultParameter("MonResparam1", "MonResparam1d", "MonResval", DataType.String); MonResultParameter resAddParam = new MonResultParameter("MonAddResparam1", "MonAddResparam1d", "MonAddResval", DataType.String); var s = customMonitor.AddMonitor(_agentID, TestCustomMonitorName + DateTime.Now.Ticks.ToString(), "Test", "internal", new List <MonitorParameter>() { param }, new List <MonResultParameter>() { resParam }, new List <MonResultParameter>() { resAddParam }); _customMonitorID = JObject.Parse(s.Content).Value <int>("data"); GetTestMonitor(); }