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!

Analytics Workspace deprecation

As of Splunk Cloud Platform 10.4.2604 and Splunk Enterprise 10.4, Analytics Workspace is now deprecated. ...

Splunk Developer Day Recap: Building, Publishing, and Growing on the Splunk Platform

Splunk Developer Day brought the Splunk developer community together for a practical look at what it means to ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...