Splunk Search

How to extract values in a field?

mdmaala
Communicator

In my table, I have a field named Username, and it has two values: Machine 1 and 2. I only want to show Machine1 only without showing Machine2. How would I do this? thanks!

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Add | search Username=Machine1 to your query.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

woodcock
Esteemed Legend

Like this:

... | eval Username = mvindex(Username, 0)
0 Karma

mdmaala
Communicator

I did this but it still shows both machine 1 and 2

0 Karma

renjith_nair
Legend

@mdmaala,

Is it a multi value field or delimiter(comma,space,etc) separated? Can you share some sample events of the field?

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Add | search Username=Machine1 to your query.

---
If this reply helps you, Karma would be appreciated.
0 Karma

mdmaala
Communicator

I did this and this works! but in my graph it still leaves a gap for machine 2 values for every timestamp registered, is there anyway that I can remove that in the graph and show the values for machine 1 only?

0 Karma

mdmaala
Communicator

thanks! I was able to search only for Machine1 values. but in my graph it still leaves a space for machine 2. I only want to graph values for machine 1

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...