Product SiteDocumentation Site

9.3.3. Mutarea Resurselor Din Cauza Schimbărilor de Conectivitate

Setarea clusterului pentru a muta resursele când conectivitatea externă este pierdută, este un proces în doi paşi. Spuneţi Pacemaker-ului să monitorizeze conectivitatea

To do this, you need to add a ping resource to the cluster. The ping resource uses the system utility of the same name to a test if list of machines (specified by DNS hostname or IPv4/IPv6 address) are reachable and uses the results to maintain a node attribute normally called pingd. [14]


Older versions of Heartbeat required users to add ping nodes to - this is no longer required.


Older versions of Pacemaker used a custom binary called pingd for this functionality; this is now deprecated in favor of ping.
If your version of Pacemaker does not contain the ping agent, you can download the latest version from
Normally the resource will run on all cluster nodes, which means that you’ll need to create a clone. A template for this can be found below along with a description of the most interesting parameters.

Tabel 9.3. Common Options for a ping Resource

Câmp Descriere
The time to wait (dampening) for further changes to occur. Use this to prevent a resource from bouncing around the cluster when cluster nodes notice the loss of connectivity at slightly different times.
The number of connected ping nodes gets multiplied by this value to get a score. Useful when there are multiple ping nodes configured.
The machines to contact in order to determine the current connectivity status. Allowed values include resolvable DNS host names, IPv4 and IPv6 addresses.

Exemplu 9.2. An example ping cluster resource that checks node connectivity once every minute

<clone id="Connected">
   <primitive id="ping" provider="pacemaker" class="ocf" type="ping">
    <instance_attributes id="ping-attrs">
      <nvpair id="pingd-dampen" name="dampen" value="5s"/>
      <nvpair id="pingd-multiplier" name="multiplier" value="1000"/>
      <nvpair id="pingd-hosts" name="host_list" value=""/>
      <op id="ping-monitor-60s" interval="60s" name="monitor"/>


You’re only half done. The next section deals with telling Pacemaker how to deal with the connectivity status that ocf:pacemaker:ping is recording.

[14] The attribute name is customizable; that allows multiple ping groups to be defined.