Splunk Dev

Returning errors in UI views SearchFlashMessages or alert-error

peter_m
Loves-to-Learn Lots

I'm trying to get my custom python generating command to output warnings or alerts below the search bar in the UI.

If I raise an exception, it displays there automatically, but like all exceptions it's messy.  I'd like to be able to catch the exception and format it correctly, or better still just write out the warning message for it to be picked up by the GUI.

It looks like I should create some custom [messages.conf] stanza and include that Name and formatting in the message.

[PYTHONSCRIPT:RESULTS_S_S]

message = Expecting %s results, server provided %s

The current logging is going to search.log (CHUNKEDEXTPROCESSORVIASTDERRLOGGER) but not reaching info.csv (infoPath).

Thanks in advance

 

 

0 Karma

peter_m
Loves-to-Learn Lots

Forgot to mention: would this be done via an update to the job status (while it's running)? If so please share any example code.. thanks

0 Karma
Get Updates on the Splunk Community!

Faster Insights with AI, Streamlined Cloud-Native Operations, and More New Lantern ...

Splunk Lantern is a Splunk customer success center that provides practical guidance from Splunk experts on key ...

Splunk Enterprise Security: Your Command Center for PCI DSS Compliance

Every security professional knows the drill. The PCI DSS audit is approaching, and suddenly everyone's asking ...

Developer Spotlight with Guilhem Marchand

From Splunk Engineer to Founder: The Journey Behind TrackMe    After spending over 12 years working full time ...