cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • Use JMP Clinical with CDISC-compliant data. Review studies, ID safety and efficacy signals & communicate findings with interactive graphics. Register to see how. Aug. 27, 2 pm US ET.

Discussions

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

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

3 REPLIES 3
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;
RC_Flyer
Level II

Re: Logging to SPLUNK from a JMP script

At least in our SPLUNK instance the separator between Name and VALUE is a colon.  So, 
"event" => "Test message"

becomes

"event" : "Test message"

Re: Logging to SPLUNK from a JMP script

There are several Python packages that support logging to splunk.  It's far easier to utilize an existing Python package than having to roll your own REST handling interface code in JSL. 

My google query: python package for logging to splunk.

The top hit was

splunk-handler: A popular and widely used asynchronous logging handler that sends events to the Splunk HEC. It is designed to be a "drop-in" replacement for standard Python logging handlers.

With the Python Integration, you can utilize such packages and call from JSL with the Python Submit() or the Python Execute()

Recommended Articles