Dashboards & Visualizations

My username in the dashboard?

jgauthier
Contributor

At the top of splunk, I log in and see "Logged in as jgauthier".
Is there anyway to expose that username in a dashboard?

Very specifically, I would like to look at data specifically for the person that is logged in.
So, I can expose a dashboard (for all users) but the queries that run return results only for the user that is logged in.

Thanks!

Tags (3)

Jason
Motivator

In Splunk 5.0+ (and, I think, 4.3+) you can get the username by running the rest command to query Splunk's internals.

To add the username field to your search results, add the following:

| join [rest /services/authentication/current-context splunk_server=local | fields + username]

You can also get more details about the currently logged-in user by running this search:

| rest /services/authentication/users splunk_server=local | search [| rest /services/authentication/current-context | rename username as title | fields title]
Get Updates on the Splunk Community!

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

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...