OCF_HEARTBEAT_ETHMON(7) | OCF resource agents | OCF_HEARTBEAT_ETHMON(7) |
ocf_heartbeat_ethmonitor - Monitors network interfaces
ethmonitor [start | stop | status | monitor | meta-data | validate-all]
Monitor the vitality of a local network interface.
You may set up this RA as a clone resource to monitor the network interfaces on different nodes, with the same interface name. This is not related to the IP address or the network on which a interface is configured. You may use this RA to move resources away from a node, which has a faulty interface or prevent moving resources to such a node. This gives you independent control of the resources, without involving cluster intercommunication. But it requires your nodes to have more than one network interface.
The resource configuration requires a monitor operation, because the monitor does the main part of the work. In addition to the resource configuration, you need to configure some location constraints, based on a CIB attribute value. The name of the attribute value is configured in the 'name' option of this RA.
Example constraint configuration using crmsh location loc_connected_node my_resource_grp rule ="rule_loc_connected_node" -INF: ethmonitor eq 0
Example constraint configuration using pcs. Only allow 'my_resource' to run on nodes where eth0 ethernet device is available. pcs constraint location my_resource rule score=-INFINITY ethmonitor-eth0 ne 1
The ethmonitor works in 3 different modes to test the interface vitality. 1. call ip to see if the link status is up (if link is down -> error) 2. call ip and watch the RX counter (if packages come around in a certain time -> success) 3. call arping to check whether any of the IPs found in the local ARP cache answers an ARP REQUEST (one answer -> success) 4. return error
interface
(unique, required, string, no default)
name
(unique, optional, string, no default)
multiplier
(optional, integer, default 1)
repeat_count
(optional, integer, default 5)
repeat_interval
(optional, integer, default 10)
pktcnt_timeout
(optional, integer, default 5)
arping_count
(optional, integer, default 1)
arping_timeout
(optional, integer, default 1)
arping_cache_entries
(optional, integer, default 5)
infiniband_device
(optional, string, no default)
infiniband_port
(optional, integer, no default)
link_status_only
(optional, boolean, default false)
This resource agent supports the following actions (operations):
start
stop
status
monitor
meta-data
validate-all
The following is an example configuration for a ethmonitor resource using the crm(8) shell:
primitive p_ethmonitor ocf:heartbeat:ethmonitor \
params \
interface=string \
op monitor depth="0" timeout="60s" interval="10s"
The following is an example configuration for a ethmonitor resource using pcs(8)
pcs resource create p_ethmonitor ocf:heartbeat:ethmonitor \
interface=string \
op monitor depth="0" timeout="60s" interval="10s"
http://clusterlabs.org/
ClusterLabs contributors (see the resource agent source for information about individual authors)
06/27/2020 | resource-agents UNKNOWN |