Splunk Search

How to fake field values

splunkatl
Path Finder

In our logs I will get field values like
err=0
err=1
.
.
.
err=49

I am able to get the results when run search against "err" field. showing table as below
err count percent
0 10 100.00%

I want to show the results as
err count percent
Success 10 100.00%

How can I rename the values in fields,is it possible if fields value is 0 then show it as "Success"

Tags (3)
0 Karma
1 Solution

alacercogitatus
SplunkTrust
SplunkTrust

You can use a lookup. http://docs.splunk.com/Documentation/Splunk/5.0/Knowledge/Addfieldsfromexternaldatasources

So the search would be something like: foo_search| lookup ldapLookup err OUTPUT description | top description

View solution in original post

alacercogitatus
SplunkTrust
SplunkTrust

You can use a lookup. http://docs.splunk.com/Documentation/Splunk/5.0/Knowledge/Addfieldsfromexternaldatasources

So the search would be something like: foo_search| lookup ldapLookup err OUTPUT description | top description

splunkatl
Path Finder

this works awesome. Thanks for prompt response
Here are the Steps I followed
1)Created ldap_errcodes.csv as below
err,ldaperr_description
1,Operations error
2,Protocol error
2)uploaded this file to Manger>Lookups>Look up table files
3) gave the search
err| lookup ldap_errcodes.csv err OUTPUT ldaperr_description |top err,ldaperr_description

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...