splunk – Sends task result events to Splunk HTTP Event Collector — Ansible Documentation

- AnsibleFest
- Products
- Community
- Webinars & Training
- Blog

Documentation

# splunk – Sends task result events to Splunk HTTP Event Collector

New in version 2.7.

- Synopsis
- Requirements
- Parameters
- Examples
- Status

## Synopsis

- This callback plugin will send task results as JSON formatted events to a Splunk HTTP collector.
- The companion Splunk Monitoring & Diagnostics App is available here “https://splunkbase.splunk.com/app/4023/”
- Credit to “Ryan Currah (@ryancurrah)” for original source upon which this is based.

## Requirements

The below requirements are needed on the local master node that executes this callback.

- Whitelisting this callback plugin
- Create a HTTP Event Collector in Splunk
- Define the url and token in ansible.cfg

## Parameters

Parameter | Choices/Defaults | Configuration | Comments
--- | --- | --- | ---
authtoken - |  | ini entries: [callback_splunk] authtoken = VALUE env:SPLUNK_AUTHTOKEN | Token to authenticate the connection to the Splunk HTTP collector
url - |  | ini entries: [callback_splunk] url = VALUE env:SPLUNK_URL | URL to the Splunk HTTP collector source

## Examples

    examples: >
      To enable, add this to your ansible.cfg file in the defaults block
        [defaults]
        callback_whitelist = splunk
      Set the environment variable
        export SPLUNK_URL=http://mysplunkinstance.datapaas.io:8088/services/collector/event
        export SPLUNK_AUTHTOKEN=f23blad6-5965-4537-bf69-5b5a545blabla88
      Set the ansible.cfg variable in the callback_splunk block
        [callback_splunk]
        url = http://mysplunkinstance.datapaas.io:8088/services/collector/event
        authtoken = f23blad6-5965-4537-bf69-5b5a545blabla88

## Status

- This callback is not guaranteed to have a backwards compatible interface. [preview]
- This callback is maintained by the Ansible Community. [community]

### Authors

- Stuart Hirst <support@convergingdata.com>

Hint

If you notice any issues in this documentation you can edit this document to improve it.