61 lines
1.8 KiB
C#
61 lines
1.8 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Watcher.Models;
|
|
|
|
public class Server
|
|
{
|
|
// System Infos
|
|
[Key]
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int Id { get; set; }
|
|
|
|
[Required]
|
|
public required string Name { get; set; }
|
|
|
|
public required string IPAddress { get; set; }
|
|
|
|
public required string Type { get; set; }
|
|
|
|
public string? Description { get; set; } = String.Empty;
|
|
|
|
|
|
// Hardware Infos
|
|
public string? CpuType { get; set; } = string.Empty;
|
|
public int CpuCores { get; set; } = 0;
|
|
public string? GpuType { get; set; } = string.Empty;
|
|
public double RamSize { get; set; } = 0;
|
|
public string? DiskSpace { get; set; } = string.Empty;
|
|
|
|
|
|
// Hardware Measurment Warning/Crit Values
|
|
public double CPU_Load_Warning { get; set; } = 75.0;
|
|
public double CPU_Load_Critical { get; set; } = 90.0;
|
|
public double CPU_Temp_Warning { get; set; } = 80.0;
|
|
public double CPU_Temp_Critical { get; set; } = 90.0;
|
|
|
|
public double RAM_Load_Warning { get; set; } = 85.0;
|
|
public double RAM_Load_Critical { get; set; } = 95.0;
|
|
|
|
public double GPU_Load_Warning { get; set; } = 75.0;
|
|
public double GPU_Load_Critical { get; set; } = 90.0;
|
|
public double GPU_Temp_Warning { get; set; } = 70.0;
|
|
public double GPU_Temp_Critical { get; set; } = 80.0;
|
|
|
|
public double Disk_Usage_Warning { get; set; } = 75.0;
|
|
public double Disk_Usage_Critical { get; set; } = 90.0;
|
|
public double DISK_Temp_Warning { get; set; } = 34.0;
|
|
public double DISK_Temp_Critical { get; set; } = 36.0;
|
|
|
|
|
|
// Database
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
public Boolean IsOnline { get; set; } = false;
|
|
|
|
public DateTime LastSeen { get; set; }
|
|
|
|
public Boolean IsVerified { get; set; } = false;
|
|
|
|
}
|