mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 15:29:26 +01:00
Merge pull request #670 from MihaelaStoica/CP-14047
CP-14047: Display alerts for SR physical utilisation in XenCenter
This commit is contained in:
commit
4ef1264f44
@ -127,6 +127,9 @@ namespace XenAdmin.Alerts
|
||||
case PerfmonDefinition.ALARM_TYPE_LOG_FILESYSTEM:
|
||||
AlarmType = AlarmType.LogFileSystem;
|
||||
break;
|
||||
case PerfmonDefinition.ALARM_TYPE_SR_PHYSICAL_UTILISATION:
|
||||
AlarmType = AlarmType.SrPhysicalUtilisation;
|
||||
break;
|
||||
default:
|
||||
{
|
||||
var match = PerfmonDefinition.SrRegex.Match(variableName);
|
||||
@ -208,6 +211,11 @@ namespace XenAdmin.Alerts
|
||||
return string.Format(Messages.ALERT_ALARM_LOG_FILESYSTEM_DESCRIPTION,
|
||||
Helpers.GetNameAndObject(XenObject),
|
||||
Util.PercentageString(CurrentValue));
|
||||
case AlarmType.SrPhysicalUtilisation:
|
||||
return string.Format(Messages.ALERT_ALARM_SR_PHYSICAL_UTILISATION_DESCRIPTION,
|
||||
Helpers.GetNameAndObject(XenObject),
|
||||
Util.PercentageString(CurrentValue),
|
||||
Util.PercentageString(TriggerLevel));
|
||||
default:
|
||||
return base.Description;
|
||||
}
|
||||
@ -236,6 +244,8 @@ namespace XenAdmin.Alerts
|
||||
return Messages.ALERT_ALARM_DOM0_MEMORY;
|
||||
case AlarmType.LogFileSystem:
|
||||
return Messages.ALERT_ALARM_LOG_FILESYSTEM;
|
||||
case AlarmType.SrPhysicalUtilisation:
|
||||
return Messages.ALERT_ALARM_SR_PHYSICAL_UTILISATION;
|
||||
default:
|
||||
return base.Title;
|
||||
}
|
||||
@ -310,5 +320,5 @@ namespace XenAdmin.Alerts
|
||||
}
|
||||
}
|
||||
|
||||
public enum AlarmType { None, Cpu, Net, Disk, FileSystem, Memory, Storage, Dom0MemoryDemand, LogFileSystem }
|
||||
public enum AlarmType { None, Cpu, Net, Disk, FileSystem, Memory, Storage, Dom0MemoryDemand, LogFileSystem, SrPhysicalUtilisation }
|
||||
}
|
||||
|
@ -64,6 +64,8 @@ namespace XenAdmin.Alerts
|
||||
public const string ALARM_TYPE_MEMORY_FREE = "memory_free_kib";
|
||||
public const string ALARM_TYPE_MEMORY_DOM0_USAGE = "mem_usage";
|
||||
public const string ALARM_TYPE_LOG_FILESYSTEM = "log_fs_usage";
|
||||
public const string ALARM_TYPE_SR_PHYSICAL_UTILISATION = "physical_utilisation";
|
||||
|
||||
/// <summary>
|
||||
/// This is the name that will be stored in the SR's other-config:perfmon key
|
||||
/// </summary>
|
||||
|
21
XenModel/Messages.Designer.cs
generated
21
XenModel/Messages.Designer.cs
generated
@ -1,7 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34209
|
||||
// Runtime Version:4.0.30319.18444
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@ -4371,6 +4371,25 @@ namespace XenAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to SR Disk Space Alarm.
|
||||
/// </summary>
|
||||
public static string ALERT_ALARM_SR_PHYSICAL_UTILISATION {
|
||||
get {
|
||||
return ResourceManager.GetString("ALERT_ALARM_SR_PHYSICAL_UTILISATION", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The physical utilisation on {0} is about {1} of its capacity.
|
||||
///This alarm is set to be triggered when the physical utilisation of the SR goes above {2}..
|
||||
/// </summary>
|
||||
public static string ALERT_ALARM_SR_PHYSICAL_UTILISATION_DESCRIPTION {
|
||||
get {
|
||||
return ResourceManager.GetString("ALERT_ALARM_SR_PHYSICAL_UTILISATION_DESCRIPTION", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Storage Throughput Alarm.
|
||||
/// </summary>
|
||||
|
@ -1610,6 +1610,13 @@ This alarm is set to be triggered when free memory falls below {3}.</value>
|
||||
<data name="ALERT_ALARM_NETWORK_DESCRIPTION" xml:space="preserve">
|
||||
<value>Network usage on {0} has been on average {1} for the last {2}.
|
||||
This alarm is set to be triggered when network usage is more than {3}.</value>
|
||||
</data>
|
||||
<data name="ALERT_ALARM_SR_PHYSICAL_UTILISATION" xml:space="preserve">
|
||||
<value>SR Disk Space Alarm</value>
|
||||
</data>
|
||||
<data name="ALERT_ALARM_SR_PHYSICAL_UTILISATION_DESCRIPTION" xml:space="preserve">
|
||||
<value>The physical utilisation on {0} is about {1} of its capacity.
|
||||
This alarm is set to be triggered when the physical utilisation of the SR goes above {2}.</value>
|
||||
</data>
|
||||
<data name="ALERT_ALARM_STORAGE" xml:space="preserve">
|
||||
<value>Storage Throughput Alarm</value>
|
||||
|
Loading…
Reference in New Issue
Block a user