community.general.logentries – Sends events to Logentries

Note

This plugin is part of the community.general collection (version 3.8.3).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.logentries.

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 controller node that executes this callback.

  • whitelisting in configuration

  • certifi (python library)

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

Parameters

Parameter

Comments

api

string

URI to the Logentries API

Default: “data.logentries.com”

Configuration:

  • INI entry:

    [callback_logentries]
    api = data.logentries.com
    
  • Environment variable: LOGENTRIES_API

flatten

boolean

flatten complex data structures into a single dictionary with complex keys

Choices:

  • no ← (default)

  • yes

Configuration:

  • INI entry:

    [callback_logentries]
    flatten = no
    
  • Environment variable: LOGENTRIES_FLATTEN

port

string

HTTP port to use when connecting to the API

Default: 80

Configuration:

  • INI entry:

    [callback_logentries]
    port = 80
    
  • Environment variable: LOGENTRIES_PORT

tls_port

string

Port to use when connecting to the API when TLS is enabled

Default: 443

Configuration:

  • INI entry:

    [callback_logentries]
    tls_port = 443
    
  • Environment variable: LOGENTRIES_TLS_PORT

token

string / required

The logentries “TCP token”

Configuration:

  • INI entry:

    [callback_logentries]
    token = None
    
  • Environment variable: LOGENTRIES_ANSIBLE_TOKEN

use_tls

boolean

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

Choices:

  • no ← (default)

  • yes

Configuration:

  • INI entry:

    [callback_logentries]
    use_tls = no
    
  • Environment variable: LOGENTRIES_USE_TLS

Examples

examples: >
  To enable, add this to your ansible.cfg file in the defaults block

    [defaults]
    callback_whitelist = community.general.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

Authors

  • Unknown (!UNKNOWN)