OCF_HEARTBEAT_ETHMON(7)
πΈ OCF_HEARTBEAT_ETHMON(7) πΈ
okay so bestie, you're reading the OCF_HEARTBEAT_ETHMON(7) page from the OCF resource agents manual, and honestly? it's giving network-vibes-check energy. let's get into it π
β¨ NAME β¨
ocf_heartbeat_ethmonitor β literally just monitors network interfaces, no cap π«Ά
β¨ SYNOPSIS β¨
ethmonitor [start | stop | status | monitor | meta-data | validate-all]
β¨ DESCRIPTION β¨
So the whole point is monitoring the vitality of a local network interface. Like, is this nic thriving or is it not okay π
You can set this RA up as a clone resource to monitor the network interfaces on different nodes β with the same interface name across all of them. And no, this is not related to the IP address or the network that a interface is configured on, so don't @ me about that π
What you can do with it: use this RA to move resources away from a node that has a faulty interface, or to prevent resources from moving to such a node. That gives you independent control of the resources, without involving cluster intercommunication. But β and this is the catch β it requires your nodes to have more than one network interface. periodt π
β οΈ Your resource configuration requires a monitor operation, because the monitor is the one doing the main part of the work. No monitor, no vibes.
On top of the resource config, you also need to configure some location constraints, based on a CIB attribute value. The name of that attribute value is configured in the name option of this RA. iykyk β¨
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 the 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 β but like, there are four things listed, we don't make the rules π§
- call
ipto see if the link status is up (if link is down -> error) - call
ipand watch the RX counter (if packages come around in a certain time -> success) - call
arpingto check whether any of the IPs found in the local ARP cache answers an ARP REQUEST (one answer -> success) - return error
β¨ SUPPORTED PARAMETERS β¨
interfaceβ the name of the network interface that should be monitored (e.g.eth0). (unique, required, string, no default) πnameβ the name of the CIB attribute to set. This is the name to be used in the constraints. Defaults to"ethmonitor-'interface_name'". (unique, optional, string, no default)multiplierβ multiplier for the value of the CIBattriobutespecified in parametername(yes that's the manpage's spelling, not mine, I would never π). (optional, integer, default1)repeat_countβ specify how often the interface will be monitored, before the status is set to failed. You need to set the timeout of the monitoring operation to at leastrepeat_count * repeat_interval. (optional, integer, default5)repeat_intervalβ specify how long to wait in seconds between therepeat_counts. (optional, integer, default10)pktcnt_timeoutβ timeout for the RX packet counter. Stop listening for packet counter changes after the given number of seconds. (optional, integer, default5)arping_countβ number of ARP REQUEST packets to send for every IP. Usually one ARP REQUEST (arping) is send π¦ (optional, integer, default1)arping_timeoutβ time in seconds to wait for ARP REQUESTs (all packets ofarping_count). This is to limit the time for arp requests, so you can send requests to more than one node without running in the monitor operation timeout. (optional, integer, default1)arping_cache_entriesβ maximum number of IPs from the ARP cache list to check for ARP REQUEST (arping) answers. Newest entries are tried first. (optional, integer, default5)infiniband_deviceβ for interfaces that are infiniband devices. (optional, string, no default)infiniband_portβ for infiniband devices, this is the port to monitor. (optional, integer, no default)link_status_onlyβ only report success based on link status. Do not perform RX counter or arping related connectivity tests. (optional, boolean, defaultfalse)
β¨ SUPPORTED ACTIONS β¨
This resource agent supports the following actions (operations) β here's the whole lineup bestie π
startβ starts the resource. Suggested minimum timeout:60s.stopβ stops the resource. Suggested minimum timeout:20s.statusβ performs a status check. Suggested minimum timeout:60s. Suggested interval:10s.monitorβ performs a detailed status check. Suggested minimum timeout:60s. Suggested interval:10s. (this is the main character, remember? π)meta-dataβ retrieves resource agent metadata (internal use only). Suggested minimum timeout:5s.validate-allβ performs a validation of the resource configuration. Suggested minimum timeout:20s.
β¨ EXAMPLE CRM SHELL β¨
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"
β¨ EXAMPLE PCS β¨
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 OCF_CHECK_LEVEL="0" timeout="60s" interval="10s"
β¨ SEE ALSO β¨
β¨ AUTHOR β¨
ClusterLabs contributors (see the resource agent source for information about individual authors) π«Ά
anyway that's the whole page, ily, go monitor some interfaces and slay πβ¨
resource-agents version UNKNOWN, dated 10/01/2026 β that's the sign-off bestie, we're done here ππ¦
π¦ where this page comes from
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms