Secrets in Splunk

Store Splunk HEC tokens as secrets for Splunk destination nodes.

Store your Splunk HEC token as a secret for Splunk destination nodes.

Splunk HEC Destination

Secret to create:

Secret NameDescription
splunk-hec-tokenYour Splunk HEC token

Splunk Destination Node:

- name: splunk_destination
  type: splunk_output
  endpoint: https://splunk.example.com:8088
  token: '{{ SECRET splunk-hec-token }}'

Multiple Splunk Destinations

If you send data to multiple Splunk instances, create separate secrets for each.

Secrets to create:

Secret NameDescription
splunk-hec-token-prodProduction Splunk HEC token
splunk-hec-token-stagingStaging Splunk HEC token

Multiple Splunk Destinations:

- name: splunk_prod
  type: splunk_output
  endpoint: https://splunk-prod.example.com:8088
  token: '{{ SECRET splunk-hec-token-prod }}'

- name: splunk_staging
  type: splunk_output
  endpoint: https://splunk-staging.example.com:8088
  token: '{{ SECRET splunk-hec-token-staging }}'

See Also