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

SUPPORTED ACTIONS

105       This resource agent supports the following actions (operations):
106
107       start
108           Starts the resource. Suggested minimum timeout: 40s.
109
110       stop
111           Stops the resource. Suggested minimum timeout: 60s.
112
113       reload
114           Suggested minimum timeout: 40s.
115
116       status
117           Performs a status check. Suggested minimum timeout: 30s.
118
119       monitor
120           Performs a detailed status check. Suggested minimum timeout: 30s.
121           Suggested interval: 10s.
122
123       monitor
124           Performs a detailed status check. Suggested minimum timeout: 30s.
125           Suggested interval: 30s.
126
127       monitor
128           Performs a detailed status check. Suggested minimum timeout: 45s.
129
130       monitor
131           Performs a detailed status check. Suggested minimum timeout: 60s.
132
133       meta-data
134           Retrieves resource agent metadata (internal use only). Suggested
135           minimum timeout: 5.
136
137       validate-all
138           Performs a validation of the resource configuration. Suggested
139           minimum timeout: 5.
140

EXAMPLE

142       The following is an example configuration for a nginx resource using
143       the crm(8) shell:
144
145           primitive p_nginx ocf:heartbeat:nginx \
146             op monitor timeout="30s" depth="0" interval="10s" \
147             op monitor timeout="30s" depth="10" interval="30s" \
148             op monitor timeout="45s" depth="20" \
149             op monitor timeout="60s" depth="30"
150

SEE ALSO

152       http://www.linux-ha.org/wiki/nginx_(resource_agent)
153

AUTHOR

155       Linux-HA contributors (see the resource agent source for information
156       about individual authors)
157
158
159
160resource-agents 3.9.2             07/08/2011            OCF_HEARTBEAT_NGINX(7)
Impressum