community.general.logstash – Sends events to Logstash¶
Note
This plugin is part of the community.general collection (version 2.5.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.logstash
.
Synopsis¶
This callback will report facts and task events to Logstash https://www.elastic.co/products/logstash
Requirements¶
The below requirements are needed on the local controller node that executes this callback.
whitelisting in configuration
logstash (python library)
Parameters¶
Examples¶
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" }
}
}
Authors¶
Yevhen Khmelenko (@ujenmr)