<?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 can my search query show all duplicated events by field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362595#M107141</link>
    <description>&lt;P&gt;EDIT: Converted to an answer, as it meets the requirement of only expecting there to be one group of results with the same &lt;CODE&gt;port_last_changed_at&lt;/CODE&gt; value.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=ib:discovery:switch_port_capacity index=ib_discovery device_ip_address=10.64.16.1* port_last_changed_at&amp;gt;="2017-02-07 00:00:00" interface_port_status=down interface_type=ethernet-csmacd interface_name!="Gi1/1/*" interface_name!="Te*" is_trunk_port=no
| eventstats count AS plc_count BY port_last_changed_at
| where plc_count &amp;gt; 1
| fillnull value="N/A" 
| dedup network_view, device_ip_address, interface_name
| rename network_view as "Network View" InterfaceSubnet as "Network" device_ip_address as "Device IP" interface_ip_address as "Interface IP" interface_name as "Interface Name" interface_description as "Interface Description" device_model as "Device Model" device_vendor as "Device Vendor" device_version as "Device OS Version" device_type as "Device Type" device_name as "Device Name" is_trunk_port as "Trunk Port" interface_type as "Type" interface_speed as "Speed" interface_vlan as "Vlan ID" interface_vlan_name as "Vlan Name" interface_admin_status as "Admin Status" interface_port_status as "Operation Status" port_last_changed_at as "Last port Changed"
| table "Device IP" "Device Name" "Interface Name" "Operation Status" "Last port Changed" "Vlan ID"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 13 Feb 2018 21:42:38 GMT</pubDate>
    <dc:creator>elliotproebstel</dc:creator>
    <dc:date>2018-02-13T21:42:38Z</dc:date>
    <item>
      <title>How can my search query show all duplicated events by field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362589#M107135</link>
      <description>&lt;P&gt;I'm trying to search data from our Infoblox switch port capacity source, and there are many interfaces that have an identical last_changed_at value. I want to see all events that have a duplicate last_changed_at value. The search, with an attempt at using stats count, is below. The problem with this is that it only shows one event for each last_changed_at value. It also only shows the last_changed_at value, all other fields blank. Any examples of how to accomplish this would be much appreciated!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=ib:discovery:switch_port_capacity index=ib_discovery device_ip_address=10.64.16.1* port_last_changed_at&amp;gt;="2017-02-07 00:00:00" interface_port_status=down interface_type=ethernet-csmacd interface_name!="Gi1/1/*" interface_name!="Te*" is_trunk_port=no | fillnull value="N/A" | dedup network_view, device_ip_address, interface_name | stats count by port_last_changed_at | rename network_view as "Network View" InterfaceSubnet as "Network" device_ip_address as "Device IP" interface_ip_address as "Interface IP" interface_name as "Interface Name" interface_description as "Interface Description" device_model as "Device Model" device_vendor as "Device Vendor" device_version as "Device OS Version" device_type as "Device Type" device_name as "Device Name" is_trunk_port as "Trunk Port" interface_type as "Type" interface_speed as "Speed" interface_vlan as "Vlan ID" interface_vlan_name as "Vlan Name" interface_admin_status as "Admin Status" interface_port_status as "Operation Status" port_last_changed_at as "Last port Changed" | table "Device IP" "Device Name" "Interface Name" "Operation Status" "Last port Changed" "Vlan ID"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:59:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362589#M107135</guid>
      <dc:creator>EricG1793</dc:creator>
      <dc:date>2020-09-29T17:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can my search query show all duplicated events by field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362590#M107136</link>
      <description>&lt;P&gt;I am trying to parse out the search query you posted here, but I can't understand how anything useful is happening after this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count by port_last_changed_at 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That should leave you with a table with only two fields: &lt;CODE&gt;port_last_changed_at&lt;/CODE&gt; and &lt;CODE&gt;count&lt;/CODE&gt;. So how you could do any renaming and useful tabling after that is not clear to me.&lt;/P&gt;

&lt;P&gt;Based on your description of the goal, you might try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=ib:discovery:switch_port_capacity index=ib_discovery device_ip_address=10.64.16.1* port_last_changed_at&amp;gt;="2017-02-07 00:00:00" interface_port_status=down interface_type=ethernet-csmacd interface_name!="Gi1/1/*" interface_name!="Te*" is_trunk_port=no 
| eventstats count BY port_last_changed_at
| where port_last_changed_at &amp;gt; 1
| stats list(_raw) AS event BY port_last_changed_at
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If that view doesn't suit you, you could try replacing &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats list(_raw) AS event BY port_last_changed_at
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;with&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| sort 0 port_last_changed_at
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which won't technically group the events together, but it will list them adjacently.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 22:20:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362590#M107136</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-02-08T22:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can my search query show all duplicated events by field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362591#M107137</link>
      <description>&lt;P&gt;Elliott - The fact that nothing useful is happening is the very reason I'm asking how it should be done, so thank you for your detailed response - much appreciated! Unfortunately, with the search built that way, no results are found. Here's a screenshot showing this, and another of all the data with an example of the duplicates I want to show outlined.&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/4330iD1ECE56780146087/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;&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/4331i410210BC7694D67E/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 15:43:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362591#M107137</guid>
      <dc:creator>EricG1793</dc:creator>
      <dc:date>2018-02-13T15:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can my search query show all duplicated events by field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362592#M107138</link>
      <description>&lt;P&gt;Just to make sure I understand what's going on under the hood - do you also get 0 results when you run only this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=ib:discovery:switch_port_capacity index=ib_discovery device_ip_address=10.64.16.1* port_last_changed_at&amp;gt;="2017-02-07 00:00:00" interface_port_status=down interface_type=ethernet-csmacd interface_name!="Gi1/1/*" interface_name!="Te*" is_trunk_port=no 
