az sf replica

Manage the replicas of a Service Fabric service partition.

Commands

az sf replica health Gets the health of a Service Fabric stateful service replica or stateless service instance.
az sf replica report-health Sends a health report on the Service Fabric replica.

az sf replica health

Gets the health of a Service Fabric replica. Use EventsHealthStateFilter to filter the collection of health events reported on the replica based on the health state. .

az sf replica health --partition-id
--replica-id
[--events-health-state-filter]
[--timeout]

Required Parameters

--partition-id

The identity of the partition.

--replica-id

The identifier of the replica.

Optional Parameters

--events-health-state-filter

Allows filtering the collection of HealthEvent objects returned based on health state. The possible values for this parameter include integer value of one of the following health states. Only events that match the filter are returned. All events are used to evaluate the aggregated health state. If not specified, all entries are returned. The state values are flag based enumeration, so the value could be a combination of these value obtained using bitwise 'OR' operator. For example, If the provided value is 6 then all of the events with HealthState value of OK (2) and Warning (4) are returned. - Default - Default value. Matches any HealthState. The value is zero. - None - Filter that doesn’t match any HealthState value. Used in order to return no results on a given collection of states. The value is 1. - Ok - Filter that matches input with HealthState value Ok. The value is 2. - Warning - Filter that matches input with HealthState value Warning. The value is 4. - Error - Filter that matches input with HealthState value Error. The value is 8. - All - Filter that matches input with any HealthState value. The value is 65535.

--timeout -t

The server timeout for performing the operation, specified in seconds. This is the maximum time a client can wait.

default value: 60

az sf replica report-health

Reports health state of the specified Service Fabric replica. The report must contain the information about the source of the health report and property on which it is reported. The report is sent to a Service Fabric gateway Replica, which forwards to the health store. The report may be accepted by the gateway, but rejected by the health store after extra validation. For example, the health store may reject the report because of an invalid parameter, like a stale sequence number. To see whether the report was applied in the health store, check that the report appears in the events section.

az sf replica report-health --health-property
--health-state
--partition-id
--replica-id
--source-id
[--description]
[--remove-when-expired]
[--sequence-number]
[--service-kind]
[--timeout]
[--ttl]

Required Parameters

--health-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.

--health-state

Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', 'Unknown'.

--partition-id

The identity of the partition.

--replica-id

The identifier of the replica.

--source-id

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

Optional Parameters

--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.

--remove-when-expired

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 this value to 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.

--sequence-number

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.

--service-kind

The kind of service replica (Stateless or Stateful) for which the health is being reported. Following are the possible values: Stateless, Stateful.

default value: Stateful
--timeout -t

The server timeout for performing the operation, specified in seconds. This is the maximum time a client can wait.

default value: 60
--ttl

The duration, in milliseconds, for which this health report is valid. When clients report periodically, they should send reports with higher frequency than time to live. If not specified, time to live defaults to infinite value.