1OCF_HEARTBEAT_NGINX(7)        OCF resource agents       OCF_HEARTBEAT_NGINX(7)
2
3
4

NAME

6       ocf_heartbeat_nginx - Manages an Nginx web/proxy server instance
7

SYNOPSIS

9       nginx [start | stop | status | monitor | meta-data | validate-all]
10

DESCRIPTION

12       This is the resource agent for the Nginx web/proxy server. This
13       resource agent does not monitor POP or IMAP servers, as we don't know
14       how to determine meaningful status for them.
15
16       The start operation ends with a loop in which monitor is repeatedly
17       called to make sure that the server started and that it is operational.
18       Hence, if the monitor operation does not succeed within the start
19       operation timeout, the nginx resource will end with an error status.
20
21       The default monitor operation will verify that nginx is running.
22
23       The level 10 monitor operation by default will try and fetch the
24       /nginx_status page - which is commented out in sample nginx
25       configurations. Make sure that the /nginx_status page works and that
26       the access is restricted to localhost (address 127.0.0.1) plus whatever
27       places _outside the cluster_ you want to monitor the server from. See
28       the status10url and status10regex attributes for more details.
29
30       The level 20 monitor operation will perform a more complex set of tests
31       from a configuration file.
32
33       The level 30 monitor operation will run an external command to perform
34       an arbitrary monitoring operation.
35

SUPPORTED PARAMETERS

37       configfile
38           The full pathname of the Nginx configuration file. This file is
39           parsed to provide defaults for various other resource agent
40           parameters.
41
42           (unique, optional, string, no default)
43
44       httpd
45           The full pathname of the httpd binary (optional).
46
47           (optional, string, default "/usr/sbin/httpd")
48
49       port
50           A port number that we can probe for status information using the
51           statusurl. This will default to the port number found in the
52           configuration file, or 80, if none can be found in the
53           configuration file.
54
55           (optional, integer, no default)
56
57       status10url
58           The URL to monitor (the nginx server status page by default) when
59           given a level 10 monitor operation. If left unspecified, it will be
60           inferred from the nginx configuration file, or defaulted to
61           /nginx_status.
62
63           If you set this, make sure that it succeeds *only* from the
64           localhost (127.0.0.1) and no other cluster nodes. Otherwise, the
65           cluster software may complain about it being active on multiple
66           nodes.
67
68           (optional, string, no default)
69
70       status10regex
71           Regular expression to match in the output of status10url. Case
72           insensitive.
73
74           (optional, string, default "Reading: [0-9]+ Writing: [0-9]+
75           Waiting: [0-9]+")
76
77       testclient
78           Client to use to query to Nginx for level 10 and level 20 tests. If
79           not specified, the RA will try to find one on the system.
80           Currently, wget and curl are supported, with curl being preferred.
81           For example, you can set this parameter to "wget" if you prefer
82           that to curl.
83
84           (optional, string, no default)
85
86       test20url
87           URL to test. If it does not start with "http", then it's considered
88           to be relative to the document root address.
89
90           (optional, string, no default)
91
92       test20regex
93           Regular expression to match in the output of test20url. Case
94           insensitive.
95
96           (optional, string, no default)
97
98       test20conffile
99           A file which contains a more complex test configuration. Could be
100           useful if you have to check more than one web application or in
101           case sensitive info should be passed as arguments (passwords).
102           Furthermore, using a config file is the only way to specify certain
103           parameters.
104
105           Please see README.webapps for examples and file description.
106
107           (optional, string, no default)
108
109       test20name
110           Name of the test within the test configuration file.
111
112           (optional, string, no default)
113
114       external_monitor30_cmd
115           Command string to run which implements level 30 monitoring.
116
117           (optional, string, no default)
118
119       options
120           Extra options to apply when starting nginx.
121
122           (optional, string, no default)
123

SUPPORTED ACTIONS

125       This resource agent supports the following actions (operations):
126
127       start
128           Starts the resource. Suggested minimum timeout: 40s.
129
130       stop
131           Stops the resource. Suggested minimum timeout: 60s.
132
133       reload
134           Suggested minimum timeout: 40s.
135
136       status
137           Performs a status check. Suggested minimum timeout: 30s.
138
139       monitor
140           Performs a detailed status check. Suggested minimum timeout: 30s.
141           Suggested interval: 10s.
142
143       monitor
144           Performs a detailed status check. Suggested minimum timeout: 30s.
145           Suggested interval: 30s.
146
147       monitor
148           Performs a detailed status check. Suggested minimum timeout: 45s.
149
150       monitor
151           Performs a detailed status check. Suggested minimum timeout: 60s.
152
153       meta-data
154           Retrieves resource agent metadata (internal use only). Suggested
155           minimum timeout: 5s.
156
157       validate-all
158           Performs a validation of the resource configuration. Suggested
159           minimum timeout: 5s.
160

EXAMPLE CRM SHELL

162       The following is an example configuration for a nginx resource using
163       the crm(8) shell:
164
165           primitive p_nginx ocf:heartbeat:nginx \
166             op monitor timeout="30s" depth="0" interval="10s" \
167             op monitor timeout="30s" depth="10" interval="30s" \
168             op monitor timeout="45s" depth="20" \
169             op monitor timeout="60s" depth="30"
170

EXAMPLE PCS

172       The following is an example configuration for a nginx resource using
173       pcs(8)
174
175           pcs resource create p_nginx ocf:heartbeat:nginx \
176             op monitor timeout="30s" OCF_CHECK_LEVEL="0" interval="10s" \
177             op monitor timeout="30s" OCF_CHECK_LEVEL="10" interval="30s" \
178             op monitor timeout="45s" OCF_CHECK_LEVEL="20" \
179             op monitor timeout="60s" OCF_CHECK_LEVEL="30"
180

SEE ALSO

182       http://clusterlabs.org/
183

AUTHOR

185       ClusterLabs contributors (see the resource agent source for information
186       about individual authors)
187
188
189
190resource-agents UNKNOWN           01/25/2023            OCF_HEARTBEAT_NGINX(7)
Impressum