Hello,
I’ve been asked by a client to test the ability of the eWON to POST data in json format to a Splunk Cloud instance. I’ve been getting a 32603 status code when I run the function I wrote in Basic, and I’m not sure why. Here is part of the code:
Function Splunk_push($dataDate$, $dataName$, $value$)
$url$ = "https://input-prd-p-frlbjxrcdpsk.cloud.splunk.com:8088/services/collector"
$header$ = Auth$
$header$ = $header$ + "&content-type=application/json"
$myData$ = '{"time": '+$dataDate$+',"source": "test_ran2","event": {"tag": "'+$dataName$+'","value": '+$value$+'}}'
REQUESTHTTPX $url$,"POST",$header$,$myData$
stat% = GETSYS PRG,"ACTIONSTAT"
Print stat%
EndFn
As you can see, I concatinated the header with the authentication. I am sure that the values are correct because I copied each one (the url, header and myData) and paste them in Postman using the POST function. This worked in Postman, but for some reason isn’t working here using the REQUESTHTTPX function. Any idea why?
Thanks,
Yoni