OCF_HEARTBEAT_NGINX(7)
π
OCF_HEARTBEAT_NGINX(7) β the ocf_heartbeat_nginx tea π΅
okay bestie, so this whole page is about OCF_HEARTBEAT_NGINX, and honestly? she's a whole icon in the OCF resource agents lineup. sit down, grab a lil drink, we're learning how to babysit an Nginx instance together π«Ά
β¨ NAME β¨
ocf_heartbeat_nginx β literally just manages an Nginx web/proxy server instance. that's her job. that's her whole personality. nginx resource agent energy π
π SYNOPSIS π
nginx [start | stop | status | monitor | meta-data | validate-all]
π¦ DESCRIPTION π¦
so this is the resource agent for the Nginx web/proxy server, periodt. quick heads up though β this agent does not monitor POP or IMAP servers, because (and I quote the ancestors here) we genuinely don't know how to determine meaningful status for them. so like, don't come for her π she does not play that game.
the start operation? okay so it ends with a loop in which monitor gets repeatedly called β literally just to double-double-check that the server actually started and that it's operational. so bestie, listen: if the monitor operation doesn't succeed within the start operation timeout, the nginx resource will end with an error status. no cap. the vibe check fails, the resource fails π
the default monitor operation will verify that nginx is running. simple, cute, does the job.
the level 10 monitor operation by default will try and fetch the /nginx_status page β which is, and I cannot stress this enough, commented out in sample nginx configurations π« so make sure that the /nginx_status page works, AND that access is restricted to localhost (address 127.0.0.1) plus whatever places _outside the cluster_ you want to monitor the server from. see the status10url and status10regex attributes for more details, bestie, they're right there for you.
the level 20 monitor operation performs a more complex set of tests from a configuration file. fancy energy β¨
the level 30 monitor operation runs an external command to perform an arbitrary monitoring operation. main character behaviour, honestly π
π SUPPORTED PARAMETERS π
okay this is the part where I list literally every single one, because we do not skip. we never skip π
configfileβ the full pathname of the Nginx configuration file. this file is parsed to provide defaults for various other resource agent parameters. (unique, optional, string, no default)httpdβ the full pathname of thehttpdbinary (optional). (optional, string, default"/usr/sbin/httpd")portβ a port number that we can probe for status information using thestatusurl. this will default to the port number found in the configuration file, or80, if none can be found in the configuration file. (optional, integer, no default)status10urlβ the URL to monitor (the nginx server status page by default) when given a level 10monitoroperation. if left unspecified, it will be inferred from the nginx configuration file, or defaulted to/nginx_status.
β οΈ if you set this, make sure that it succeeds *only* from the localhost (127.0.0.1) and no other cluster nodes. otherwise, the cluster software may complain about it being active on multiple nodes. dramatic? yes. true? also yes π
(optional, string, no default)
status10regexβ regular expression to match in the output ofstatus10url. case insensitive, iykyk. (optional, string, default"Reading: [0-9]+ Writing: [0-9]+ Waiting: [0-9]+")testclientβ client to use to query to Nginx for level 10 and level 20 tests. if not specified, the RA will try to find one on the system. currently,wgetandcurlare supported, withcurlbeing preferred π for example, you can set this parameter to"wget"if you prefer that to curl. (optional, string, no default)test20urlβ URL to test. if it does not start with"http", then it's considered to be relative to the document root address. (optional, string, no default)test20regexβ regular expression to match in the output oftest20url. case insensitive. (optional, string, no default)test20conffileβ a file which contains a more complex test configuration. could be useful if you have to check more than one web application or in case sensitive info should be passed as arguments (passwords). furthermore, using a config file is the only way to specify certain parameters. please seeREADME.webappsfor examples and file description π (optional, string, no default)test20nameβ name of the test within the test configuration file. (optional, string, no default)external_monitor30_cmdβ command string to run which implements level 30 monitoring. (optional, string, no default)optionsβ extra options to apply when starting nginx. (optional, string, no default)
π₯ SUPPORTED ACTIONS π₯
this resource agent supports the following actions (operations) β and yes, monitor shows up four separate times on purpose, she contains multitudes π§
startβ starts the resource. suggested minimum timeout:40s.stopβ stops the resource. suggested minimum timeout:60s.reloadβ suggested minimum timeout:40s.statusβ performs a status check. suggested minimum timeout:30s.monitorβ performs a detailed status check. suggested minimum timeout:30s. suggested interval:10s.monitorβ performs a detailed status check. suggested minimum timeout:30s. suggested interval:30s.monitorβ performs a detailed status check. suggested minimum timeout:45s. suggested interval:60s.monitorβ performs a detailed status check. suggested minimum timeout:60s. suggested interval:61s.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:5s.
π EXAMPLE CRM SHELL π
here's an example configuration for a nginx resource using the crm(8) shell β copy it exactly, bestie, every quote matters:
primitive p_nginx ocf:heartbeat:nginx \
op monitor timeout="30s" depth="0" interval="10s" \
op monitor timeout="30s" depth="10" interval="30s" \
op monitor timeout="45s" depth="20" interval="60s" \
op monitor timeout="60s" depth="30" interval="61s"
β EXAMPLE PCS β
and here's the same vibe for a nginx resource using pcs(8) β notice it's OCF_CHECK_LEVEL instead of depth, slay:
pcs resource create p_nginx ocf:heartbeat:nginx \
op monitor timeout="30s" OCF_CHECK_LEVEL="0" interval="10s" \
op monitor timeout="30s" OCF_CHECK_LEVEL="10" interval="30s" \
op monitor timeout="45s" OCF_CHECK_LEVEL="20" interval="60s" \
op monitor timeout="60s" OCF_CHECK_LEVEL="30" interval="61s"
πΈ SEE ALSO πΈ
http://clusterlabs.org/β go look, it's giving community π«Ά
π AUTHOR π
ClusterLabs contributors (see the resource agent source for information about individual authors). iconic collective behaviour, honestly π
and that's the whole page, bestie!! π this lil gem is from resource-agents version UNKNOWN, dated 10/01/2026 β so go forth, monitor responsibly, and don't forget to restrict that /nginx_status page πβ¨π¦
π¦ 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