Dashboards & Visualizations

Can dashboard provide results based on the search I provide separately?

hcheang
Path Finder

Hello,

I have a quick question regarding dashboard. I would like to know if the search queries I have provided on dashboard panels can be applied after I input some value such as a user name. What I mean is that based on the username I provide on search head or wherever, the panels will give results. In other words, theses panels will give different results based on the username. Basically, I want to create a dashboard which summarize user activity.

Search queries I'm using are:
%Windows failed logins (count and source)
Keywords="Audit Failure" (EventCode=4625 OR EventCode=4771) |stats count by user dst src|fields user src dest count|rename dst as System|sort -count

%Windows failed logins (times)
Keywords="Audit Failure" (EventCode=4625 OR EventCode=4771) | bucket _time span=1h | stats count by _time user

%Windows successful logins
EventCode=4624 Logon_Type=10 |stats count by _time host, user, src |sort –count

If all fails, my plan is to mimic the time picker to create user picker... am I going in right direction?

0 Karma
1 Solution

ramdaspr
Contributor

Yes, you will need to create input fields and tokenize them so that the dashboard queries can pickup those queries and populate the tables.
For example, you can create a textfield with a token txt_tok

<input type="text" token="txt_tok">
      <label>UserName</label>
    </input>

and use the token in a dashbaord panel search query

Keywords="Audit Failure" (EventCode=4625 OR EventCode=4771) |stats count by $txt_tok$ dst src|fields $txt_tok$ src dest count|rename dst as System|sort -count

View solution in original post

ramdaspr
Contributor

Yes, you will need to create input fields and tokenize them so that the dashboard queries can pickup those queries and populate the tables.
For example, you can create a textfield with a token txt_tok

<input type="text" token="txt_tok">
      <label>UserName</label>
    </input>

and use the token in a dashbaord panel search query

Keywords="Audit Failure" (EventCode=4625 OR EventCode=4771) |stats count by $txt_tok$ dst src|fields $txt_tok$ src dest count|rename dst as System|sort -count

hcheang
Path Finder

works like magic! thanks!

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...