Reporting

Add a new field/table column with preset data (conditional)

phamxuantung
Communicator

I'm extracting data from a raw log and put it on a table, now I want to add a column that indicate the action that admin should take if a port is downed, it's kind of like this

 

 

Time|System|Domain|Status    |Action
--------------------------------
XXX |XXX   |XXX   |DOWN      |Call IT
XXX |XXX   |XXX   |infiltrate|Call Security

 

 

In here, the Action field/column is a newly created data that not in the raw log but generated based on the Status's value, like "Call IT" if the Status is DOWN, or "Call Security" if Status is Infiltrate.

Is there anyway to archive this?

Labels (1)
0 Karma
1 Solution

scelikok
SplunkTrust
SplunkTrust

Hi @phamxuantung,

You can create Action field based on Status fields adding below eval command;

| eval Action=case(Status="DOWN","Call IT",Status="infiltrate","Call Security")

 

If this reply helps you an upvote is appreciated.

If this reply helps you an upvote and "Accept as Solution" is appreciated.

View solution in original post

scelikok
SplunkTrust
SplunkTrust

Hi @phamxuantung,

You can create Action field based on Status fields adding below eval command;

| eval Action=case(Status="DOWN","Call IT",Status="infiltrate","Call Security")

 

If this reply helps you an upvote is appreciated.

If this reply helps you an upvote and "Accept as Solution" is appreciated.

phamxuantung
Communicator

Thank you, that's exactly what I need

0 Karma
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...