Splunk Search

There is a way to send some fileds of an alert to a kvs lookup?

AleCanzo
Explorer

Hi, this is my first interaction with Splunk Community so be patient please 🙂 
I'm trying to output some fields from an Alert to a kvs lookup. I'm using a Lookup editor app and a KVS app, but probably i'm missing some theory. Thanks!

Labels (1)
0 Karma

AleCanzo
Explorer

No, i'm trying to do something different. Every time my Alert is triggered, i want to output some fields (like severity, expiration, ss_name...) to a kvs lookup. Then i want to see the lookup on a dashboard: i'm doing this cause i'm trying to create an app where i can manage alerts (like Alert Manager). Of course i can just create a dashboard where i table all the events from the Alert, but then i'm not sure i'm going to be able to modify the table.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Without concrete examples, I can only guess what might work, but you could try using appendpipe. For example:

<your search to determine whether an alert should be raised>
| appendpipe
  [| eval alert_raised=time() ``` Create a field to show when the alert was raised ```
   ``` Reduce fields to only those required (including alert_raised) ```
   | table severity, expiration, ss_name, alert_raised
   ``` Output fields to lookup ```
   | outputlookup alerts_raised.csv append=true
   ``` Remove appended events ```
   | where isnull(alert_raised)]

livehybrid
SplunkTrust
SplunkTrust

Hi @AleCanzo 

You can use outputlookup (https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/outputlookup) in your query to output the fields in your results to a KV Store, just the same as a CSV lookup - is this what you're looking to achieve?

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...