The Get-ServiceFabricApplicationHealth cmdlet gets the health state of a Service Fabric application.
Service Fabric reports the following health states:
OK.
The entity meets health guidelines.
Error.
The entity does not meet health guidelines.
Warning.
The entity meets health guidelines but experienced some issue.
If the entity is not found in the health store, this cmdlet returns an error.
Before you perform any operation on a Service Fabric cluster, establish a connection to the cluster by using the Connect-ServiceFabricCluster cmdlet.
This command queries the health of the named application.
The command specifies values for health policy and it uses filters to return only Error events, and children with Error or Warning health states.
Example 3: Get the health of an application and exclude the health statistics
This command queries the health of the named application. The returned application health doesn't include the health statistics.
Parameters
-ApplicationName
Specifies the Uniform Resource Identifier (URI) of a Service Fabric application.
The cmdlet gets health information for the application that has the URI that you specify.
Parameter properties
Type:
Uri
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
0
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-ConsiderWarningAsError
Indicates whether this cmdlet considers a warning health report as an error during health evaluation.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DeployedApplicationsFilter
Specifies the filter for DeployedApplicationHealthState children based on health state.
The value is obtained from members or bitwise operations on members of HealthStateFilter.
Only children that match the filter are returned.
All children are used to evaluate the application aggregated health state.
If not specified, all entries are returned.
Parameter properties
Type:
HealthStateFilter
Default value:
None
Accepted values:
Default, None, Ok, Warning, Error, All
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DeployedApplicationsHealthStateFilter
This parameter has been deprecated.
Specify the DeployedApplicationsFilter parameter instead.
Parameter properties
Type:
Int64
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-EventsFilter
Specifies the filter for the collection of HealthEvent objects reported on the application based on health state.
The value can be obtained from members or bitwise operations on members of HealthStateFilter.
Only events that match the filter are returned.
All events are used to evaluate the application aggregated health state.
If not specified, all entries are returned.
Parameter properties
Type:
HealthStateFilter
Default value:
None
Accepted values:
Default, None, Ok, Warning, Error, All
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-EventsHealthStateFilter
This parameter has been deprecated.
Specify the EventsFilter parameter instead.
Parameter properties
Type:
Int64
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ExcludeHealthStatistics
Indicates whether the health statistics should be included in the query result. If specified, the health statistics are not returned as part of the query result. Otherwise, the query result includes the application health statistics, which contain information about how many services, partitions and replicas of this application are in Ok, Warning and Error states.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MaxPercentUnhealthyDeployedApplications
Specifies the maximum tolerated percentage of unhealthy application instances deployed on the nodes in the cluster.
If there are more deployed applications with health state error than tolerated, the health state of the application is error.
If you do not specify this parameter, the health evaluation uses the value provided in the application manifest.
Parameter properties
Type:
Byte
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MaxPercentUnhealthyPartitionsPerService
Specifies the maximum tolerated percentage of unhealthy service partitions.
If there are more partitions with health state error than tolerated, the health state of the services is error.
If you do not specify this parameter, the health evaluation uses the value provided in the application manifest.
Parameter properties
Type:
Byte
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MaxPercentUnhealthyReplicasPerPartition
Specifies the maximum tolerated percentage of unhealthy partition replicas.
If there are more replicas with health state error than tolerated, the health state of the partition is error.
If you do not specify this parameter, the health evaluation uses the value provided in the application manifest.
Parameter properties
Type:
Byte
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MaxPercentUnhealthyServices
Specifies the maximum tolerated percentage of unhealthy services in an application.
If there are more services with health state error than tolerated, the health state of the application is error.
If you do not specify this parameter, the health evaluation uses the value provided in the application manifest.
Parameter properties
Type:
Byte
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ServicesFilter
Specifies the filter for ServiceHealthState children based on health state.
The value can be obtained from members or bitwise operations on members of HealthStateFilter.
Only children that match the filter are returned.
All children is used to evaluate the application aggregated health state.
If not specified, all entries are returned.
Parameter properties
Type:
HealthStateFilter
Default value:
None
Accepted values:
Default, None, Ok, Warning, Error, All
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ServicesHealthStateFilter
This parameter has been deprecated.
Specify the ServicesFilter parameter instead.
Parameter properties
Type:
Int64
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-TimeoutSec
Specifies the time-out period, in seconds, for the operation.
Parameter properties
Type:
Int32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.