Skip to content

Instantly share code, notes, and snippets.

@abarnas
Created October 27, 2011 20:57
Show Gist options
  • Save abarnas/1320844 to your computer and use it in GitHub Desktop.
Save abarnas/1320844 to your computer and use it in GitHub Desktop.
Monitor
namespace MonitisTop
{
/// <summary>
/// Base monitor class
/// </summary>
public class Monitor
{
protected Agent agent;
protected string id;
protected string name;
protected int maxMetricWidth;
protected List<Metric> metrics;
protected List<MonitorDefinition> monitorsDefinitions;
public string Id { get { return id; } set { id = value; } }
public string Name { get { return name; } set { name = value; } }
public int MaxMetricWidth { get { return maxMetricWidth; } set { maxMetricWidth = value; } }
public List<Metric> Metrics { get { return metrics; } set { metrics = value; } }
public Monitor(Agent _agent)
{
agent = _agent;
maxMetricWidth = 0;
metrics = new List<Metric>();
monitorsDefinitions = new List<MonitorDefinition>();
}
// Abstract function to retrieve the metrics for a monitor
public virtual void GetMetrics(string apiKey, HttpClient client) {}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment