On this page
nginx_status_facts - Retrieve nginx status facts.
New in version 2.3.
Synopsis
- Gathers facts from nginx from an URL having
stub_status
enabled.
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
timeout | Default:
10
|
HTTP connection timeout in seconds.
|
url
required
|
URL of the nginx status.
|
Notes
Note
- See http://nginx.org/en/docs/http/ngx_http_stub_status_module.html for more information.
Examples
# Gather status facts from nginx on localhost
- name: get current http stats
nginx_status_facts:
url: http://localhost/nginx_status
# Gather status facts from nginx on localhost with a custom timeout of 20 seconds
- name: get current http stats
nginx_status_facts:
url: http://localhost/nginx_status
timeout: 20
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
nginx_status_facts.accepts
int
|
success |
The total number of accepted client connections.
Sample:
81769947
|
nginx_status_facts.active_connections
int
|
success |
Active connections.
Sample:
2340
|
nginx_status_facts.data
string
|
success |
HTTP response as is.
Sample:
Active connections: 2340 server accepts handled requests 81769947 81769947 144332345 Reading: 0 Writing: 241 Waiting: 2092
|
nginx_status_facts.handled
int
|
success |
The total number of handled connections. Generally, the parameter value is the same as accepts unless some resource limits have been reached.
Sample:
81769947
|
nginx_status_facts.reading
int
|
success |
The current number of connections where nginx is reading the request header.
|
nginx_status_facts.requests
int
|
success |
The total number of client requests.
Sample:
144332345
|
nginx_status_facts.waiting
int
|
success |
The current number of idle client connections waiting for a request.
Sample:
2092
|
nginx_status_facts.writing
int
|
success |
The current number of connections where nginx is writing the response back to the client.
Sample:
241
|
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Maintenance
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Author
- René Moser (@resmo)
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.6/modules/nginx_status_facts_module.html