cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
RC_Flyer
Level I

Logging to SPLUNK from a JMP script

Has anyone written JSL to send messages to a SPLUNK instance?  The idea would be to capture all of the log messages from multiple applications in a single spot

1 REPLY 1
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Logging to SPLUNK from a JMP script

I've not used splunk but the idea of central logging is a good one. It does look easy enough to send data to splunk once the server is set up.  This is not tested, but something close to this should do the trick:

New HTTP Request(
	URL( "https://your-hostname:8088/services/collector" ),
	Method( "POST" ),
	Headers([
		"Accept" => "application/json",
		"Authorization" => "Splunk your-hec-token"
	]),
	JSON([
		"event" => "Test message",
		"sourcetype" => "jmp/jsl"
	])
) << Send;

Recommended Articles