The purpose of this document is to help with configuring and troubleshooting using TLS on the connection between Beats and Logstash.
You must configure TLS on both the client and server to make this work. This
| # encoding: UTF-8 | |
| require 'optparse' | |
| require 'net/http' | |
| require 'json' | |
| def parse_options(argv) | |
| opts = {} | |
| @parser = OptionParser.new do |o| |
| --- | |
| - hosts: foo | |
| vars: | |
| gems: | |
| libxml-ruby: { version: 2.6.0, state: present, include_dependencies: yes, user_install: no } | |
| shenzhen: { version: 0.13.1, state: present, include_dependencies: yes, user_install: no } | |
| gem_executable: /usr/local/rvm/ruby/blah/blah/1.2/gem | |
| tasks: | |
| - name: install a bunch of gems - warning, use the right executable and run as the right user! | |
| gem: |
| ## DNS | |
| @dns = Fog::DNS.new(:provider => 'Linode', :linode_api_key => LINODE_KEY) | |
| if @zone = @dns.zones.all.find { |z| z.domain == ZONE } | |
| puts "Found zone #{@zone.inspect}" | |
| else | |
| @zone = @dns.zones.create(:domain => ZONE, :email => ZONE_EMAIL) | |
| puts "Creating zone #{@zone.inspect}" | |
| end |
| input { | |
| redis { | |
| host => "127.0.0.1" | |
| type => "redis-input" | |
| # these settings should match the output of the agent | |
| data_type => "list" | |
| key => "logstash" | |
| # We use json_event here since the sender is a logstash agent | |
| message_format => "json_event" | |
| } |
| # Add this snippet to the top of your playbook. | |
| # It will install python2 if missing (but checks first so no expensive repeated apt updates) | |
| # gwillem@gmail.com | |
| - hosts: all | |
| gather_facts: False | |
| tasks: | |
| - name: install python 2 | |
| raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) |