31 namespace OpenSim.Framework.Monitoring
37 public static readonly
char[] DisallowedShortNameCharacters = {
'.' };
42 public string Category {
get;
private set; }
52 public string Container {
get;
private set; }
60 public Func<Check, bool> CheckFunc {
get;
private set; }
68 public string LastFailureMessage {
get; set; }
71 public string ShortName {
get;
private set; }
72 public string Name {
get;
private set; }
73 public string Description {
get;
private set; }
81 Func<Check, bool> checkFunc,
84 if (ChecksManager.SubCommands.Contains(category))
86 string.Format(
"Alert cannot be in category '{0}' since this is reserved for a subcommand", category));
88 foreach (
char c
in DisallowedShortNameCharacters)
90 if (shortName.IndexOf(c) != -1)
91 throw new Exception(
string.Format(
"Alert name {0} cannot contain character {1}", shortName, c));
94 ShortName = shortName;
96 Description = description;
98 Container = container;
99 CheckFunc = checkFunc;
100 Verbosity = verbosity;
105 return CheckFunc(
this);
110 return string.Format(
Check(string shortName, string name, string description, string category, string container, Func< Check, bool > checkFunc, StatVerbosity verbosity)
virtual string ToConsoleString()
StatVerbosity
Verbosity of stat.