??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
σ
ΰUdac @` sr d d l m Z m Z m Z e Z d Z d Z d d l Z d d l Z d d l
Z
d d l Z d d l Z y d d l
Z
e Z Wn e k
r e Z n Xy d d l Z e Z Wn e k
rΙ e Z n Xd d l m Z m Z d d l m Z d e f d YZ y d d l Z e Z Wn e k
r;e Z e Z n Xd e f d
YZ e Z d e f d YZ d S(
i ( t absolute_importt divisiont print_functions
callback: logentries
type: notification
short_description: Sends events to Logentries
description:
- This callback plugin will generate JSON objects and send them to Logentries via TCP for auditing/debugging purposes.
- Before 2.4, if you wanted to use an ini configuration, the file must be placed in the same directory as this plugin and named logentries.ini
- In 2.4 and above you can just put it in the main Ansible configuration file.
version_added: "2.0"
requirements:
- whitelisting in configuration
- certifi (python library)
- flatdict (python library), if you want to use the 'flatten' option
options:
api:
description: URI to the Logentries API
env:
- name: LOGENTRIES_API
default: data.logentries.com
ini:
- section: callback_logentries
key: api
port:
description: HTTP port to use when connecting to the API
env:
- name: LOGENTRIES_PORT
default: 80
ini:
- section: callback_logentries
key: port
tls_port:
description: Port to use when connecting to the API when TLS is enabled
env:
- name: LOGENTRIES_TLS_PORT
default: 443
ini:
- section: callback_logentries
key: tls_port
token:
description: The logentries "TCP token"
env:
- name: LOGENTRIES_ANSIBLE_TOKEN
required: True
ini:
- section: callback_logentries
key: token
use_tls:
description:
- Toggle to decide whether to use TLS to encrypt the communications with the API server
env:
- name: LOGENTRIES_USE_TLS
default: False
type: boolean
ini:
- section: callback_logentries
key: use_tls
flatten:
description: flatten complex data structures into a single dictionary with complex keys
type: boolean
default: False
env:
- name: LOGENTRIES_FLATTEN
ini:
- section: callback_logentries
key: flatten
s
examples: >
To enable, add this to your ansible.cfg file in the defaults block
[defaults]
callback_whitelist = logentries
Either set the environment variables
export LOGENTRIES_API=data.logentries.com
export LOGENTRIES_PORT=10000
export LOGENTRIES_ANSIBLE_TOKEN=dd21fc88-f00a-43ff-b977-e3a4233c53af
Or in the main Ansible config file
[callback_logentries]
api = data.logentries.com
port = 10000
tls_port = 20000
use_tls = no
token = dd21fc88-f00a-43ff-b977-e3a4233c53af
flatten = False
N( t to_bytest to_text( t CallbackBaset PlainTextSocketAppenderc B` s> e Z d d d d Z d Z d Z d Z d Z RS( s data.logentries.comiP i» c C` sU | | _ | | _ | | _ d | _ d | _ d | _ d | _ | | _ d | _ d S( NgΉ?i
sG
It appears the LOGENTRIES_TOKEN parameter you entered is incorrect!
u β¨(
t LE_APIt LE_PORTt LE_TLS_PORTt MIN_DELAYt MAX_DELAYt
INVALID_TOKENt LINE_SEPt _displayt Nonet _conn( t selft displayR R R ( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/callback/logentries.pyt __init__z s c C` s; t j t j t j | _ | j j | j | j f d S( N( t sockett AF_INETt SOCK_STREAMR t connectR R ( R ( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/callback/logentries.pyt open_connection s c C` sέ | j | j } xΓ t rΨ y | j d SWn- t k
r] } | j j d t | n X| d 9} | | j k r | j } n | t j
d | } y% | j j d | t j | Wq t
k
rΤ q Xq Wd S( Nu# Unable to connect to Logentries: %si i s sleeping %s before retry( t close_connectionR
t TrueR t ExceptionR t vvvvR R t randomt uniformt timet sleept KeyboardInterrupt( R t
root_delayt et wait_for( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/callback/logentries.pyt reopen_connection s"
c C` s# | j d k r | j j n d S( N( R R t close( R ( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/callback/logentries.pyR € s c C` s t | d d } | j d | j } | d 7} xO t r y | j j t | d d Wn! t j k
r} | j q4 n XPq4 W| j
d S( Nt errorst surrogate_or_strictu
( R t replaceR
R R t sendR R t errorR% R ( R t datat multiline( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/callback/logentries.pyt put¨ s
( t __name__t
__module__R R R% R R. ( ( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/callback/logentries.pyR y s
t TLSSocketAppenderc B` s e Z d Z RS( c C` s t j t j t j } t j d | d d d d d t d t j d t t d t j d t
j d t d
t } | j
| j | j f | | _ d S( Nt sockt keyfilet certfilet server_sidet cert_reqst ssl_versiont PROTOCOL_TLSv1_2t ca_certst do_handshake_on_connectt suppress_ragged_eofs( R R R t sslt wrap_socketR t Falset
CERT_REQUIREDt getattrt PROTOCOL_TLSv1t certifit whereR R R R R ( R R2 ( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/callback/logentries.pyR Γ s ( R/ R0 R ( ( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/callback/logentries.pyR1 Β s t CallbackModulec B` s€ e Z d Z d Z d Z e Z d Z d d d d Z d Z
d Z d Z d Z
d Z e d
Z d d Z d Z d
Z d Z d Z RS( g @t notificationt
logentriesc C` sp t t | j t s, | j j d n t sN t | _ | j j d n t t
j | _ d | _
d S( Ns4 Unable to import ssl module. Will send over port 80.sW The `certifi` python module is not installed.
Disabling the Logentries callback plugin.i
( t superRD R t HAS_SSLR t warningt HAS_CERTIFIR t disabledt strt uuidt uuid4t le_jobidt timeout( R ( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/callback/logentries.pyR ά s c C` s; t t | j d | d | d | y^ | j d | _ | j d | _ | j d | _ | j d | _ | j d | _ Wn6 t k
r» } | j
j d t | t
| _ n Xy | j d
| _ Wn, t k
r } | j
j d t
| _ n X| j r-t r-t
| _ | j
j d n | j d S(
Nt task_keyst var_optionst directt apit portt tls_portt use_tlst flattenu1 Missing option for Logentries callback plugin: %st tokens[ Logentries token was not provided, this is required for this callback to operate, disablingsw You have chosen to flatten and the `flatdict` python module is not installed.
Disabling the Logentries callback plugin.( RG RD t set_optionst
get_optiont api_urlt api_portt api_tls_portRW RX t KeyErrorR RI R R RK RY t HAS_FLATDICTt _initialize_connections( R RQ RR RS R# ( ( sG /usr/lib/python2.7/site-packages/ansible/plugins/callback/logentries.pyRZ ξ s&