Note
This plugin is part of the community.general collection (version 2.0.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.logstash
.
The below requirements are needed on the local controller node that executes this callback.
Parameter | Choices/Defaults | Configuration | Comments |
---|---|---|---|
format_version string added in 2.0.0 of community.general |
| ini entries: [callback_logstash] env:LOGSTASH_FORMAT_VERSION | Logging format |
port string | Default: 5000 | ini entries: [callback_logstash] added in 1.0.0 of community.general env:LOGSTASH_PORT | Port on which logstash is listening |
pre_command string added in 2.0.0 of community.general | ini entries: [callback_logstash] env:LOGSTASH_PRE_COMMAND | Executes command before run and result put to ansible_pre_command_output field. | |
server string | Default: "localhost" | ini entries: [callback_logstash] added in 1.0.0 of community.general env:LOGSTASH_SERVER | Address of the Logstash server |
type string | Default: "ansible" | ini entries: [callback_logstash] added in 1.0.0 of community.general env:LOGSTASH_TYPE | Message type |
ansible.cfg: | # Enable Callback plugin [defaults] callback_whitelist = community.general.logstash [callback_logstash] server = logstash.example.com port = 5000 pre_command = git rev-parse HEAD type = ansible 11-input-tcp.conf: | # Enable Logstash TCP Input input { tcp { port => 5000 codec => json add_field => { "[@metadata][beat]" => "notify" } add_field => { "[@metadata][type]" => "ansible" } } }
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/general/logstash_callback.html