52 lines
1.4 KiB
C#
52 lines
1.4 KiB
C#
// /**
|
|
// * File: SkyCheckState.cs
|
|
// * Author: haraldwolff
|
|
// *
|
|
// * This file and it's content is copyrighted by the Author and / or copyright holder.
|
|
// * Any use wihtout proper permission is illegal and may lead to legal actions.
|
|
// *
|
|
// *
|
|
// **/
|
|
using System;
|
|
using ln.skyscanner.entities;
|
|
using ln.types.odb;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Converters;
|
|
using System.Linq;
|
|
using ln.types.odb.attributes;
|
|
namespace ln.skyscanner.checks
|
|
{
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
public enum CheckState { OK, WARN, CRITICAL, FAIL, ERROR }
|
|
|
|
public class SkyCheckState
|
|
{
|
|
[DocumentID]
|
|
public Guid ID = Guid.NewGuid();
|
|
|
|
public readonly String CheckName;
|
|
public readonly String UniqueNodeIdentifier;
|
|
|
|
[ByReference]
|
|
public Node Node;
|
|
|
|
public DateTime LastCheckTime { get; set; }
|
|
|
|
public double WarnLower { get; set; } = Double.MinValue;
|
|
public double WarnUpper { get; set; } = Double.MaxValue;
|
|
public double CritLower { get; set; } = Double.MinValue;
|
|
public double CritUpper { get; set; } = Double.MaxValue;
|
|
|
|
public CheckState CheckState { get; set; }
|
|
|
|
protected SkyCheckState()
|
|
{
|
|
}
|
|
public SkyCheckState(SkyCheck skyCheck,Node node)
|
|
{
|
|
CheckName = skyCheck.Name;
|
|
UniqueNodeIdentifier = node.UniqueIdentity;
|
|
}
|
|
}
|
|
}
|