All Apps and Add-ons

Why does the table not display the redirect_uri?

jhilton90
Path Finder

Can anyone tell me why my table doesn't display the redirect_uri?

 

index=keycloak customerReferenceAccountId!=SERVICE* username!=test*@test.co.uk type=LOGIN*
| stats count(eval(type="LOGIN")) as successful_login count(eval(type="LOGIN_ERROR")) as login_error by username, ipAddress
| eval percentage_failure=((successful_login/login_error)*100)
| eval percentage_failure=round('percentage_failure', 2)
| where successful_login>0 AND login_error>7
| table username, ipAddress, redirect_uri, successful_login, login_error, percentage_failure

 

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

gcusello
SplunkTrust
SplunkTrust

Hi9 @jhilton90,

because, after a stats command, you have only the fields in the stats and redirect_uri isn't one of them, you should add it to the stats command using e.g. vales as option:

index=keycloak customerReferenceAccountId!=SERVICE* username!=test*@test.co.uk type=LOGIN*
| stats 
   values(redirect_uri) AS redirect_uri 
   count(eval(type="LOGIN")) AS successful_login 
   count(eval(type="LOGIN_ERROR")) AS login_error 
   BY username ipAddress
| eval percentage_failure=((successful_login/login_error)*100)
| eval percentage_failure=round('percentage_failure', 2)
| where successful_login>0 AND login_error>7
| table username, ipAddress, redirect_uri, successful_login, login_error, percentage_failure

 Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi9 @jhilton90,

because, after a stats command, you have only the fields in the stats and redirect_uri isn't one of them, you should add it to the stats command using e.g. vales as option:

index=keycloak customerReferenceAccountId!=SERVICE* username!=test*@test.co.uk type=LOGIN*
| stats 
   values(redirect_uri) AS redirect_uri 
   count(eval(type="LOGIN")) AS successful_login 
   count(eval(type="LOGIN_ERROR")) AS login_error 
   BY username ipAddress
| eval percentage_failure=((successful_login/login_error)*100)
| eval percentage_failure=round('percentage_failure', 2)
| where successful_login>0 AND login_error>7
| table username, ipAddress, redirect_uri, successful_login, login_error, percentage_failure

 Ciao.

Giuseppe

jhilton90
Path Finder

Ohhhhhh of course!! Thank you 🙂

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @jhilton90,

good for you, see next time!

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated 😉

0 Karma
Get Updates on the Splunk Community!

Celebrating Fast Lane: 2025 Authorized Learning Partner of the Year

At .conf25, Splunk proudly recognized Fast Lane as the 2025 Authorized Learning Partner of the Year. This ...

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...