logentries – Sends events to Logentries

New in version 2.0.

Synopsis

  • 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.

Requirements

The below requirements are needed on the local master node that executes this callback.

  • whitelisting in configuration

  • certifi (python library)

  • flatdict (python library), if you want to use the ‘flatten’ option

Parameters

Parameter Choices/Defaults Configuration Comments
api
-
Default:
"data.logentries.com"
ini entries:

[callback_logentries]
api = data.logentries.com

env:LOGENTRIES_API
URI to the Logentries API
flatten
boolean
Default:
"no"
ini entries:

[callback_logentries]
flatten = no

env:LOGENTRIES_FLATTEN
flatten complex data structures into a single dictionary with complex keys
port
-
Default:
80
ini entries:

[callback_logentries]
port = 80

env:LOGENTRIES_PORT
HTTP port to use when connecting to the API
tls_port
-
Default:
443
ini entries:

[callback_logentries]
tls_port = 443

env:LOGENTRIES_TLS_PORT
Port to use when connecting to the API when TLS is enabled
token
- / required
ini entries:

[callback_logentries]
token = VALUE

env:LOGENTRIES_ANSIBLE_TOKEN
The logentries "TCP token"
use_tls
boolean
Default:
"no"
ini entries:

[callback_logentries]
use_tls = no

env:LOGENTRIES_USE_TLS
Toggle to decide whether to use TLS to encrypt the communications with the API server

Examples

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

Status

Authors

  • UNKNOWN

Hint

If you notice any issues in this documentation, you can edit this document to improve it.

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.