コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the HealthEvent class.
 /// </summary>
 /// <param name="sourceId">The source name which identifies the client/watchdog/system component which generated the
 /// health information.
 /// </param>
 /// <param name="property">The property of the health information. An entity can have health reports for different
 /// properties.
 /// The property is a string and not a fixed enumeration to allow the reporter flexibility to categorize the state
 /// condition that triggers the report.
 /// For example, a reporter with SourceId "LocalWatchdog" can monitor the state of the available disk on a node,
 /// so it can report "AvailableDisk" property on that node.
 /// The same reporter can monitor the node connectivity, so it can report a property "Connectivity" on the same node.
 /// In the health store, these reports are treated as separate health events for the specified node.
 ///
 /// Together with the SourceId, the property uniquely identifies the health information.
 /// </param>
 /// <param name="healthState">The health state of a Service Fabric entity such as Cluster, Node, Application, Service,
 /// Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="timeToLiveInMilliSeconds">The duration for which this health report is valid. This field uses ISO8601
 /// format for specifying the duration.
 /// When clients report periodically, they should send reports with higher frequency than time to live.
 /// If clients report on transition, they can set the time to live to infinite.
 /// When time to live expires, the health event that contains the health information
 /// is either removed from health store, if RemoveWhenExpired is true, or evaluated at error, if RemoveWhenExpired
 /// false.
 ///
 /// If not specified, time to live defaults to infinite value.
 /// </param>
 /// <param name="description">The description of the health information. It represents free text used to add human
 /// readable information about the report.
 /// The maximum string length for the description is 4096 characters.
 /// If the provided string is longer, it will be automatically truncated.
 /// When truncated, the last characters of the description contain a marker "[Truncated]", and total string size is
 /// 4096 characters.
 /// The presence of the marker indicates to users that truncation occurred.
 /// Note that when truncated, the description has less than 4096 characters from the original string.
 /// </param>
 /// <param name="sequenceNumber">The sequence number for this health report as a numeric string.
 /// The report sequence number is used by the health store to detect stale reports.
 /// If not specified, a sequence number is auto-generated by the health client when a report is added.
 /// </param>
 /// <param name="removeWhenExpired">Value that indicates whether the report is removed from health store when it
 /// expires.
 /// If set to true, the report is removed from the health store after it expires.
 /// If set to false, the report is treated as an error when expired. The value of this property is false by default.
 /// When clients report periodically, they should set RemoveWhenExpired false (default).
 /// This way, is the reporter has issues (eg. deadlock) and can't report, the entity is evaluated at error when the
 /// health report expires.
 /// This flags the entity as being in Error health state.
 /// </param>
 /// <param name="isExpired">Returns true if the health event is expired, otherwise false.</param>
 /// <param name="sourceUtcTimestamp">The date and time when the health report was sent by the source.</param>
 /// <param name="lastModifiedUtcTimestamp">The date and time when the health report was last modified by the health
 /// store.</param>
 /// <param name="lastOkTransitionAt">If the current health state is 'Ok', this property returns the time at which the
 /// health report was first reported with 'Ok'.
 /// For periodic reporting, many reports with the same state may have been generated.
 /// This property returns the date and time when the first 'Ok' health report was received.
 ///
 /// If the current health state is 'Error' or 'Warning', returns the date and time at which the health state was last
 /// in 'Ok', before transitioning to a different state.
 ///
 /// If the health state was never 'Ok', the value will be zero date-time.
 /// </param>
 /// <param name="lastWarningTransitionAt">If the current health state is 'Warning', this property returns the time at
 /// which the health report was first reported with 'Warning'. For periodic reporting, many reports with the same state
 /// may have been generated however, this property returns only the date and time at the first 'Warning' health report
 /// was received.
 ///
 /// If the current health state is 'Ok' or 'Error', returns the date and time at which the health state was last in
 /// 'Warning', before transitioning to a different state.
 ///
 /// If the health state was never 'Warning', the value will be zero date-time.
 /// </param>
 /// <param name="lastErrorTransitionAt">If the current health state is 'Error', this property returns the time at which
 /// the health report was first reported with 'Error'. For periodic reporting, many reports with the same state may
 /// have been generated however, this property returns only the date and time at the first 'Error' health report was
 /// received.
 ///
 /// If the current health state is 'Ok' or 'Warning', returns the date and time at which the health state was last in
 /// 'Error', before transitioning to a different state.
 ///
 /// If the health state was never 'Error', the value will be zero date-time.
 /// </param>
 public HealthEvent(
     string sourceId,
     string property,
     HealthState?healthState,
     TimeSpan?timeToLiveInMilliSeconds = default(TimeSpan?),
     string description                = default(string),
     string sequenceNumber             = default(string),
     bool?removeWhenExpired            = default(bool?),
     bool?isExpired                    = default(bool?),
     DateTime?sourceUtcTimestamp       = default(DateTime?),
     DateTime?lastModifiedUtcTimestamp = default(DateTime?),
     DateTime?lastOkTransitionAt       = default(DateTime?),
     DateTime?lastWarningTransitionAt  = default(DateTime?),
     DateTime?lastErrorTransitionAt    = default(DateTime?))
     : base(
         sourceId,
         property,
         healthState,
         timeToLiveInMilliSeconds,
         description,
         sequenceNumber,
         removeWhenExpired)
 {
     this.IsExpired                = isExpired;
     this.SourceUtcTimestamp       = sourceUtcTimestamp;
     this.LastModifiedUtcTimestamp = lastModifiedUtcTimestamp;
     this.LastOkTransitionAt       = lastOkTransitionAt;
     this.LastWarningTransitionAt  = lastWarningTransitionAt;
     this.LastErrorTransitionAt    = lastErrorTransitionAt;
 }
