OCF_HEARTBEAT_RABBIT(7)

πŸ’– ocf_heartbeat_rabbitmq-server-ha β€” like, the manual page, but make it make sense πŸ’–

okay so bestie. this is OCF_HEARTBEAT_RABBIT(7), the resource agent page from the OCF resource agents collection, and i'm gonna walk you through it like we're both procrastinating on a group project. grab a boba πŸ§‹ β€” there are a lot of parameters and we're covering every single one. no cap.


✨ NAME ✨

ocf_heartbeat_rabbitmq-server-ha β€” the resource agent for a RabbitMQ HA cluster πŸ°πŸ‘‘


✨ SYNOPSIS ✨

rabbitmq-server-ha [start | stop | status | monitor | promote | demote |
                   meta-data | validate-all]

that's it. those are the moves. periodt. πŸ’…


✨ DESCRIPTION ✨

so the resource agent for RabbitMQ basically promotes a node πŸ‘‘, and then the cluster nodes come join it. that's the whole vibe. main character node gets promoted, everyone else falls in line. it's giving girlboss hierarchy, honestly. πŸ‡βœ¨


✨ SUPPORTED PARAMETERS ✨

okay this is the long part, bestie, but we're gonna get through it together 🫢 every single one is (optional) btw β€” i'll note the type and default on each so you never get caught out.

  • binary β€” the RabbitMQ binary itself. πŸ‡ (optional, string, default "/usr/sbin/rabbitmq-server")
  • ctl β€” the rabbitctl binary (yes, that's how it's spelled here, don't come for me, i'm just reading the page). πŸŽ›οΈ (optional, string, default "/usr/sbin/rabbitmqctl")
  • pid_file β€” where RabbitMQ's PID file lives. πŸ“„ (optional, string, default "/var/run/rabbitmq/pid")
  • log_dir β€” the RabbitMQ log directory. πŸ“ (optional, string, default "/var/log/rabbitmq")
  • username β€” RabbitMQ user name. πŸ™‹β€β™€οΈ (optional, string, default "rabbitmq")
  • groupname β€” RabbitMQ group name. πŸ‘― (optional, string, default "rabbitmq")
  • admin_user β€” the default admin user for the API. πŸ”‘ (optional, string, default "guest")
  • admin_password β€” the default admin user's password for the API. 🀫 (optional, string, default "guest") β€” yes, it really is guest/guest, that's what the page says, i'm not inventing anything.
  • definitions_dump_file β€” the default definitions dump file. πŸ—‚οΈ (optional, string, default "/etc/rabbitmq/definitions")
  • command_timeout β€” timeout command arguments for termination of the commands that get issued (the value is auto evaluated, so it computes itself, iconique). ⏱️ (optional, string, no default)
  • start_time β€” timeout for starting the rabbitmq server. ▢️ (optional, string, default "7")
  • stop_time β€” timeout for stopping the rabbitmq server. ⏹️ (optional, string, default "7")
  • debug β€” the debug flag for the agent (/usr/sbin/rabbitmq-server) instance. when it's on, rmq-* files get created in the /tmp/ directory to log some operations and ENV values inside the OCF-script. πŸ› (optional, boolean, default false)
  • mnesia_base β€” base directory for storing Mnesia files. πŸ’Ύ (optional, boolean, default /var/lib/rabbitmq/mnesia β€” yeah, the page says boolean for a directory path, i don't make the rules, i just report them πŸ™ˆ)
  • mnesia_schema_base β€” parent directory for the Mnesia schema directory. πŸ“ (optional, string, default "/var/lib/rabbitmq")
  • host_ip β€” the IP address /usr/sbin/rabbitmq-server should listen on. 🌐 (optional, boolean, default 127.0.0.1 β€” again, page says boolean β€” i'm just the messenger πŸ’€)
  • node_port β€” the port /usr/sbin/rabbitmq-server should listen on. πŸ”Œ (optional, boolean, default 5672 β€” same situation, okurrr)
  • default_vhost β€” the default virtual host used for monitoring whether a node is fully synchronized with the rest of the cluster. in normal operation, the resource agent will wait for queues from this virtual host on this node to be synchronized elsewhere before stopping RabbitMQ. heads up though: this also means queues in other virtual hosts may not be fully synchronized on stop operations. ⚠️ (optional, string, default "/")
  • erlang_cookie β€” the Erlang cookie for clustering. if specified, it gets updated at the mnesia reset. πŸͺ (optional, boolean, default false)
  • erlang_cookie_file β€” the Erlang cookie file path where the cookie will be put, if requested. πŸ“ (optional, boolean, default /var/lib/rabbitmq/.erlang.cookie β€” boolean again, don't @ me 😭)
  • use_fqdn β€” whether to use FQDN or a shortname for the rabbitmq node. 🏷️ (optional, boolean, default false)
  • fqdn_prefix β€” optional FQDN prefix for RabbitMQ nodes in the cluster. you can specify an FQDN prefix to host multiple RabbitMQ instances on a node, or for when RabbitMQ is running in a dedicated network/interface. 🌍 (optional, string, no default)
  • max_rabbitmqctl_timeouts β€” if rabbitmqctl times out during a monitor call, that timeout is ignored unless it's the Nth timeout in a row. here N is the value of this parameter. so if too many timeouts happen in a row, the monitor call returns with an error. πŸ” (optional, string, default "3")
  • policy_file β€” a path to the shell script that sets up RabbitMQ policies. πŸ“œ (optional, string, default "/usr/local/sbin/set_rabbitmq_policy")
  • rmq_feature_health_check β€” since rabbit 3.6.4, list_queues/list_channels-based monitoring should be replaced with the "node_health_check" command, because that one creates no network load at all. 🩺 (optional, boolean, default true)
  • rmq_feature_local_list_queues β€” for a rabbit version that implements the --local flag for list_queues, this can greatly reduce network overhead in cases when the node is stopped/demoted. πŸ“Ά (optional, boolean, default true)
  • limit_nofile β€” the soft and hard limit for NOFILE. πŸ—ƒοΈ (optional, string, default "65535")
  • avoid_using_iptables β€” when set to true, the iptables calls that block client access become noops. super useful when we're running inside containers. πŸ“¦ (optional, boolean, default false)
  • allowed_cluster_nodes β€” when set to anything other than the empty string, it must contain the list of cluster node names, separated by spaces, where the rabbitmq resource is allowed to run. this is needed when rabbitmq runs on a subset of nodes that are part of a larger cluster. the default ("") assumes that all nodes part of the cluster will run the rabbitmq resource. 🚦 (optional, string, no default)

see? we ate that. πŸ”₯


✨ SUPPORTED ACTIONS ✨

this resource agent supports these actions (operations), bestie β€” and the timeouts are the suggested minimums, so don't go shrinking them on me:

  • start β€” starts the resource. suggested minimum timeout: 20s. πŸš€
  • stop β€” stops the resource. suggested minimum timeout: 20s. πŸ›‘
  • status β€” performs a status check. suggested minimum timeout: 20s. πŸ‘€
  • monitor β€” performs a detailed status check. suggested minimum timeout: 30s. suggested interval: 5s. πŸ”
  • monitor (Promoted role) β€” performs a detailed status check. suggested minimum timeout: 30s. suggested interval: 3s. πŸ‘‘
  • promote β€” promotes the resource to the Master role. suggested minimum timeout: 30s. ⬆️
  • demote β€” demotes the resource to the Slave role. suggested minimum timeout: 30s. ⬇️
  • notify β€” suggested minimum timeout: 20s. πŸ“£
  • validate-all β€” performs a validation of the resource configuration. suggested minimum timeout: 5s. βœ…
  • meta-data β€” retrieves resource agent metadata (internal use only, so like, don't touch, that's the agent's own business). suggested minimum timeout: 5s. πŸ”’

✨ EXAMPLE CRM SHELL ✨

here's an example config for a rabbitmq-server-ha resource using the crm(8) shell β€” copy it exactly, bestie, character for character:

primitive p_rabbitmq-server-ha ocf:heartbeat:rabbitmq-server-ha \
  op monitor depth="0" timeout="30s" interval="5s" \
  op monitor depth="0" timeout="30s" interval="3s" role="Promoted"

ms ms_rabbitmq-server-ha p_rabbitmq-server-ha \
  meta notify="true" interleave="true"

the way that ms line just ties it all together πŸŽ€


✨ EXAMPLE PCS ✨

and here's the same energy for a rabbitmq-server-ha resource using pcs(8):

pcs resource create p_rabbitmq-server-ha ocf:heartbeat:rabbitmq-server-ha \
  op monitor OCF_CHECK_LEVEL="0" timeout="30s" interval="5s" \
  op monitor OCF_CHECK_LEVEL="0" timeout="30s" interval="3s" role="Promoted" promotable

note the OCF_CHECK_LEVEL instead of depth here β€” different tool, different spelling, don't mix them up πŸ™ˆ


✨ SEE ALSO ✨


✨ AUTHOR ✨

ClusterLabs contributors (see the resource agent source for information about individual authors) πŸ’œ β€” absolute legends, every one of them.


and that's a wrap, bestie!! πŸŽ€ this page is from the resource-agents package, version UNKNOWN, dated 10/01/2026 β€” so if you ever need to cite your sources for the group chat, that's the receipt. now go configure that cluster like the main character you are. πŸ¦‹βœ¨πŸ‘‘

πŸ“¦ where this page comes from