<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to create a search bar on a dashboard in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-bar-on-a-dashboard/m-p/182944#M52675</link>
    <description>&lt;P&gt;The token name can be different from actual field name in the logs as we just replace the value of the token in the search. I see your have a eval statement '| eval "User Account"=coalesce(User_Name,Account_Name)' but in rest of the search you use Account_Name instead. If "User Account" field is not to be used then replace '| search "User Accont"="$accountName$"' with '| search Account_Name="$accountName$"' and try&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 17:20:57 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2020-09-28T17:20:57Z</dc:date>
    <item>
      <title>How to create a search bar on a dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-bar-on-a-dashboard/m-p/182942#M52673</link>
      <description>&lt;P&gt;Hello, thank you for reading this!&lt;/P&gt;

&lt;P&gt;I am working on some searches for AD data, specfically looking at Failed Logins and Acccount Lockouts. I wrote a query that returns the results of all event codes for the aforementioned events, grouped by Account Lockout events. I'd like for other users to log onto this dashboard, and by simply typing in the "Account_Name" (as it appears in the log) return all the lockout/failed login values for a particular account. &lt;/P&gt;

&lt;P&gt;I've been trying to create this search bar using the simple XML edit, however I havent been successful. any help would be greatly appreciated!&lt;/P&gt;

&lt;P&gt;My search query looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search index=auth_ad sourcetype="WinEventLog:Security" OR sourcetype="WinEventLog:security" "EventCode=4740" OR "EventCode=644" OR (EventCode=4771 AND "Audit Failure") OR ("EventCode=672" AND Type="Failure Audit") OR "EventCode=675" | eval "User Account"=coalesce(User_Name,Account_Name) | eval Win2K8_acc = mvindex(Account_Name,1) | eval "Locked_Account"=coalesce(Win2K8_acc,Target_Account_Name) | transaction Account_Name startswith="EventCode=4740"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Again any advice would be greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Aug 2014 20:05:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-bar-on-a-dashboard/m-p/182942#M52673</guid>
      <dc:creator>sadkha</dc:creator>
      <dc:date>2014-08-14T20:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a search bar on a dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-bar-on-a-dashboard/m-p/182943#M52674</link>
      <description>&lt;P&gt;Try something like this. (provides a textbox and submit button. Textbox for users to input AccountName)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Search by Account Name&amp;lt;/label&amp;gt; 
  &amp;lt;description /&amp;gt; 
&amp;lt;fieldset submitButton="true"&amp;gt;
&amp;lt;input type="text" token="accountName" &amp;gt;
  &amp;lt;label&amp;gt;Account Name&amp;lt;/label&amp;gt; 
  &amp;lt;default&amp;gt;&amp;lt;/default&amp;gt; 
  &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
&amp;lt;row&amp;gt;
&amp;lt;event&amp;gt;
  &amp;lt;title&amp;gt; Failed Logins and Acccount Lockouts&amp;lt;/title&amp;gt;
  &amp;lt;searchString&amp;gt;
  index=auth_ad sourcetype="WinEventLog:Security" OR sourcetype="WinEventLog:security" "EventCode=4740" OR "EventCode=644" OR (EventCode=4771 AND "Audit Failure") OR ("EventCode=672" AND Type="Failure Audit") OR "EventCode=675" | eval "User Account"=coalesce(User_Name,Account_Name) | search "User Accont"="$accountName$"| eval Win2K8_acc = mvindex(Account_Name,1) | eval "Locked_Account"=coalesce(Win2K8_acc,Target_Account_Name) | transaction Account_Name startswith="EventCode=4740"
  &amp;lt;/searchString&amp;gt; 
  &amp;lt;option name="showPager"&amp;gt;true&amp;lt;/option&amp;gt;
  &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
  &amp;lt;option name="displayRowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
&amp;lt;/event&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Aug 2014 20:17:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-bar-on-a-dashboard/m-p/182943#M52674</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-14T20:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a search bar on a dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-bar-on-a-dashboard/m-p/182944#M52675</link>
      <description>&lt;P&gt;The token name can be different from actual field name in the logs as we just replace the value of the token in the search. I see your have a eval statement '| eval "User Account"=coalesce(User_Name,Account_Name)' but in rest of the search you use Account_Name instead. If "User Account" field is not to be used then replace '| search "User Accont"="$accountName$"' with '| search Account_Name="$accountName$"' and try&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:20:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-bar-on-a-dashboard/m-p/182944#M52675</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-28T17:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a search bar on a dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-bar-on-a-dashboard/m-p/182945#M52676</link>
      <description>&lt;P&gt;this worked perfectly. thank you for your help! much appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2014 17:30:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-bar-on-a-dashboard/m-p/182945#M52676</guid>
      <dc:creator>sadkha</dc:creator>
      <dc:date>2014-08-20T17:30:11Z</dc:date>
    </item>
  </channel>
</rss>

