<?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 edit my search to create a table for failed authentications? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257552#M77127</link>
    <description>&lt;P&gt;You need to have commas between your fields after the &lt;CODE&gt;table&lt;/CODE&gt; command&lt;/P&gt;

&lt;P&gt;Like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=windows_ad source="wineventlog:security" earliest=-24h@h latest=now ("EventCode=675" OR ("EventCode=672" AND Type="Failure Audit")) OR (EventCode=4771 AND "Audit Failure") NOT (User_Name="*$" OR Account_Name="*$") NOT Failure_Code=0x19 | eval "User Account"=coalesce(User_Name,Account_Name) | stats count by "User Account" | where count &amp;gt; 100 | table "User Account", "Client IP", "Client Port", "Failure Code", count | sort - count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 23 Jan 2017 13:55:56 GMT</pubDate>
    <dc:creator>skoelpin</dc:creator>
    <dc:date>2017-01-23T13:55:56Z</dc:date>
    <item>
      <title>How to edit my search to create a table for failed authentications?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257551#M77126</link>
      <description>&lt;P&gt;Hy,&lt;/P&gt;

&lt;P&gt;i have problem with creating table for failed authentication. This is my search..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows_ad source="wineventlog:security" earliest=-24h@h latest=now ("EventCode=675" OR ("EventCode=672" AND Type="Failure Audit")) OR (EventCode=4771 AND "Audit Failure") NOT (User_Name="*$" OR Account_Name="*$") NOT Failure_Code=0x19 | eval "User Account"=coalesce(User_Name,Account_Name) | stats count by "User Account" | where count &amp;gt; 100 | table "User Account" "Client IP" "Client Port" "Failure Code" count | sort - count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Field User Account and count gives me entry in table but fields Client Ip, Client port and Failure code does not.&lt;/P&gt;

&lt;P&gt;I tried few times with eval command for those three fields but its all the same.&lt;/P&gt;

&lt;P&gt;Can you please help me with that, here is some of fields that can be used for this table.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/2379i060018D628E34BEA/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 13:29:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257551#M77126</guid>
      <dc:creator>aanic</dc:creator>
      <dc:date>2017-01-23T13:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to create a table for failed authentications?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257552#M77127</link>
      <description>&lt;P&gt;You need to have commas between your fields after the &lt;CODE&gt;table&lt;/CODE&gt; command&lt;/P&gt;

&lt;P&gt;Like this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=windows_ad source="wineventlog:security" earliest=-24h@h latest=now ("EventCode=675" OR ("EventCode=672" AND Type="Failure Audit")) OR (EventCode=4771 AND "Audit Failure") NOT (User_Name="*$" OR Account_Name="*$") NOT Failure_Code=0x19 | eval "User Account"=coalesce(User_Name,Account_Name) | stats count by "User Account" | where count &amp;gt; 100 | table "User Account", "Client IP", "Client Port", "Failure Code", count | sort - count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Jan 2017 13:55:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257552#M77127</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2017-01-23T13:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to create a table for failed authentications?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257553#M77128</link>
      <description>&lt;P&gt;Still does not working. It is maybe problem with that i have couple  IP address for one account in event logs or maybe i must set eval for that three fields.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 14:07:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257553#M77128</guid>
      <dc:creator>aanic</dc:creator>
      <dc:date>2017-01-23T14:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to create a table for failed authentications?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257554#M77129</link>
      <description>&lt;P&gt;Hi aanic,&lt;BR /&gt;
not all of the Windows  event fields are enhanced with values, you can check this with a click on a field, in the left top corner there is the percentage of values.&lt;BR /&gt;
if you want to have all the fields full, you should insert in your search &lt;CODE&gt;Client_Ip=* Client_port=* Failure_code=*&lt;/CODE&gt; but in this way you have less events.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 14:21:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257554#M77129</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-01-23T14:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to create a table for failed authentications?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257555#M77130</link>
      <description>&lt;P&gt;Where is your ClientIP and Client Port fields? I don't see them in your Interesting fields, are they in Selected fields? &lt;/P&gt;

&lt;P&gt;I also see &lt;CODE&gt;Failure_Code&lt;/CODE&gt; as a field but you called it &lt;CODE&gt;Failure Code&lt;/CODE&gt; in your table command. You can either rename it then call it in the table command or change it in your table command to &lt;CODE&gt;Failure_Code&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 14:23:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257555#M77130</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2017-01-23T14:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to create a table for failed authentications?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257556#M77131</link>
      <description>&lt;P&gt;Yes, they are in selected fields. i correct name of field but still nothing. &lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 14:43:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257556#M77131</guid>
      <dc:creator>aanic</dc:creator>
      <dc:date>2017-01-23T14:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to create a table for failed authentications?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257557#M77132</link>
      <description>&lt;P&gt;Hi Cusello, all field that i want to put in table have some values, some of fields have a multiple values. &lt;/P&gt;

