Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/web_infrastructure/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/web_infrastructure/nginx_status_info.pyc

�
�Udac@`s�ddlmZmZmZeZidd6dgd6dd6ZdZd	Zd
Z	ddl
Z
ddlmZdd
l
mZddlmZdefd��YZd�Zedkr�e�ndS(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiontpreviewtstatust	communitytsupported_bys,
---
module: nginx_status_info
short_description: Retrieve information on nginx status.
description:
  - Gathers information from nginx from an URL having C(stub_status) enabled.
version_added: "2.9"
author: "René Moser (@resmo)"
options:
  url:
    type: str
    description:
      - URL of the nginx status.
    required: true
  timeout:
    type: int
    description:
      - HTTP connection timeout in seconds.
    required: false
    default: 10

notes:
  - See U(http://nginx.org/en/docs/http/ngx_http_stub_status_module.html) for more information.
sl
# Gather status info from nginx on localhost
- name: get current http stats
  nginx_status_info:
    url: http://localhost/nginx_status
  register: result

# Gather status info from nginx on localhost with a custom timeout of 20 seconds
- name: get current http stats
  nginx_status_info:
    url: http://localhost/nginx_status
    timeout: 20
  register: result
s�
---
active_connections:
  description: Active connections.
  returned: success
  type: int
  sample: 2340
accepts:
  description: The total number of accepted client connections.
  returned: success
  type: int
  sample: 81769947
handled:
  description: The total number of handled connections. Generally, the parameter value is the same as accepts unless some resource limits have been reached.
  returned: success
  type: int
  sample: 81769947
requests:
  description: The total number of client requests.
  returned: success
  type: int
  sample: 144332345
reading:
  description: The current number of connections where nginx is reading the request header.
  returned: success
  type: int
  sample: 0
writing:
  description: The current number of connections where nginx is writing the response back to the client.
  returned: success
  type: int
  sample: 241
waiting:
  description: The current number of idle client connections waiting for a request.
  returned: success
  type: int
  sample: 2092
data:
  description: HTTP response as is.
  returned: success
  type: str
  sample: "Active connections: 2340 \nserver accepts handled requests\n 81769947 81769947 144332345 \nReading: 0 Writing: 241 Waiting: 2092 \n"
N(t
AnsibleModule(t	fetch_url(tto_texttNginxStatusInfocB`seZd�Zd�ZRS(cC`s.tjjd�|_tjjd�|_dS(Nturlttimeout(tmoduletparamstgetRR
(tself((sX/usr/lib/python2.7/site-packages/ansible/modules/web_infrastructure/nginx_status_info.pyt__init__lsc	C`s�idd6dd6dd6dd6dd6dd6dd6dd6}td	td
|jdtd|j�\}}|s�tjd
d|j|jf�nt|j�dd�}|s�|S||d<d}t	j
||t	j�}|r�t|j
d��|d<t|j
d��|d<t|j
d��|d<t|j
d��|d<t|j
d��|d<t|j
d��|d<t|j
d��|d<n|S(Ntactive_connectionstacceptsthandledtrequeststreadingtwritingtwaitingtdataRRtforceR
tmsgs?No valid or no response from url %s within %s seconds (timeout)terrorstsurrogate_or_stricts�Active connections: ([0-9]+) \nserver accepts handled requests\n ([0-9]+) ([0-9]+) ([0-9]+) \nReading: ([0-9]+) Writing: ([0-9]+) Waiting: ([0-9]+)iiiiiii(tNoneR	RRtTrueR
t	fail_jsonR
treadtretmatchtStinttgroup(RtresulttresponsetinfoRtexprR$((sX/usr/lib/python2.7/site-packages/ansible/modules/web_infrastructure/nginx_status_info.pytrunps6
-#
(t__name__t
__module__RR,(((sX/usr/lib/python2.7/site-packages/ansible/modules/web_infrastructure/nginx_status_info.pyRjs	cC`shtdtdtdddt�dtdddd	��d
t�at�j�}tjdt|�dS(Nt
argument_specRttypetstrtrequiredR
R&tdefaulti
tsupports_check_modetchanged(RtdictR RRR,t	exit_jsontFalse(tnginx_status_info((sX/usr/lib/python2.7/site-packages/ansible/modules/web_infrastructure/nginx_status_info.pytmain�s	t__main__(t
__future__RRRR0t
__metaclass__tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNR#tansible.module_utils.basicRtansible.module_utils.urlsR	tansible.module_utils._textR
tobjectRR:R-(((sX/usr/lib/python2.7/site-packages/ansible/modules/web_infrastructure/nginx_status_info.pyt<module>s


,(	

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]