Module Expr Str ImportFrom alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias Import alias Import alias identifier TryExcept body Import alias handlers ExceptHandler type NameLoad body Pass Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str FunctionDef arguments args defaults body If UnaryOpNot Call NameLoad ListLoad CompareIn Str NameLoad CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Str Return NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore NameStore NameStore NameLoad If CompareIn Str NameLoad body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Num If BoolOpAnd CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str orelse Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Call AttributeLoad NameLoad attr Str Str Expr Yield NameLoad If CompareIn Str NameLoad body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Num Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Num If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str orelse Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Call AttributeLoad NameLoad attr Str Str Expr Yield NameLoad If BoolOpAnd CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Expr Yield NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str Str Num body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Return BinOpAdd SubscriptLoad Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr attr Slice Num Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Dict Str Str Str Str Str Str Str Str Call AttributeLoad NameLoad attr NameLoad Dict Str Str Str Str Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr ListLoad Str AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore SubscriptLoad NameLoad Index Str Index Str Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If CompareIn NameLoad TupleLoad Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str body Continue If CompareIs NameLoad NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index Str Index NameLoad NameLoad Continue If Call NameLoad NameLoad TupleLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index Str Index NameLoad NameLoad Continue Assign SubscriptStore SubscriptLoad NameLoad Index Str Index NameLoad Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Num Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad Str AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If CompareIn NameLoad TupleLoad Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str body Continue If CompareIs NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad Continue If Call NameLoad NameLoad TupleLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad Continue Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad AttributeLoad NameLoad attr attr body Expr Str FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults AttributeLoad NameLoad attr Num body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If BoolOpOr UnaryOpNot Call NameLoad NameLoad Str CompareNotEq AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareIsNot AttributeLoad NameLoad attr NameLoad body If Call NameLoad AttributeLoad NameLoad attr Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMult Num Num orelse If CompareIsNot Call NameLoad NameLoad Str NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr BinOpMult Num Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIs AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list
N/A N/A 
    Logstash Logging Handler
    ========================

    .. versionadded:: 0.17.0

    This module provides some `Logstash`_ logging handlers.


    UDP Logging Handler
    -------------------

    For versions of `Logstash`_ before 1.2.0:

    In the salt configuration file:

    .. code-block:: yaml

        logstash_udp_handler:
          host: 127.0.0.1
          port: 9999
          version: 0

    In the `Logstash`_ configuration file:

    .. code-block:: text

        input {
          udp {
            type => "udp-type"
            format => "json_event"
          }
        }

    For version 1.2.0 of `Logstash`_ and newer:

    In the salt configuration file:

    .. code-block:: yaml

        logstash_udp_handler:
          host: 127.0.0.1
          port: 9999
          version: 1

    In the `Logstash`_ configuration file:

    .. code-block:: text

        input {
          udp {
            port => 9999
            codec => json
          }
        }

    Please read the `UDP input`_ configuration page for additional information.


    ZeroMQ Logging Handler
    ----------------------

    For versions of `Logstash`_ before 1.2.0:

    In the salt configuration file:

    .. code-block:: yaml

        logstash_zmq_handler:
          address: tcp://127.0.0.1:2021
          version: 0

    In the `Logstash`_ configuration file:

    .. code-block:: text

        input {
          zeromq {
            type => "zeromq-type"
            mode => "server"
            topology => "pubsub"
            address => "tcp://0.0.0.0:2021"
            charset => "UTF-8"
            format => "json_event"
          }
        }

    For version 1.2.0 of `Logstash`_ and newer:

    In the salt configuration file:

    .. code-block:: yaml

        logstash_zmq_handler:
          address: tcp://127.0.0.1:2021
          version: 1

    In the `Logstash`_ configuration file:

    .. code-block:: text

        input {
          zeromq {
            topology => "pubsub"
            address => "tcp://0.0.0.0:2021"
            codec => json
          }
        }

    Please read the `ZeroMQ input`_ configuration page for additional
    information.

    .. admonition:: Important Logstash Setting

        One of the most important settings that you should not forget on your
        `Logstash`_ configuration file regarding these logging handlers is
        ``format``.
        Both the `UDP` and `ZeroMQ` inputs need to have ``format`` as
        ``json_event`` which is what we send over the wire.


    Log Level
    .........

    Both the ``logstash_udp_handler`` and the ``logstash_zmq_handler``
    configuration sections accept an additional setting ``log_level``. If not
    set, the logging level used will be the one defined for ``log_level`` in
    the global configuration file section.

    HWM
    ...

    The `high water mark`_ for the ZMQ socket setting. Only applicable for the
    ``logstash_zmq_handler``.



    .. admonition:: Inspiration

        This work was inspired in `pylogstash`_, `python-logstash`_, `canary`_
        and the `PyZMQ logging handler`_.


    .. _`Logstash`: http://logstash.net
    .. _`canary`: https://github.com/ryanpetrello/canary
    .. _`pylogstash`: https://github.com/turtlebender/pylogstash
    .. _`python-logstash`: https://github.com/vklochan/python-logstash
    .. _`PyZMQ logging handler`: https://github.com/zeromq/pyzmq/blob/master/zmq/log/handlers.py
    .. _`UDP input`: http://logstash.net/docs/latest/inputs/udp
    .. _`ZeroMQ input`: http://logstash.net/docs/latest/inputs/zeromq
    .. _`high water mark`: http://api.zeromq.org/3-2:zmq-setsockopt

 __future__ absolute_import N/A os N/A json N/A logging N/A logging.handlers N/A datetime salt.log.setup LOG_LEVELS salt.log.mixins NewStyleClassMixIn N/A salt.utils.network N/A salt.ext.six six N/A N/A N/A zmq N/A N/A N/A ImportError N/A N/A N/A log N/A N/A logging getLogger __name__ N/A __virtualname__ logstash __virtual__ N/A N/A N/A N/A N/A N/A N/A any N/A N/A logstash_udp_handler __opts__ N/A logstash_zmq_handler __opts__ N/A N/A N/A N/A log trace None of the required configuration sections, 'logstash_udp_handler' and 'logstash_zmq_handler', were found in the configuration. Not loading the Logstash logging handlers module. N/A False N/A __virtualname__ N/A setup_handlers N/A N/A N/A N/A N/A host port address None N/A N/A logstash_udp_handler __opts__ N/A N/A host N/A N/A N/A __opts__ N/A logstash_udp_handler get host None N/A port N/A N/A N/A __opts__ N/A logstash_udp_handler get port None N/A version N/A N/A N/A __opts__ N/A logstash_udp_handler get version 0 N/A N/A N/A host None N/A port None N/A N/A N/A N/A log debug The required 'logstash_udp_handler' configuration keys, 'host' and/or 'port', are not properly configured. Not configuring the logstash UDP logging handler. N/A N/A logstash_formatter N/A LogstashFormatter version version N/A udp_handler N/A DatagramLogstashHandler host port N/A N/A N/A udp_handler setFormatter logstash_formatter N/A N/A N/A udp_handler setLevel N/A LOG_LEVELS N/A N/A N/A N/A __opts__ N/A logstash_udp_handler get log_level N/A N/A __opts__ get log_level error N/A N/A udp_handler N/A N/A logstash_zmq_handler __opts__ N/A N/A address N/A N/A N/A __opts__ N/A logstash_zmq_handler get address None N/A zmq_hwm N/A N/A N/A __opts__ N/A logstash_zmq_handler get hwm 1000 N/A version N/A N/A N/A __opts__ N/A logstash_zmq_handler get version 0 N/A N/A address None N/A N/A N/A N/A log debug The required 'logstash_zmq_handler' configuration key, 'address', is not properly configured. Not configuring the logstash ZMQ logging handler. N/A N/A logstash_formatter N/A LogstashFormatter version version N/A zmq_handler N/A ZMQLogstashHander address zmq_hwm zmq_hwm N/A N/A N/A zmq_handler setFormatter logstash_formatter N/A N/A N/A zmq_handler setLevel N/A LOG_LEVELS N/A N/A N/A N/A __opts__ N/A logstash_zmq_handler get log_level N/A N/A __opts__ get log_level error N/A N/A zmq_handler N/A N/A N/A host None N/A port None N/A address None N/A N/A N/A False N/A LogstashFormatter N/A N/A logging Formatter NewStyleClassMixIn N/A __init__ N/A N/A self msg_type msg_path version N/A logstash logstash 0 N/A N/A N/A self msg_path msg_path N/A N/A self msg_type msg_type N/A N/A self version version N/A N/A self format N/A getattr self N/A N/A format_v{0} format version N/A N/A N/A N/A super LogstashFormatter self __init__ fmt None datefmt None N/A formatTime N/A N/A self record datefmt N/A None N/A N/A N/A N/A N/A N/A N/A N/A N/A datetime datetime utcfromtimestamp N/A record created isoformat N/A -3 Z N/A format_v0 N/A N/A self record N/A N/A N/A host N/A N/A N/A N/A salt utils network get_fqhostname N/A message_dict N/A @timestamp @fields @message @source @source_host @source_path @tags @type N/A N/A self formatTime record N/A levelname logger lineno pathname process threadName funcName processName N/A record levelname N/A record name N/A record lineno N/A record pathname N/A record process N/A record threadName N/A record funcName N/A record processName N/A N/A record getMessage N/A N/A {0}://{1}/{2} format N/A self msg_type host N/A self msg_path host N/A self msg_path N/A salt N/A self msg_type N/A N/A record exc_info N/A N/A N/A N/A message_dict N/A @fields N/A exc_info N/A N/A self formatException N/A record exc_info N/A N/A key value N/A N/A six iteritems N/A record __dict__ N/A N/A N/A key N/A args asctime created exc_info exc_text filename funcName id levelname levelno lineno module msecs msecs message msg name pathname process processName relativeCreated thread threadName N/A N/A N/A N/A value None N/A N/A N/A N/A message_dict N/A @fields N/A key value N/A N/A N/A isinstance value N/A N/A six string_types bool dict float int list N/A N/A N/A N/A message_dict N/A @fields N/A key value N/A N/A N/A N/A message_dict N/A @fields N/A key N/A repr value N/A N/A N/A json dumps message_dict N/A format_v1 N/A N/A self record N/A N/A N/A message_dict N/A @version @timestamp host levelname logger lineno pathname process threadName funcName processName message tags type 1 N/A N/A self formatTime record N/A N/A N/A N/A salt utils network get_fqhostname N/A record levelname N/A record name N/A record lineno N/A record pathname N/A record process N/A record threadName N/A record funcName N/A record processName N/A N/A record getMessage N/A salt N/A self msg_type N/A N/A record exc_info N/A N/A N/A message_dict N/A exc_info N/A N/A self formatException N/A record exc_info N/A N/A key value N/A N/A six iteritems N/A record __dict__ N/A N/A N/A key N/A args asctime created exc_info exc_text filename funcName id levelname levelno lineno module msecs msecs message msg name pathname process processName relativeCreated thread threadName N/A N/A N/A N/A value None N/A N/A N/A message_dict N/A key value N/A N/A N/A isinstance value N/A N/A six string_types bool dict float int list N/A N/A N/A message_dict N/A key value N/A N/A N/A message_dict N/A key N/A repr value N/A N/A N/A json dumps message_dict N/A N/A DatagramLogstashHandler N/A N/A N/A logging handlers DatagramHandler N/A N/A 
    Logstash UDP logging handler.
     makePickle N/A N/A self record N/A N/A N/A N/A N/A self format record N/A N/A ZMQLogstashHander N/A N/A logging Handler NewStyleClassMixIn N/A N/A 
    Logstash ZMQ logging handler.
     __init__ N/A N/A self address level zmq_hwm N/A N/A logging NOTSET 1000 N/A N/A N/A N/A N/A super ZMQLogstashHander self __init__ level level N/A N/A self _context N/A self _publisher None N/A N/A self _address address N/A N/A self _zmq_hwm zmq_hwm N/A N/A self _pid N/A N/A os getpid N/A publisher N/A N/A self N/A N/A N/A current_pid N/A N/A os getpid N/A N/A N/A N/A getattr self _publisher N/A N/A self _pid current_pid N/A N/A N/A self _pid current_pid N/A N/A self _context N/A N/A zmq Context N/A N/A self _publisher N/A N/A N/A self _context socket N/A zmq PUB N/A N/A N/A N/A N/A N/A self _publisher setsockopt N/A zmq HWM N/A self _zmq_hwm N/A N/A N/A AttributeError N/A N/A N/A N/A N/A self _publisher setsockopt N/A zmq SNDHWM N/A self _zmq_hwm N/A N/A N/A N/A self _publisher setsockopt N/A zmq RCVHWM N/A self _zmq_hwm N/A N/A N/A N/A self _publisher connect N/A self _address N/A N/A self _publisher N/A property emit N/A N/A self record N/A N/A N/A formatted_object N/A N/A self format record N/A N/A N/A N/A self publisher send formatted_object N/A close N/A N/A self N/A N/A N/A N/A N/A self _context None N/A N/A N/A hasattr N/A self _context destroy N/A N/A N/A N/A N/A self _context destroy N/A 1 1000 N/A N/A N/A N/A getattr self _publisher None None N/A N/A N/A N/A N/A self _publisher setsockopt N/A zmq LINGER N/A 1 1000 N/A N/A N/A N/A self _publisher close N/A N/A N/A N/A self _context closed False N/A N/A N/A N/A N/A self _context term N/A N/A