Module Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias Import alias Import alias Import alias Import alias TryExcept body Import alias handlers ExceptHandler type NameLoad body Assign NameStore NameLoad ImportFrom alias FunctionDef arguments args NameParam defaults body Return ListComp NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Str Assign NameStore Dict NameLoad NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Dict NameLoad NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr ListLoad Assign NameStore Call AttributeLoad NameLoad attr Str If NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword TupleLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad TupleLoad Str AttributeLoad NameLoad attr TupleLoad Str AttributeLoad NameLoad attr TupleLoad Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args defaults body Assign NameStore ListLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass orelse Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list NameLoad FunctionDef arguments args defaults body Assign NameStore ListLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad keyword Num keyword NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body For NameStore NameLoad body If UnaryOpNot AttributeLoad NameLoad attr body Return NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Dict Str Str ListComp AttributeLoad NameLoad attr comprehension NameStore NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad Return TupleLoad Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If AttributeLoad NameLoad attr body Assign NameStore Dict Str Str Str Str Str NameLoad AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Dict Str Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Dict Str Str Str AttributeLoad NameLoad attr BoolOpOr AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr orelse Assign NameStore Dict Str Str ListComp AttributeLoad NameLoad attr comprehension NameStore NameLoad NameLoad Return TupleLoad Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return TupleLoad Str Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr body Assign NameStore NameLoad Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Dict Str Str Str BoolOpOr AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str NameLoad NameLoad NameLoad AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Dict Str Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad Return TupleLoad Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return NameLoad Assign NameStore ListComp Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Return Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad keyword NameLoad decorator_list AttributeLoad AttributeLoad NameLoad attr attr decorator_list
N/A N/A collections N/A gc N/A json N/A platform N/A socket N/A sys N/A traceback N/A jinja2 oslo_utils reflection oslo_utils strutils oslo_utils timeutils N/A six N/A stevedore N/A webob.dec N/A webob.exc N/A webob.response N/A N/A N/A greenlet N/A N/A N/A ImportError N/A N/A greenlet None oslo_middleware base _find_objects N/A N/A t N/A N/A N/A N/A o N/A o N/A N/A gc get_objects N/A isinstance o t N/A _expand_template N/A N/A contents params N/A N/A N/A tpl N/A N/A jinja2 Template source contents undefined N/A jinja2 StrictUndefined N/A N/A N/A tpl render params N/A Healthcheck N/A N/A base ConfigurableMiddleware N/A N/A Healthcheck middleware used for monitoring.

    If the path is /healthcheck, it will respond 200 with "OK" as the body.
    Or 503 with the reason as the body if one of the backend report
    an application issue.

    This is useful for the following reasons:

    1. Load balancers can 'ping' this url to determine service availability.
    2. Provides an endpoint that is similar to 'mod_status' in apache which
       can provide details (or no details, depending on if configured) about
       the activity of the server.

    Example requests/responses:

        $ curl -i -X HEAD "http://0.0.0.0:8775/status"
        HTTP/1.1 204 No Content
        Content-Type: text/plain; charset=UTF-8
        Content-Length: 0
        Date: Fri, 11 Sep 2015 18:55:08 GMT

        $ curl -i  "http://0.0.0.0:8775/status"
        HTTP/1.1 200 OK
        Content-Type: text/plain; charset=UTF-8
        Content-Length: 2
        Date: Fri, 11 Sep 2015 18:55:43 GMT

        OK

    Example of paste configuration:

    .. code-block:: ini

        [filter:healthcheck]
        paste.filter_factory = oslo_middleware:Healthcheck.factory
        path = /healthcheck
        backends = disable_by_file
        disable_by_file_path = /var/run/nova/healthcheck_disable

        [pipeline:public_api]
        pipeline = healthcheck sizelimit [...] public_service


    Multiple filter sections can be defined if it desired to have
    pipelines with different healthcheck configuration, example:

    .. code-block:: ini

        [pipeline:public_api]
        pipeline = healthcheck_public sizelimit [...] public_service

        [pipeline:admin_api]
        pipeline = healthcheck_admin sizelimit [...] admin_service

        [filter:healthcheck_public]
        paste.filter_factory = oslo_middleware:Healthcheck.factory
        path = /healthcheck_public
        backends = disable_by_file
        disable_by_file_path = /var/run/nova/healthcheck_public_disable

        [filter:healthcheck_admin]
        paste.filter_factory = oslo_middleware:Healthcheck.factory
        path = /healthcheck_admin
        backends = disable_by_file
        disable_by_file_path = /var/run/nova/healthcheck_admin_disable

    More details on available backends and their configuration can be found
    on this page: :doc:`healthcheck_plugins`.

     N/A NAMESPACE oslo.middleware.healthcheck N/A HEALTHY_TO_STATUS_CODES N/A True False N/A N/A N/A webob exc HTTPOk code N/A N/A N/A webob exc HTTPServiceUnavailable code N/A HEAD_HEALTHY_TO_STATUS_CODES N/A True False N/A N/A N/A webob exc HTTPNoContent code N/A N/A N/A webob exc HTTPServiceUnavailable code N/A PLAIN_RESPONSE_TEMPLATE 
{% for reason in reasons %}
{% if reason %}{{reason}}{% endif -%}
{% endfor %}
 N/A HTML_RESPONSE_TEMPLATE 
