public CheckResult RunCheck(IManagementClient managementClient) { var overview = managementClient.GetOverview(); var alert = overview.QueueTotals.Messages >= alertQueueCount; var message = string.Format("broker '{0}' queued messages exceed alert level {1}, now {2}", managementClient.HostUrl, alertQueueCount, overview.QueueTotals.Messages); return new CheckResult(alert, message); }
public CheckResult RunCheck(IManagementClient managementClient) { var overview = managementClient.GetOverview(); var alert = overview.QueueTotals.Messages >= alertQueueCount; var message = string.Format("broker '{0}' queued messages exceed alert level {1}, now {2}", managementClient.HostUrl, alertQueueCount, overview.QueueTotals.Messages); return(new CheckResult(alert, message)); }
public CheckResult RunCheck(IManagementClient managementClient) { var overview = managementClient.GetOverview(); var alert = overview.object_totals.channels >= alertChannelCount; var message = string.Format("broker '{0}' channels have exceeded alert level {1}, now {2}", managementClient.HostUrl, alertChannelCount, overview.object_totals.channels); return new CheckResult(alert, message); }
public CheckResult RunCheck(IManagementClient managementClient) { var overview = managementClient.GetOverview(); var alert = overview.ObjectTotals.Channels >= alertChannelCount; var message = string.Format("broker '{0}' channels have exceeded alert level {1}, now {2}", managementClient.HostUrl, alertChannelCount, overview.ObjectTotals.Channels); return(new CheckResult(alert, message)); }
public CheckResult RunCheck(IManagementClient managementClient) { var overview = managementClient.GetOverview(); var alert = overview.ObjectTotals.Connections >= alertConnectionCount; var message = alert ? string.Format( "broker {0} connections have exceeded alert level {1}. Now {2}", managementClient.HostUrl, alertConnectionCount, overview.ObjectTotals.Connections) : ""; return(new CheckResult(alert, message)); }
public CheckResult RunCheck(IManagementClient managementClient) { var overview = managementClient.GetOverview(); var alert = overview.ObjectTotals.Connections >= alertConnectionCount; var message = alert ? string.Format( "broker {0} connections have exceeded alert level {1}. Now {2}", managementClient.HostUrl, alertConnectionCount, overview.ObjectTotals.Connections) : ""; return new CheckResult(alert, message); }
public void Should_get_overview() { var overview = managementClient.GetOverview(); Console.Out.WriteLine("overview.ManagementVersion = {0}", overview.ManagementVersion); foreach (var exchangeType in overview.ExchangeTypes) { Console.Out.WriteLine("exchangeType.Name = {0}", exchangeType.Name); } foreach (var listener in overview.Listeners) { Console.Out.WriteLine("listener.IpAddress = {0}", listener.IpAddress); } Console.Out.WriteLine("overview.Messages = {0}", overview.QueueTotals != null ? overview.QueueTotals.Messages : 0); foreach (var context in overview.Contexts) { Console.Out.WriteLine("context.Description = {0}", context.Description); } }
public void Should_get_overview() { var overview = managementClient.GetOverview(); Console.Out.WriteLine("overview.management_version = {0}", overview.management_version); foreach (var exchangeType in overview.exchange_types) { Console.Out.WriteLine("exchangeType.name = {0}", exchangeType.name); } foreach (var listener in overview.listeners) { Console.Out.WriteLine("listener.ip_address = {0}", listener.ip_address); } Console.Out.WriteLine("overview.queue_totals = {0}", overview.queue_totals.messages); foreach (var context in overview.contexts) { Console.Out.WriteLine("context.description = {0}", context.description); } }