HealthInformation

Represents common health report information. It is included in all health reports sent to health store and in all health events returned by health queries.

Properties

Name Type Required
SourceId string Yes
Property string Yes
HealthState string (enum) Yes
TimeToLiveInMilliSeconds string (duration) No
Description string No
SequenceNumber string No
RemoveWhenExpired boolean No

SourceId

Type: string
Required: Yes

The source name that identifies the client/watchdog/system component that generated the health information.


Property

Type: string
Required: Yes

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.


HealthState

Type: string (enum)
Required: Yes

The health state of a Service Fabric entity such as Cluster, Node, Application, Service, Partition, Replica etc.

Possible values are:

  • Invalid - Indicates an invalid health state. All Service Fabric enumerations have the invalid type. The value is zero.
  • Ok - Indicates the health state is okay. The value is 1.
  • Warning - Indicates the health state is at a warning level. The value is 2.
  • Error - Indicates the health state is at an error level. Error health state should be investigated, as they can impact the correct functionality of the cluster. The value is 3.
  • Unknown - Indicates an unknown health status. The value is 65535.

TimeToLiveInMilliSeconds

Type: string (duration)
Required: No

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.


Description

Type: string
Required: No

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.


SequenceNumber

Type: string
Required: No

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.


RemoveWhenExpired

Type: boolean
Required: No

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.