<HTML>
<HEAD><TITLE>Healthcheck Status</TITLE></HEAD>
<BODY>
{% if detailed -%}
<H1>Server status</H1>
{% if hostname -%}
<B>Server hostname:</B><PRE>{{hostname|e}}</PRE>
{%- endif %}
<B>Current time:</B><PRE>{{now|e}}</PRE>
<B>Python version:</B><PRE>{{python_version|e}}</PRE>
<B>Platform:</B><PRE>{{platform|e}}</PRE>
<HR></HR>
<H2>Garbage collector:</H2>
<B>Counts:</B><PRE>{{gc.counts|e}}</PRE>
<B>Thresholds:</B><PRE>{{gc.threshold|e}}</PRE>
<HR></HR>
{%- endif %}
<H2>Result of {{results|length}} checks:</H2>
<TABLE bgcolor="#ffffff" border="1">
<TBODY>
<TR>
{% if detailed -%}
<TH>
Kind
</TH>
<TH>
Reason
</TH>
<TH>
Details
</TH>
{% else %}
<TH>
Reason
</TH>
{%- endif %}
</TR>
{% for result in results -%}
{% if result.reason -%}
<TR>
{% if detailed -%}
    <TD>{{result.class|e}}</TD>
{%- endif %}
    <TD>{{result.reason|e}}</TD>
{% if detailed -%}
    <TD>{{result.details|e}}</TD>
{%- endif %}
</TR>
{%- endif %}
{%- endfor %}
</TBODY>
</TABLE>
<HR></HR>
{% if detailed -%}
{% if greenthreads -%}
<H2>{{greenthreads|length}} greenthread(s) active:</H2>
<TABLE bgcolor="#ffffff" border="1">
<TBODY>
{% for stack in greenthreads -%}
<TR>
    <TD><PRE>{{stack|e}}</PRE></TD>
</TR>
{%- endfor %}
</TBODY>
</TABLE>
<HR></HR>
{%- endif %}
{% if threads -%}
<H2>{{threads|length}} thread(s) active:</H2>
<TABLE bgcolor="#ffffff" border="1">
<TBODY>
{% for stack in threads -%}
<TR>
    <TD><PRE>{{stack|e}}</PRE></TD>