| eventstats count BY port_last_changed_at
| where port_last_changed_at &amp;gt; 1
| stats list(_raw) AS event BY port_last_changed_at
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Don't add any renames or tables or anything - just see if that alone is already junking it up. Let me know what the output is, and I'll try to help from there.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 17:35:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362592#M107138</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-02-13T17:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can my search query show all duplicated events by field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362593#M107139</link>
      <description>&lt;P&gt;Oh dear, I see the issue now. Sorry. Try this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; source=ib:discovery:switch_port_capacity index=ib_discovery device_ip_address=10.64.16.1* port_last_changed_at&amp;gt;="2017-02-07 00:00:00" interface_port_status=down interface_type=ethernet-csmacd interface_name!="Gi1/1/*" interface_name!="Te*" is_trunk_port=no 
 | eventstats count AS plc_count BY port_last_changed_at
 | where plc_count &amp;gt; 1
 | stats list(_raw) AS event BY port_last_changed_at
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Feb 2018 17:37:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362593#M107139</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-02-13T17:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can my search query show all duplicated events by field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362594#M107140</link>
      <description>&lt;P&gt;We're getting closer! Now, I see 27 events, all with the same port_last_changed_at. Awesome! However, they're only showing as events, not as statistics; again, no results found - so I can't export a spreadsheet from the info. &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; If I get rid of the renames and tables,  I get 1 row with the redundant value in the port_last_changed_at column, and all the events that occurred at that time in the next (event) column.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=ib:discovery:switch_port_capacity index=ib_discovery device_ip_address=10.64.16.1* port_last_changed_at&amp;gt;="2017-02-07 00:00:00" interface_port_status=down interface_type=ethernet-csmacd interface_name!="Gi1/1/*" interface_name!="Te*" is_trunk_port=no
| eventstats count AS plc_count BY port_last_changed_at
| where plc_count &amp;gt; 1
| stats list(_raw) AS event BY port_last_changed_at
| fillnull value="N/A" 
| dedup network_view, device_ip_address, interface_name
| rename network_view as "Network View" InterfaceSubnet as "Network" device_ip_address as "Device IP" interface_ip_address as "Interface IP" interface_name as "Interface Name" interface_description as "Interface Description" device_model as "Device Model" device_vendor as "Device Vendor" device_version as "Device OS Version" device_type as "Device Type" device_name as "Device Name" is_trunk_port as "Trunk Port" interface_type as "Type" interface_speed as "Speed" interface_vlan as "Vlan ID" interface_vlan_name as "Vlan Name" interface_admin_status as "Admin Status" interface_port_status as "Operation Status" port_last_changed_at as "Last port Changed"
| table "Device IP" "Device Name" "Interface Name" "Operation Status" "Last port Changed" "Vlan ID"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:03:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362594#M107140</guid>
      <dc:creator>EricG1793</dc:creator>
      <dc:date>2020-09-29T18:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: How can my search query show all duplicated events by field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362595#M107141</link>
      <description>&lt;P&gt;EDIT: Converted to an answer, as it meets the requirement of only expecting there to be one group of results with the same &lt;CODE&gt;port_last_changed_at&lt;/CODE&gt; value.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=ib:discovery:switch_port_capacity index=ib_discovery device_ip_address=10.64.16.1* port_last_changed_at&amp;gt;="2017-02-07 00:00:00" interface_port_status=down interface_type=ethernet-csmacd interface_name!="Gi1/1/*" interface_name!="Te*" is_trunk_port=no
| eventstats count AS plc_count BY port_last_changed_at
| where plc_count &amp;gt; 1
| fillnull value="N/A" 
| dedup network_view, device_ip_address, interface_name
| rename network_view as "Network View" InterfaceSubnet as "Network" device_ip_address as "Device IP" interface_ip_address as "Interface IP" interface_name as "Interface Name" interface_description as "Interface Description" device_model as "Device Model" device_vendor as "Device Vendor" device_version as "Device OS Version" device_type as "Device Type" device_name as "Device Name" is_trunk_port as "Trunk Port" interface_type as "Type" interface_speed as "Speed" interface_vlan as "Vlan ID" interface_vlan_name as "Vlan Name" interface_admin_status as "Admin Status" interface_port_status as "Operation Status" port_last_changed_at as "Last port Changed"
| table "Device IP" "Device Name" "Interface Name" "Operation Status" "Last port Changed" "Vlan ID"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Feb 2018 21:42:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362595#M107141</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-02-13T21:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: How can my search query show all duplicated events by field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362596#M107142</link>
      <description>&lt;P&gt;Yes, this produces exactly what I'm looking for! Thanks so much!&lt;/P&gt;

&lt;P&gt;I'd like to accept your answer as a solution, but since it's a comment, I can't. Feel free to re-post as a separate answer, and I will accept it.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2018 22:36:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362596#M107142</guid>
      <dc:creator>EricG1793</dc:creator>
      <dc:date>2018-02-13T22:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: How can my search query show all duplicated events by field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362597#M107143</link>
      <description>&lt;P&gt;Thanks! Glad we got it sorted out. I converted the comment to an answer. Cheers!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 17:01:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-my-search-query-show-all-duplicated-events-by-field/m-p/362597#M107143</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-02-15T17:01:28Z</dc:date>
    </item>
  </channel>
</rss>