コード例 #2
0
        /// <summary>
        /// Serializes the enum value.
        /// </summary>
        /// <param name="writer">The <see cref="T: Newtonsoft.Json.JsonWriter" /> to write to.</param>
        /// <param name="value">The object to serialize to JSON.</param>
        public static void Serialize(JsonWriter writer, HealthState?value)
        {
            switch (value)
            {
            case HealthState.Invalid:
                writer.WriteStringValue("Invalid");
                break;

            case HealthState.Ok:
                writer.WriteStringValue("Ok");
                break;

            case HealthState.Warning:
                writer.WriteStringValue("Warning");
                break;

            case HealthState.Error:
                writer.WriteStringValue("Error");
                break;

            case HealthState.Unknown:
                writer.WriteStringValue("Unknown");
                break;

            default:
                throw new ArgumentException($"Invalid value {value.ToString()} for enum type HealthState");
            }
        }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the ReplicaHealthStateChunk class.
 /// </summary>
 /// <param name="healthState">The health state of a Service Fabric entity such as Cluster, Node, Application, Service,
 /// Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="replicaOrInstanceId">Id of a stateful service replica or a stateless service instance. This ID is used
 /// in the queries that apply to both stateful and stateless services. It is used by Service Fabric to uniquely
 /// identify a replica of a partition of a stateful service or an instance of a stateless service partition. It is
 /// unique within a partition and does not change for the lifetime of the replica or the instance. If a stateful
 /// replica gets dropped and another replica gets created on the same node for the same partition, it will get a
 /// different value for the ID. If a stateless instance is failed over on the same or different node it will get a
 /// different value for the ID.</param>
 public ReplicaHealthStateChunk(
     HealthState?healthState    = default(HealthState?),
     string replicaOrInstanceId = default(string))
     : base(
         healthState)
 {
     this.ReplicaOrInstanceId = replicaOrInstanceId;
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the ApplicationHealthState class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="name">The name of the application, including the 'fabric:' URI scheme.</param>
 public ApplicationHealthState(
     HealthState?aggregatedHealthState = default(HealthState?),
     ApplicationName name = default(ApplicationName))
     : base(
         aggregatedHealthState)
 {
     this.Name = name;
 }
 /// <summary>
 /// Initializes a new instance of the NodeHealthStateChunk class.
 /// </summary>
 /// <param name="healthState">The health state of a Service Fabric entity such as Cluster, Node, Application, Service,
 /// Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="nodeName">The name of a Service Fabric node.</param>
 public NodeHealthStateChunk(
     HealthState?healthState = default(HealthState?),
     NodeName nodeName       = default(NodeName))
     : base(
         healthState)
 {
     this.NodeName = nodeName;
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the PartitionHealthState class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="partitionId">Id of the partition whose health state is described by this object.</param>
 public PartitionHealthState(
     HealthState?aggregatedHealthState = default(HealthState?),
     PartitionId partitionId           = default(PartitionId))
     : base(
         aggregatedHealthState)
 {
     this.PartitionId = partitionId;
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the ServiceHealthState class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="serviceName">Name of the service whose health state is represented by this object.</param>
 public ServiceHealthState(
     HealthState?aggregatedHealthState = default(HealthState?),
     ServiceName serviceName           = default(ServiceName))
     : base(
         aggregatedHealthState)
 {
     this.ServiceName = serviceName;
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the ClusterHealthChunk class.
 /// </summary>
 /// <param name="healthState">The HealthState representing the aggregated health state of the cluster computed by
 /// Health Manager.
 /// The health evaluation of the entity reflects all events reported on the entity and its children (if any).
 /// The aggregation is done by applying the desired cluster health policy and the application health policies.
 /// . Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'
 ///
 /// The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc.
 /// </param>
 /// <param name="nodeHealthStateChunks">The list of node health state chunks in the cluster that respect the filters in
 /// the cluster health chunk query description.
 /// </param>
 /// <param name="applicationHealthStateChunks">The list of application health state chunks in the cluster that respect
 /// the filters in the cluster health chunk query description.
 /// </param>
 public ClusterHealthChunk(
     HealthState?healthState = default(HealthState?),
     NodeHealthStateChunkList nodeHealthStateChunks = default(NodeHealthStateChunkList),
     ApplicationHealthStateChunkList applicationHealthStateChunks = default(ApplicationHealthStateChunkList))
 {
     this.HealthState                  = healthState;
     this.NodeHealthStateChunks        = nodeHealthStateChunks;
     this.ApplicationHealthStateChunks = applicationHealthStateChunks;
 }
コード例 #9
0
 /// <summary>
 /// Initializes a new instance of the DeployedServicePackageHealthStateChunk class.
 /// </summary>
 /// <param name="healthState">The health state of a Service Fabric entity such as Cluster, Node, Application, Service,
 /// Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="serviceManifestName">The name of the service manifest.</param>
 /// <param name="servicePackageActivationId">The ActivationId of a deployed service package. If
 /// ServicePackageActivationMode specified at the time of creating the service
 /// is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), then value of
 /// ServicePackageActivationId
 /// is always an empty string.
 /// </param>
 public DeployedServicePackageHealthStateChunk(
     HealthState?healthState           = default(HealthState?),
     string serviceManifestName        = default(string),
     string servicePackageActivationId = default(string))
     : base(
         healthState)
 {
     this.ServiceManifestName        = serviceManifestName;
     this.ServicePackageActivationId = servicePackageActivationId;
 }
コード例 #10
0
 /// <summary>
 /// Initializes a new instance of the ServiceHealthStateChunk class.
 /// </summary>
 /// <param name="healthState">The health state of a Service Fabric entity such as Cluster, Node, Application, Service,
 /// Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="serviceName">The name of the service whose health state chunk is provided in this object.</param>
 /// <param name="partitionHealthStateChunks">The list of partition health state chunks belonging to the service that
 /// respect the filters in the cluster health chunk query description.
 /// </param>
 public ServiceHealthStateChunk(
     HealthState?healthState = default(HealthState?),
     ServiceName serviceName = default(ServiceName),
     PartitionHealthStateChunkList partitionHealthStateChunks = default(PartitionHealthStateChunkList))
     : base(
         healthState)
 {
     this.ServiceName = serviceName;
     this.PartitionHealthStateChunks = partitionHealthStateChunks;
 }
コード例 #11
0
 /// <summary>
 /// Initializes a new instance of the DeployedApplicationHealthStateChunk class.
 /// </summary>
 /// <param name="healthState">The health state of a Service Fabric entity such as Cluster, Node, Application, Service,
 /// Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="nodeName">The name of node where the application is deployed.</param>
 /// <param name="deployedServicePackageHealthStateChunks">The list of deployed service package health state chunks
 /// belonging to the deployed application that respect the filters in the cluster health chunk query description.
 /// </param>
 public DeployedApplicationHealthStateChunk(
     HealthState?healthState = default(HealthState?),
     string nodeName         = default(string),
     DeployedServicePackageHealthStateChunkList deployedServicePackageHealthStateChunks = default(DeployedServicePackageHealthStateChunkList))
     : base(
         healthState)
 {
     this.NodeName = nodeName;
     this.DeployedServicePackageHealthStateChunks = deployedServicePackageHealthStateChunks;
 }
コード例 #12
0
 /// <summary>
 /// Initializes a new instance of the DeployedApplicationHealthState class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="nodeName">Name of the node on which the service package is deployed.</param>
 /// <param name="applicationName">The name of the application, including the 'fabric:' URI scheme.</param>
 public DeployedApplicationHealthState(
     HealthState?aggregatedHealthState = default(HealthState?),
     NodeName nodeName = default(NodeName),
     ApplicationName applicationName = default(ApplicationName))
     : base(
         aggregatedHealthState)
 {
     this.NodeName        = nodeName;
     this.ApplicationName = applicationName;
 }
コード例 #13
0
 /// <summary>
 /// Initializes a new instance of the PartitionHealthStateChunk class.
 /// </summary>
 /// <param name="healthState">The health state of a Service Fabric entity such as Cluster, Node, Application, Service,
 /// Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="partitionId">The Id of the partition.</param>
 /// <param name="replicaHealthStateChunks">The list of replica health state chunks belonging to the partition that
 /// respect the filters in the cluster health chunk query description.
 /// </param>
 public PartitionHealthStateChunk(
     HealthState?healthState = default(HealthState?),
     PartitionId partitionId = default(PartitionId),
     ReplicaHealthStateChunkList replicaHealthStateChunks = default(ReplicaHealthStateChunkList))
     : base(
         healthState)
 {
     this.PartitionId = partitionId;
     this.ReplicaHealthStateChunks = replicaHealthStateChunks;
 }
コード例 #14
0
 /// <summary>
 /// Initializes a new instance of the HealthEvaluation class.
 /// </summary>
 /// <param name="kind">The health manager in the cluster performs health evaluations in determining the aggregated
 /// health state of an entity. This enumeration provides information on the kind of evaluation that was performed.
 /// Following are the possible values.</param>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="description">Description of the health evaluation, which represents a summary of the evaluation
 /// process.</param>
 protected HealthEvaluation(
     HealthEvaluationKind?kind,
     HealthState?aggregatedHealthState = default(HealthState?),
     string description = default(string))
 {
     kind.ThrowIfNull(nameof(kind));
     this.Kind = kind;
     this.AggregatedHealthState = aggregatedHealthState;
     this.Description           = description;
 }
コード例 #15
0
 /// <summary>
 /// Initializes a new instance of the NodeHealthState class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="name">The name of a Service Fabric node.</param>
 /// <param name="id">An internal ID used by Service Fabric to uniquely identify a node. Node Id is deterministically
 /// generated from node name.</param>
 public NodeHealthState(
     HealthState?aggregatedHealthState = default(HealthState?),
     NodeName name = default(NodeName),
     NodeId id     = default(NodeId))
     : base(
         aggregatedHealthState)
 {
     this.Name = name;
     this.Id   = id;
 }
 /// <summary>
 /// Initializes a new instance of the StatefulServiceReplicaHealthState class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="partitionId">The ID of the partition to which this replica belongs.</param>
 /// <param name="replicaId">Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify
 /// a replica of a partition. It is unique within a partition and does not change for the lifetime of the replica. If a
 /// replica gets dropped and another replica gets created on the same node for the same partition, it will get a
 /// different value for the id. Sometimes the id of a stateless service instance is also referred as a replica
 /// id.</param>
 public StatefulServiceReplicaHealthState(
     HealthState?aggregatedHealthState = default(HealthState?),
     PartitionId partitionId           = default(PartitionId),
     ReplicaId replicaId = default(ReplicaId))
     : base(
         aggregatedHealthState,
         partitionId)
 {
     this.ReplicaId = replicaId;
 }
コード例 #17
0
 /// <summary>
 /// Initializes a new instance of the ReplicaHealthState class.
 /// </summary>
 /// <param name="serviceKind">The kind of service (Stateless or Stateful).</param>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="partitionId">The ID of the partition to which this replica belongs.</param>
 public ReplicaHealthState(
     ServiceKind?serviceKind,
     HealthState?aggregatedHealthState = default(HealthState?),
     PartitionId partitionId           = default(PartitionId))
     : base(
         aggregatedHealthState)
 {
     serviceKind.ThrowIfNull(nameof(serviceKind));
     this.ServiceKind = serviceKind;
     this.PartitionId = partitionId;
 }
コード例 #18
0
 /// <summary>
 /// Initializes a new instance of the StatelessServiceInstanceHealthState class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="partitionId">The ID of the partition to which this replica belongs.</param>
 /// <param name="replicaId">Id of the stateless service instance on the wire this field is called ReplicaId.</param>
 public StatelessServiceInstanceHealthState(
     HealthState?aggregatedHealthState = default(HealthState?),
     PartitionId partitionId           = default(PartitionId),
     ReplicaId replicaId = default(ReplicaId))
     : base(
         Common.ServiceKind.Stateless,
         aggregatedHealthState,
         partitionId)
 {
     this.ReplicaId = replicaId;
 }
コード例 #19
0
 /// <summary>
 /// Initializes a new instance of the SystemApplicationHealthEvaluation class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="description">Description of the health evaluation, which represents a summary of the evaluation
 /// process.</param>
 /// <param name="unhealthyEvaluations">List of unhealthy evaluations that led to the current aggregated health state of
 /// the system application. The types of the unhealthy evaluations can be DeployedApplicationsHealthEvaluation,
 /// ServicesHealthEvaluation or EventHealthEvaluation.</param>
 public SystemApplicationHealthEvaluation(
     HealthState?aggregatedHealthState = default(HealthState?),
     string description = default(string),
     IEnumerable <HealthEvaluationWrapper> unhealthyEvaluations = default(IEnumerable <HealthEvaluationWrapper>))
     : base(
         Common.HealthEvaluationKind.SystemApplication,
         aggregatedHealthState,
         description)
 {
     this.UnhealthyEvaluations = unhealthyEvaluations;
 }
コード例 #20
0
 /// <summary>
 /// Initializes a new instance of the EntityHealth class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="healthEvents">The list of health events reported on the entity.</param>
 /// <param name="unhealthyEvaluations">The unhealthy evaluations that show why the current aggregated health state was
 /// returned by Health Manager.</param>
 /// <param name="healthStatistics">Shows the health statistics for all children types of the queried entity.</param>
 public EntityHealth(
     HealthState?aggregatedHealthState      = default(HealthState?),
     IEnumerable <HealthEvent> healthEvents = default(IEnumerable <HealthEvent>),
     IEnumerable <HealthEvaluationWrapper> unhealthyEvaluations = default(IEnumerable <HealthEvaluationWrapper>),
     HealthStatistics healthStatistics = default(HealthStatistics))
 {
     this.AggregatedHealthState = aggregatedHealthState;
     this.HealthEvents          = healthEvents;
     this.UnhealthyEvaluations  = unhealthyEvaluations;
     this.HealthStatistics      = healthStatistics;
 }
コード例 #21
0
 /// <summary>
 /// Initializes a new instance of the ServicePartitionInfo class.
 /// </summary>
 /// <param name="serviceKind">The kind of service (Stateless or Stateful).</param>
 /// <param name="healthState">The health state of a Service Fabric entity such as Cluster, Node, Application, Service,
 /// Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="partitionStatus">The status of the service fabric service partition. Possible values include:
 /// 'Invalid', 'Ready', 'NotReady', 'InQuorumLoss', 'Reconfiguring', 'Deleting'</param>
 /// <param name="partitionInformation">Information about the partition identity, partitioning scheme and keys supported
 /// by it.</param>
 protected ServicePartitionInfo(
     ServiceKind?serviceKind,
     HealthState?healthState = default(HealthState?),
     ServicePartitionStatus?partitionStatus    = default(ServicePartitionStatus?),
     PartitionInformation partitionInformation = default(PartitionInformation))
 {
     serviceKind.ThrowIfNull(nameof(serviceKind));
     this.ServiceKind          = serviceKind;
     this.HealthState          = healthState;
     this.PartitionStatus      = partitionStatus;
     this.PartitionInformation = partitionInformation;
 }
コード例 #22
0
 /// <summary>
 /// Initializes a new instance of the NodeHealthEvaluation class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="description">Description of the health evaluation, which represents a summary of the evaluation
 /// process.</param>
 /// <param name="nodeName">The name of a Service Fabric node.</param>
 /// <param name="unhealthyEvaluations">List of unhealthy evaluations that led to the current aggregated health state of
 /// the node. The types of the unhealthy evaluations can be EventHealthEvaluation.</param>
 public NodeHealthEvaluation(
     HealthState?aggregatedHealthState = default(HealthState?),
     string description = default(string),
     NodeName nodeName  = default(NodeName),
     IEnumerable <HealthEvaluationWrapper> unhealthyEvaluations = default(IEnumerable <HealthEvaluationWrapper>))
     : base(
         Common.HealthEvaluationKind.Node,
         aggregatedHealthState,
         description)
 {
     this.NodeName             = nodeName;
     this.UnhealthyEvaluations = unhealthyEvaluations;
 }
コード例 #23
0
 /// <summary>
 /// Initializes a new instance of the ServiceHealthEvaluation class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="description">Description of the health evaluation, which represents a summary of the evaluation
 /// process.</param>
 /// <param name="serviceName">Name of the service whose health evaluation is described by this object.</param>
 /// <param name="unhealthyEvaluations">List of unhealthy evaluations that led to the current aggregated health state of
 /// the service. The types of the unhealthy evaluations can be PartitionsHealthEvaluation or
 /// EventHealthEvaluation.</param>
 public ServiceHealthEvaluation(
     HealthState?aggregatedHealthState = default(HealthState?),
     string description      = default(string),
     ServiceName serviceName = default(ServiceName),
     IEnumerable <HealthEvaluationWrapper> unhealthyEvaluations = default(IEnumerable <HealthEvaluationWrapper>))
     : base(
         Common.HealthEvaluationKind.Service,
         aggregatedHealthState,
         description)
 {
     this.ServiceName          = serviceName;
     this.UnhealthyEvaluations = unhealthyEvaluations;
 }
コード例 #24
0
 /// <summary>
 /// Initializes a new instance of the EventHealthEvaluation class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="description">Description of the health evaluation, which represents a summary of the evaluation
 /// process.</param>
 /// <param name="considerWarningAsError">Indicates whether warnings are treated with the same severity as errors. The
 /// field is specified in the health policy used to evaluate the entity.</param>
 /// <param name="unhealthyEvent">Represents health information reported on a health entity, such as cluster,
 /// application or node, with additional metadata added by the Health Manager.
 /// </param>
 public EventHealthEvaluation(
     HealthState?aggregatedHealthState = default(HealthState?),
     string description          = default(string),
     bool?considerWarningAsError = default(bool?),
     HealthEvent unhealthyEvent  = default(HealthEvent))
     : base(
         Common.HealthEvaluationKind.Event,
         aggregatedHealthState,
         description)
 {
     this.ConsiderWarningAsError = considerWarningAsError;
     this.UnhealthyEvent         = unhealthyEvent;
 }
コード例 #25
0
 /// <summary>
 /// Initializes a new instance of the DeployedServicePackagesHealthEvaluation class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="description">Description of the health evaluation, which represents a summary of the evaluation
 /// process.</param>
 /// <param name="totalCount">Total number of deployed service packages of the deployed application in the health
 /// store.</param>
 /// <param name="unhealthyEvaluations">List of unhealthy evaluations that led to the aggregated health state. Includes
 /// all the unhealthy DeployedServicePackageHealthEvaluation that impacted the aggregated health.</param>
 public DeployedServicePackagesHealthEvaluation(
     HealthState?aggregatedHealthState = default(HealthState?),
     string description = default(string),
     long?totalCount    = default(long?),
     IEnumerable <HealthEvaluationWrapper> unhealthyEvaluations = default(IEnumerable <HealthEvaluationWrapper>))
     : base(
         Common.HealthEvaluationKind.DeployedServicePackages,
         aggregatedHealthState,
         description)
 {
     this.TotalCount           = totalCount;
     this.UnhealthyEvaluations = unhealthyEvaluations;
 }
コード例 #26
0
 /// <summary>
 /// Initializes a new instance of the StatelessServicePartitionInfo class.
 /// </summary>
 /// <param name="healthState">The health state of a Service Fabric entity such as Cluster, Node, Application, Service,
 /// Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="partitionStatus">The status of the service fabric service partition. Possible values include:
 /// 'Invalid', 'Ready', 'NotReady', 'InQuorumLoss', 'Reconfiguring', 'Deleting'</param>
 /// <param name="partitionInformation">Information about the partition identity, partitioning scheme and keys supported
 /// by it.</param>
 /// <param name="instanceCount">Number of instances of this partition.</param>
 public StatelessServicePartitionInfo(
     HealthState?healthState = default(HealthState?),
     ServicePartitionStatus?partitionStatus    = default(ServicePartitionStatus?),
     PartitionInformation partitionInformation = default(PartitionInformation),
     long?instanceCount = default(long?))
     : base(
         Common.ServiceKind.Stateless,
         healthState,
         partitionStatus,
         partitionInformation)
 {
     this.InstanceCount = instanceCount;
 }
 /// <summary>
 /// Initializes a new instance of the PartitionHealthEvaluation class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="description">Description of the health evaluation, which represents a summary of the evaluation
 /// process.</param>
 /// <param name="partitionId">Id of the partition whose health evaluation is described by this object.</param>
 /// <param name="unhealthyEvaluations">List of unhealthy evaluations that led to the current aggregated health state of
 /// the partition. The types of the unhealthy evaluations can be ReplicasHealthEvaluation or
 /// EventHealthEvaluation.</param>
 public PartitionHealthEvaluation(
     HealthState?aggregatedHealthState = default(HealthState?),
     string description      = default(string),
     PartitionId partitionId = default(PartitionId),
     IEnumerable <HealthEvaluationWrapper> unhealthyEvaluations = default(IEnumerable <HealthEvaluationWrapper>))
     : base(
         Common.HealthEvaluationKind.Partition,
         aggregatedHealthState,
         description)
 {
     this.PartitionId          = partitionId;
     this.UnhealthyEvaluations = unhealthyEvaluations;
 }
コード例 #28
0
 /// <summary>
 /// Initializes a new instance of the ApplicationHealthStateChunk class.
 /// </summary>
 /// <param name="healthState">The health state of a Service Fabric entity such as Cluster, Node, Application, Service,
 /// Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="applicationName">The name of the application, including the 'fabric:' URI scheme.</param>
 /// <param name="applicationTypeName">The application type name as defined in the application manifest.</param>
 /// <param name="serviceHealthStateChunks">The list of service health state chunks that respect the input filters in
 /// the chunk query. Returned by get cluster health state chunks query.
 /// </param>
 /// <param name="deployedApplicationHealthStateChunks">The list of deployed application health state chunks that
 /// respect the input filters in the chunk query. Returned by get cluster health state chunks query.
 /// </param>
 public ApplicationHealthStateChunk(
     HealthState?healthState         = default(HealthState?),
     ApplicationName applicationName = default(ApplicationName),
     string applicationTypeName      = default(string),
     ServiceHealthStateChunkList serviceHealthStateChunks = default(ServiceHealthStateChunkList),
     DeployedApplicationHealthStateChunkList deployedApplicationHealthStateChunks = default(DeployedApplicationHealthStateChunkList))
     : base(
         healthState)
 {
     this.ApplicationName                      = applicationName;
     this.ApplicationTypeName                  = applicationTypeName;
     this.ServiceHealthStateChunks             = serviceHealthStateChunks;
     this.DeployedApplicationHealthStateChunks = deployedApplicationHealthStateChunks;
 }
コード例 #29
0
 /// <summary>
 /// Initializes a new instance of the NodeHealth class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="healthEvents">The list of health events reported on the entity.</param>
 /// <param name="unhealthyEvaluations">The unhealthy evaluations that show why the current aggregated health state was
 /// returned by Health Manager.</param>
 /// <param name="healthStatistics">Shows the health statistics for all children types of the queried entity.</param>
 /// <param name="name">Name of the node whose health information is described by this object.</param>
 public NodeHealth(
     HealthState?aggregatedHealthState      = default(HealthState?),
     IEnumerable <HealthEvent> healthEvents = default(IEnumerable <HealthEvent>),
     IEnumerable <HealthEvaluationWrapper> unhealthyEvaluations = default(IEnumerable <HealthEvaluationWrapper>),
     HealthStatistics healthStatistics = default(HealthStatistics),
     NodeName name = default(NodeName))
     : base(
         aggregatedHealthState,
         healthEvents,
         unhealthyEvaluations,
         healthStatistics)
 {
     this.Name = name;
 }
 /// <summary>
 /// Initializes a new instance of the DeployedServicePackageHealthState class.
 /// </summary>
 /// <param name="aggregatedHealthState">The health state of a Service Fabric entity such as Cluster, Node, Application,
 /// Service, Partition, Replica etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'</param>
 /// <param name="nodeName">Name of the node on which the service package is deployed.</param>
 /// <param name="applicationName">The name of the application, including the 'fabric:' URI scheme.</param>
 /// <param name="serviceManifestName">Name of the manifest describing the service package.</param>
 /// <param name="servicePackageActivationId">The ActivationId of a deployed service package. If
 /// ServicePackageActivationMode specified at the time of creating the service
 /// is 'SharedProcess' (or if it is not specified, in which case it defaults to 'SharedProcess'), then value of
 /// ServicePackageActivationId
 /// is always an empty string.
 /// </param>
 public DeployedServicePackageHealthState(
     HealthState?aggregatedHealthState = default(HealthState?),
     NodeName nodeName = default(NodeName),
     ApplicationName applicationName   = default(ApplicationName),
     string serviceManifestName        = default(string),
     string servicePackageActivationId = default(string))
     : base(
         aggregatedHealthState)
 {
     this.NodeName                   = nodeName;
     this.ApplicationName            = applicationName;
     this.ServiceManifestName        = serviceManifestName;
     this.ServicePackageActivationId = servicePackageActivationId;
 }