</TR>
{%- endfor %}
</TBODY>
</TABLE>
{%- endif %}
{%- endif %}
</BODY>
</HTML>
 __init__ N/A N/A self application conf N/A N/A N/A N/A N/A N/A super Healthcheck self __init__ application N/A N/A self _path N/A N/A conf get path /healthcheck N/A N/A self _show_details N/A N/A strutils bool_from_string N/A N/A conf get detailed N/A N/A self _backend_names N/A N/A backends N/A N/A conf get backends N/A backends N/A N/A N/A self _backend_names N/A N/A backends split , N/A N/A self _backends N/A N/A stevedore NamedExtensionManager N/A self NAMESPACE N/A self _backend_names name_order True invoke_on_load True invoke_args N/A conf N/A N/A self _accept_to_functor N/A N/A collections OrderedDict N/A N/A text/plain N/A self _make_text_response N/A text/html N/A self _make_html_response N/A application/json N/A self _make_json_response N/A N/A self _accept_order N/A tuple N/A N/A six iterkeys N/A self _accept_to_functor N/A N/A self _default_accept text/plain N/A _get_threadstacks N/A N/A N/A N/A N/A threadstacks N/A N/A N/A N/A active_frames N/A N/A sys _current_frames N/A N/A N/A AttributeError N/A N/A N/A N/A buf N/A N/A six StringIO N/A stack N/A N/A six itervalues active_frames N/A N/A N/A N/A traceback print_stack stack file buf N/A N/A N/A threadstacks append N/A N/A buf getvalue N/A N/A N/A buf seek 0 N/A N/A N/A buf truncate N/A threadstacks N/A staticmethod _get_greenstacks N/A N/A N/A N/A N/A greenstacks N/A N/A N/A greenlet None N/A N/A buf N/A N/A six StringIO N/A gt N/A _find_objects N/A greenlet greenlet N/A N/A N/A N/A traceback print_stack N/A gt gr_frame file buf N/A N/A N/A greenstacks append N/A N/A buf getvalue N/A N/A N/A buf seek 0 N/A N/A N/A buf truncate N/A greenstacks N/A staticmethod _pretty_json_dumps N/A N/A contents N/A N/A N/A N/A N/A json dumps contents indent 4 sort_keys True N/A staticmethod _are_results_healthy N/A N/A results N/A N/A N/A result results N/A N/A N/A N/A result available N/A N/A False N/A True N/A staticmethod _make_text_response N/A N/A self results healthy N/A N/A N/A params N/A reasons detailed N/A N/A result reason N/A result results N/A self _show_details N/A body N/A _expand_template N/A self PLAIN_RESPONSE_TEMPLATE params N/A N/A N/A N/A body strip text/plain N/A _make_json_response N/A N/A self results healthy N/A N/A N/A N/A self _show_details N/A N/A body N/A detailed python_version now platform gc True N/A sys version N/A str N/A N/A timeutils utcnow N/A N/A platform platform N/A counts threshold N/A N/A gc get_count N/A N/A gc get_threshold N/A reasons N/A N/A result results N/A N/A N/A N/A reasons append N/A reason details class N/A result reason N/A N/A result details N/A N/A reflection get_class_name result fully_qualified False N/A N/A body N/A reasons reasons N/A N/A body N/A greenthreads N/A N/A self _get_greenstacks N/A N/A body N/A threads N/A N/A self _get_threadstacks N/A N/A body N/A reasons detailed N/A N/A result reason N/A result results False N/A N/A N/A N/A self _pretty_json_dumps body application/json N/A _make_head_response N/A N/A self results healthy N/A N/A N/A N/A text/plain N/A _make_html_response N/A N/A self results healthy N/A N/A N/A N/A N/A hostname N/A N/A socket gethostname N/A N/A N/A N/A socket error N/A N/A hostname None N/A translated_results N/A N/A result results N/A N/A N/A N/A translated_results append N/A details reason class N/A N/A result details N/A result reason N/A N/A reflection get_class_name result fully_qualified False N/A params N/A healthy hostname results detailed now python_version platform gc threads greenthreads healthy hostname translated_results N/A self _show_details N/A str N/A N/A timeutils utcnow N/A sys version N/A N/A platform platform N/A counts threshold N/A N/A gc get_count N/A N/A gc get_threshold N/A N/A self _get_threadstacks N/A N/A self _get_threadstacks N/A body N/A _expand_template N/A self HTML_RESPONSE_TEMPLATE params N/A N/A N/A N/A body strip text/html N/A process_request N/A N/A self req N/A N/A N/A N/A N/A req path N/A self _path N/A N/A None N/A results N/A N/A N/A N/A ext obj healthcheck N/A req server_port N/A ext N/A self _backends N/A healthy N/A N/A self _are_results_healthy results N/A N/A N/A req method HEAD N/A N/A functor N/A self _make_head_response N/A status N/A N/A self HEAD_HEALTHY_TO_STATUS_CODES N/A healthy N/A N/A status N/A N/A self HEALTHY_TO_STATUS_CODES N/A healthy N/A accept_type N/A N/A N/A req accept best_match N/A self _accept_order N/A N/A accept_type N/A N/A accept_type N/A self _default_accept N/A functor N/A N/A self _accept_to_functor N/A accept_type N/A N/A body content_type N/A functor results healthy N/A N/A N/A N/A webob response Response status status body body content_type content_type N/A N/A N/A webob dec wsgify N/A