Class: Azure::ServiceFabric::V6_3_0_9::Models::ClusterHealthPolicy

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/6.3.0.9/generated/azure_service_fabric/models/cluster_health_policy.rb

Overview

Defines a health policy used to evaluate the health of the cluster or of a cluster node.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#application_type_health_policy_mapArray<ApplicationTypeHealthPolicyMapItem>

max percentage unhealthy applications for specific application types. Each entry specifies as key the application type name and as value an integer that represents the MaxPercentUnhealthyApplications percentage used to evaluate the applications of the specified application type.

The application type health policy map can be used during cluster health evaluation to describe special application types. The application types included in the map are evaluated against the percentage specified in the map, and not with the global MaxPercentUnhealthyApplications defined in the cluster health policy. The applications of application types specified in the map are not counted against the global pool of applications. For example, if some applications of a type are critical, the cluster administrator can add an entry to the map for that application type and assign it a value of 0% (that is, do not tolerate any failures). All other applications can be evaluated with MaxPercentUnhealthyApplications set to 20% to tolerate some failures out of the thousands of application instances. The application type health policy map is used only if the cluster manifest enables application type health evaluation using the configuration entry for HealthManager/EnableApplicationTypeHealthEvaluation.

Returns:



78
79
80
# File 'lib/6.3.0.9/generated/azure_service_fabric/models/cluster_health_policy.rb', line 78

def application_type_health_policy_map
  @application_type_health_policy_map
end

#consider_warning_as_errorBoolean

severity as errors. Default value: false .

Returns:

  • (Boolean)

    Indicates whether warnings are treated with the same



18
19
20
# File 'lib/6.3.0.9/generated/azure_service_fabric/models/cluster_health_policy.rb', line 18

def consider_warning_as_error
  @consider_warning_as_error
end

#max_percent_unhealthy_applicationsInteger

applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10.

The percentage represents the maximum tolerated percentage of applications that can be unhealthy before the cluster is considered in error. If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap. The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero. Default value: 0 .

Returns:

  • (Integer)

    The maximum allowed percentage of unhealthy



53
54
55
# File 'lib/6.3.0.9/generated/azure_service_fabric/models/cluster_health_policy.rb', line 53

def max_percent_unhealthy_applications
  @max_percent_unhealthy_applications
end

#max_percent_unhealthy_nodesInteger

before reporting an error. For example, to allow 10% of nodes to be unhealthy, this value would be 10.

The percentage represents the maximum tolerated percentage of nodes that can be unhealthy before the cluster is considered in error. If the percentage is respected but there is at least one unhealthy node, the health is evaluated as Warning. The percentage is calculated by dividing the number of unhealthy nodes over the total number of nodes in the cluster. The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero.

In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that. Default value: 0 .

Returns:

  • (Integer)

    The maximum allowed percentage of unhealthy nodes



36
37
38
# File 'lib/6.3.0.9/generated/azure_service_fabric/models/cluster_health_policy.rb', line 36

def max_percent_unhealthy_nodes
  @max_percent_unhealthy_nodes
end

Class Method Details

.mapperObject

Mapper for ClusterHealthPolicy class as Ruby Hash. This will be used for serialization/deserialization.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# File 'lib/6.3.0.9/generated/azure_service_fabric/models/cluster_health_policy.rb', line 85

def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'ClusterHealthPolicy',
    type: {
      name: 'Composite',
      class_name: 'ClusterHealthPolicy',
      model_properties: {
        consider_warning_as_error: {
          client_side_validation: true,
          required: false,
          serialized_name: 'ConsiderWarningAsError',
          default_value: false,
          type: {
            name: 'Boolean'
          }
        },
        max_percent_unhealthy_nodes: {
          client_side_validation: true,
          required: false,
          serialized_name: 'MaxPercentUnhealthyNodes',
          default_value: 0,
          type: {
            name: 'Number'
          }
        },
        max_percent_unhealthy_applications: {
          client_side_validation: true,
          required: false,
          serialized_name: 'MaxPercentUnhealthyApplications',
          default_value: 0,
          type: {
            name: 'Number'
          }
        },
        application_type_health_policy_map: {
          client_side_validation: true,
          required: false,
          serialized_name: 'ApplicationTypeHealthPolicyMap',
          type: {
            name: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ApplicationTypeHealthPolicyMapItemElementType',
                type: {
                  name: 'Composite',
                  class_name: 'ApplicationTypeHealthPolicyMapItem'
                }
            }
          }
        }
      }
    }
  }
end