&lt;P&gt;Now im tryng with this querry but still nothing...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows_ad source="wineventlog:security" earliest=-24h@h latest=now ("EventCode=675" OR ("EventCode=672" AND Type="Failure Audit")) OR (EventCode=4771 AND "Audit Failure") NOT (User_Name="*$" OR Account_Name="*$") NOT Failure_Code=0x19 | eval "User Account"=coalesce(User_Name,Account_Name) | stats count by "User Account" | where count &amp;gt; 100 | table "User Account" src_ip Client_Port Failure_Code count | sort - count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Jan 2017 14:51:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257557#M77132</guid>
      <dc:creator>aanic</dc:creator>
      <dc:date>2017-01-23T14:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to create a table for failed authentications?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257558#M77133</link>
      <description>&lt;P&gt;Can you paste your search with corrected fields? Can you also verify that &lt;CODE&gt;Client IP&lt;/CODE&gt; and &lt;CODE&gt;Client Port&lt;/CODE&gt; are actually fields? &lt;/P&gt;

&lt;P&gt;Fields are case sensitive &lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 14:59:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257558#M77133</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2017-01-23T14:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to create a table for failed authentications?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257559#M77134</link>
      <description>&lt;P&gt;the problem is different:&lt;BR /&gt;
if you use a stats command after you can use only the fields of your command, in your example you have only "User Account" and count.&lt;BR /&gt;
If you want also the other fields, you have to insert in stats command also the other fields with the values option, something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows_ad source="wineventlog:security" earliest=-24h@h latest=now ("EventCode=675" OR ("EventCode=672" AND Type="Failure Audit")) OR (EventCode=4771 AND "Audit Failure") NOT (User_Name="*$" OR Account_Name="*$") NOT Failure_Code=0x19 | eval "User Account"=coalesce(User_Name,Account_Name) | stats values(src_ip) AS src_ip values(Client_Port) AS Client_Port values(Failure_Code) AS Failure_Code count by "User Account" | where count &amp;gt; 100 | table "User Account" src_ip Client_Port Failure_Code count | sort - count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this way the table command is useful only to change the fields order, you could also not use it.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 15:01:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257559#M77134</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-01-23T15:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to create a table for failed authentications?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257560#M77135</link>
      <description>&lt;P&gt;Now it works &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Thank you very much for the support.&lt;/P&gt;

&lt;P&gt;Augustin&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 15:06:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257560#M77135</guid>
      <dc:creator>aanic</dc:creator>
      <dc:date>2017-01-23T15:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to create a table for failed authentications?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257561#M77136</link>
      <description>&lt;P&gt;1) the &lt;EM&gt;stats count by "User Account"&lt;/EM&gt; command eliminates all fields but "User Account" and count.  that's why there's nothing available from the other fields.  Use eventstats command instead, and the count will be added to each individual event rather than creating a summary of all events.&lt;/P&gt;

&lt;P&gt;2) You are inconsistent in your use of quotes around the EventCode test. If EventCode is an indexed field, get those quotes off so that splunk can use the indexes.&lt;/P&gt;

&lt;P&gt;3) Sort defaults to only give 100 results.  use sort 0 to retain all records.&lt;/P&gt;

&lt;P&gt;4) My preference is to put parenthesis around the whole complex test regarding EventCode.  I've done that below, but the only line that actually matters to your problem is changing stats to eventstats. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows_ad source="wineventlog:security" 
earliest=-24h@h latest=now 
(EventCode=675 OR (EventCode=672 AND Type="Failure Audit") OR (EventCode=4771 AND "Audit Failure")) 
NOT (User_Name="*$" OR Account_Name="*$") 
NOT Failure_Code=0x19 
| eval "User Account"=coalesce(User_Name,Account_Name) 
| eventstats count by "User Account" 
| where count &amp;gt; 100 
| table "User Account" "Client IP" "Client Port" "Failure Code" count 
| sort 0 -count "User Account"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Jan 2017 15:22:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257561#M77136</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-01-23T15:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to create a table for failed authentications?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257562#M77137</link>
      <description>&lt;P&gt;Those commas in a field list are completely optional in splunk.  Output would not change.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.1/SearchReference/Table"&gt;https://docs.splunk.com/Documentation/Splunk/6.5.1/SearchReference/Table&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 15:26:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257562#M77137</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-01-23T15:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search to create a table for failed authentications?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257563#M77138</link>
      <description>&lt;P&gt;This is my search and now it works..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows_ad source="wineventlog:security" earliest=-24h@h latest=now ("EventCode=675" OR ("EventCode=672" AND Type="Failure Audit")) OR (EventCode=4771 AND "Audit Failure") NOT (User_Name="*$" OR Account_Name="*$") NOT Failure_Code=0x19 NOT "10.243.101.50" NOT "10.243.149.70" NOT "10.243.101.16" | eval "User Account"=coalesce(User_Name,Account_Name) | stats values(src_ip) AS src_ip values(Failure_Code) AS Failure_Code count by "User Account" | where count &amp;gt; 100 | table "User Account" src_ip Failure_Code count | rename src_ip AS "Client IP" | rename Failure_Code AS "Failure code" | rename count AS Count | sort - Count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Jan 2017 11:13:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-to-create-a-table-for-failed/m-p/257563#M77138</guid>
      <dc:creator>aanic</dc:creator>
      <dc:date>2017-01-24T11:13:02Z</dc:date>
    </item>
  </channel>
</rss>

