Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

HTTP Event Collector URI

$
0
0
I am trying to leverage Powershell to POST the event in form of JSON. The Invoke-WebRequest does not work well. Is these a way to validate the URI for HEC so as to rule out possibility of Wrong URI ? $Token = "B50D09B4-HG24-8N52-JN38-8h8ASD789998" $URL = "https://localhost:8088/services/collector" $Headers = @{"Authorization"=("Splunk " + $Token)} $Body = '{"event" : "Hello !"}' | ConvertTo-Json $Result = Invoke-WebRequest -URI $URL -Headers $Headers -Body $Body -Method POST -ContentType "Application/JSON"

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>