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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Deep Dive: Accelerate threat investigation with Splunk’s AI Assistant in Security

AI is one of the biggest topics in the market today, and for security teams, its value goes far beyond the ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Detection Engineering Office Hours: Real-World Troubleshooting & Q&A

[REGISTER HERE] This thread is for the Community Office Hours session on Detection Engineering Office Hours: ...