table of contents
OCF_HEARTBEAT_NGINX(7) | OCF resource agents | OCF_HEARTBEAT_NGINX(7) |
NAME¶
ocf_heartbeat_nginx - Manages an Nginx web/proxy server instance
SYNOPSIS¶
nginx [start | stop | status | monitor | meta-data | validate-all]
DESCRIPTION¶
This is the resource agent for the Nginx web/proxy server. This resource agent does not monitor POP or IMAP servers, as we don't know how to determine meaningful status for them.
The start operation ends with a loop in which monitor is repeatedly called to make sure that the server started and that it is operational. Hence, if the monitor operation does not succeed within the start operation timeout, the nginx resource will end with an error status.
The default monitor operation will verify that nginx is running.
The level 10 monitor operation by default will try and fetch the /nginx_status page - which is commented out in sample nginx configurations. Make sure that the /nginx_status page works and that the 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.
The level 20 monitor operation will perform a more complex set of tests from a configuration file.
The level 30 monitor operation will run an external command to perform an arbitrary monitoring operation.
SUPPORTED PARAMETERS¶
configfile
(unique, optional, string, no default)
httpd
(optional, string, default "/usr/sbin/httpd")
port
(optional, integer, no default)
status10url
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.
(optional, string, no default)
status10regex
(optional, string, default "Reading: [0-9]+ Writing: [0-9]+ Waiting: [0-9]+")
testclient
(optional, string, no default)
test20url
(optional, string, no default)
test20regex
(optional, string, no default)
test20conffile
Please see README.webapps for examples and file description.
(optional, string, no default)
test20name
(optional, string, no default)
external_monitor30_cmd
(optional, string, no default)
options
(optional, string, no default)
SUPPORTED ACTIONS¶
This resource agent supports the following actions (operations):
start
stop
reload
status
monitor
monitor
monitor
monitor
meta-data
validate-all
EXAMPLE CRM SHELL¶
The following is an example configuration for a nginx resource using the crm(8) shell:
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" \
op monitor timeout="60s" depth="30"
EXAMPLE PCS¶
The following is an example configuration for a nginx resource using pcs(8)
pcs resource create 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" \
op monitor timeout="60s" depth="30"
SEE ALSO¶
AUTHOR¶
ClusterLabs contributors (see the resource agent source for information about individual authors)
03/19/2024 | resource-agents UNKNOWN |