Dashboards & Visualizations

Create a table from only certain fixed values

worldexplorer81
Path Finder

Hi,

I have a search that returns hundreds of results. Each result contains a field called jobName and another field called server
I need to build a table with 2 columns from a fixed set of JobNames. However, if one of the JobName in my defined list is not found in the search result, I need to return 'Not found'

Table should look like:
JobName server
JobA Server1
JobB Server2
JobE Not found
JobX Server6

Can anyone please help on how to generate the output above?
Thanks

Labels (1)
Tags (1)
0 Karma
1 Solution

adonio
Ultra Champion

can you share a sample of your data?
try and look into the fillnull command
https://docs.splunk.com/Documentation/Splunk/8.0.3/SearchReference/Fillnull

... your search ... | fields jobName server | table jobName server | fillnull value="Not found" server

hope it helps

View solution in original post

0 Karma

adonio
Ultra Champion

can you share a sample of your data?
try and look into the fillnull command
https://docs.splunk.com/Documentation/Splunk/8.0.3/SearchReference/Fillnull

... your search ... | fields jobName server | table jobName server | fillnull value="Not found" server

hope it helps

0 Karma

worldexplorer81
Path Finder

Thanks! The fillnull function works

0 Karma
Get Updates on the Splunk Community!

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...

Splunk Up Your Game: Why It's Time to Embrace Python 3.9+ and OpenSSL 3.0

Did you know that for Splunk Enterprise 9.4, Python 3.9 is the default interpreter? This shift is not just a ...