Splunk Search

help to legend field name after using a lookup correspondance

jip31
Motivator

hi

I use a lookup in order to do a correspondance between the field web_error_code which is my sourcetype and which is an error code and the name of th error code

It works perfectly but I just need to complete the legend timechart with the original web_error code

for example I need "400 - Bad gateway", actually I have just bad gateway

How to do this please

 

index=toto sourcetype=tutu web_domain="*"   
| lookup HttpCode.csv status as web_error_code output status_description 
| timechart span=1d  sum(web_error_count) as web_error_count by status_description 

 

 

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

richgalloway
SplunkTrust
SplunkTrust

Create a field that combines the code with the description then use that field in the timechart.

index=toto sourcetype=tutu web_domain="*"   
| lookup HttpCode.csv status as web_error_code output status_description 
| eval code_description = web_error_code . " - " . status_description
| timechart span=1d  sum(web_error_count) as web_error_count by code_description
---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Create a field that combines the code with the description then use that field in the timechart.

index=toto sourcetype=tutu web_domain="*"   
| lookup HttpCode.csv status as web_error_code output status_description 
| eval code_description = web_error_code . " - " . status_description
| timechart span=1d  sum(web_error_count) as web_error_count by code_description
---
If this reply helps you, Karma would be appreciated.
0 Karma

jip31
Motivator

perfect thanks

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 ...