Skip to content

Instantly share code, notes, and snippets.

@BoredHackerBlog
Created August 21, 2023 02:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BoredHackerBlog/a922a841c58a4a5c71a77e641906cc95 to your computer and use it in GitHub Desktop.
Save BoredHackerBlog/a922a841c58a4a5c71a77e641906cc95 to your computer and use it in GitHub Desktop.
splunk free json ingest w/ persistence
version: "3.6"
services:
so1:
image: splunk/splunk:latest
container_name: so1
environment:
- SPLUNK_START_ARGS=--accept-license
- SPLUNK_PASSWORD=password
- SPLUNK_LICENSE_URI=Free
- SPLUNK_HEC_TOKEN=abcd1234
ports:
- 8000:8000
- 8088:8088
volumes:
- ./var:/opt/splunk/var #var and etc can be zipped and backed up
- ./etc:/opt/splunk/etc
[sources.events]
type = "file"
include = [ "/home/research/bulk_events.json" ]
data_dir = "/tmp/vector/"
read_from = "beginning"
[transforms.events_json]
type = "remap"
inputs = [ "events" ]
source = ". = parse_json!(.message)"
[sinks.splunk]
type = "splunk_hec_logs"
inputs = [ "events_json" ]
endpoint = "https://10.0.0.2:8088"
default_token = "abcd1234"
index = "win"
sourcetype = "mitre"
tls.verify_certificate=false
encoding.codec = "json"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment