overipio.splunk-universalforwarder
Splunk Universal Forwarder Ansible Role
Simple installation and setup of a Splunk forwarder.
Role Variables
Right now, all input and output configuration files for Splunk are set up using variables, which you can see in the defaults below.
# SYSTEM RELATED
# User under which Splunk forwarder will run
splunkforwarder_system_user: splunk
splunkforwarder_path: /opt/splunkforwarder
splunkforwarder_start_on_boot: yes
splunkforwarder_get_via_curl: no
# PACKAGE LOCATION
# Download link for the Splunk forwarder binary
splunkforwarder_url: 'https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=6.5.1&product=universalforwarder&filename=splunkforwarder-6.5.1-f74036626f0c-Linux-x86_64.tgz&wget=true'
splunkforwarder_filename: 'splunkforwarder-6.5.1-f74036626f0c-Linux-x86_64.tgz'
splunkforwarder_md5: 'md5:e8468b95b4ca03f73f33714a4430c82e'
# AUTH RELATED
# Login details
splunkforwarder_user: admin
splunkforwarder_pass: changeme
# DEPLOYMENT SERVER
# Set up if you're using a Splunk Deployment Server
# splunkforwarder_deployment_server:
# DEFAULT INDEX
splunkforwarder_default_index: default
# CONFIG FILE CONTENTS
# Here are the configuration files we want to set up
splunkforwarder_outputs: |
defaultGroup = primary
[tcpout:primary]
server = localhost:9997
# Add input configurations here, basic defaults included
splunkforwarder_inputs: |
[default]
index = {{ splunkforwarder_default_index }}
[monitor://$SPLUNK_HOME/var/log/splunk]
index = _internal
Example Playbook
- hosts: servers
roles:
- overipio.splunk-universalforwarder
To add more monitors to an existing installation:
- hosts: servers
vars:
- splunkforwarder_inputs_monitor:
- path: "/opt/applications/helloworld/*.log"
sourcetype: application_log
index: differentindex
- path: "/opt/foo/bar.log"
roles:
- overipio.splunk-universalforwarder
Informazioni sul progetto
Role to setup a machine with splunk forwarder install and configuration
Installa
ansible-galaxy install overipio.splunk-universalforwarder
Licenza
Unknown
Download
349
Proprietario