Getting Data In

Access Splunk through ColdFusion

kmattern
Builder

Is it possible, and if so how, to dispatch searches in Splunk and display the results using Coldfusion. I have been looking at REST and cURL but can't quite wrap my head around getting either one to work with ColdFusion. I do not want to see ColdFusion logs I want to see search results displayed in ColdFusion pages.

if I do this

<html>
<head>
<title>Splunk Test</title>
</head>
<body>

<cfset tmp = {} />
<cfhttp url='https://localhost:8089/'  username="admin"  password="changeme" result="r" method="post" >
<cfhttpparam type="header" name="content-type" value="application/json" />

<cfhttpparam type="body" value="#serializeJson(tmp)#" />
</cfhttp>

<cfdump var="#r#" />

</body>
</html>

I get the following response

struct

Charset [empty string]  
ErrorDetail I/O Exception: sun.security.validator.ValidatorException: PKIX path building failed: java.security.cert.CertPathBuilderException: Could not build a validated path.  
Filecontent Connection Failure  
Header [empty string]  
Mimetype Unable to determine MIME type of file.  
Responseheader 

struct [empty]

Statuscode Connection Failure. Status code unavailable.  
Text YES 

Is what I am trying even possible?

0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

Yes, what you are doing is possible. The error you see is from Coldfusion trying to validate the Splunk server certificate. Is it self-signed? then you need to turn the https validation off. Check out http://dev.splunk.com/sdks and see if one of those SDKs would help.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...