<?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: Adding another column to table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Adding-another-column-to-table/m-p/710225#M239960</link>
    <description>&lt;P&gt;You can also use the tstats with prestats with count.&lt;/P&gt;&lt;PRE&gt;| tstats prestats=t count where index IN (network,proxy) by index _time span=1h&lt;BR /&gt;| timechart span=1h count by index&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jan 2025 07:41:50 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2025-01-30T07:41:50Z</dc:date>
    <item>
      <title>Adding another column to table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-another-column-to-table/m-p/710187#M239943</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to add another index column to this table. Currently using the search below.&lt;/P&gt;&lt;P&gt;| tstats count where index IN (network) by _time span=1h&lt;BR /&gt;| rename count as Network_Logs&lt;BR /&gt;| eval _time=strftime(_time, "%m-%d %H:%M")&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot splunk.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/34291i917DD2E5B2F341E3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot splunk.png" alt="Screenshot splunk.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;| tstats count where index IN (network, proxy) by _time span=1h&lt;BR /&gt;| rename count as Network_Logs&lt;BR /&gt;| eval _time=strftime(_time, "%m-%d %H:%M")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adding another index such as proxy doesn't seem to work just adds to the total count. Is there anyway to count separate indexes by 1 hour intervals?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2025 21:07:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-another-column-to-table/m-p/710187#M239943</guid>
      <dc:creator>anthony_king</dc:creator>
      <dc:date>2025-01-29T21:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Adding another column to table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-another-column-to-table/m-p/710196#M239948</link>
      <description>&lt;P&gt;You have to split by index as well. Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index IN (network, proxy) by _time span=1h index
| timechart span=1h max(count) by index&lt;/LI-CODE&gt;&lt;P&gt;The tstats will give you an index column as well as count, then the timechart will convert that to a timechart. Note that you need to use max(count) here.&lt;/P&gt;&lt;P&gt;Note you can also do this simply with tstats using prestats and chart, i.e.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats prestats=t count where index IN (network, proxy) by _time span=1h index
| chart count by _time index&lt;/LI-CODE&gt;&lt;P&gt;This way you just use chart count and you don't need the max.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2025 21:36:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-another-column-to-table/m-p/710196#M239948</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2025-01-29T21:36:36Z</dc:date>
    </item>
    <item>
      <title>Re: Adding another column to table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-another-column-to-table/m-p/710225#M239960</link>
      <description>&lt;P&gt;You can also use the tstats with prestats with count.&lt;/P&gt;&lt;PRE&gt;| tstats prestats=t count where index IN (network,proxy) by index _time span=1h&lt;BR /&gt;| timechart span=1h count by index&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 07:41:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-another-column-to-table/m-p/710225#M239960</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-01-30T07:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Adding another column to table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-another-column-to-table/m-p/710288#M239971</link>
      <description>&lt;P&gt;That worked. Thank you for the help!&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2025 18:36:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-another-column-to-table/m-p/710288#M239971</guid>
      <dc:creator>anthony_king</dc:creator>
      <dc:date>2025-01-30T18:36:12Z</dc:date>
    </item>
  </channel>
</rss>

