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!

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...