<?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: Chart count by specific colon separated field (syslog) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Chart-count-by-specific-colon-separated-field-syslog/m-p/144019#M40052</link>
    <description>&lt;P&gt;This should work from the search bar but in the long term, you'll want to set the proper host metadata at the time of input.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "^(?:[^\s]+\s){5}(?&amp;lt;new_host&amp;gt;[^:]+)" | stats count by new_host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 10 Feb 2014 15:58:47 GMT</pubDate>
    <dc:creator>sbrant_splunk</dc:creator>
    <dc:date>2014-02-10T15:58:47Z</dc:date>
    <item>
      <title>Chart count by specific colon separated field (syslog)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-count-by-specific-colon-separated-field-syslog/m-p/144018#M40051</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;Im new to splunk and Im not a developer, and I got stuck trying to make a simple graphical display in dashboard showing syslog sources, using syslogs given hostnames. In example below (&lt;EM&gt;AP01-MATRIX&lt;/EM&gt;). &lt;BR /&gt;&lt;BR /&gt;
If i use the "chart count by host" it gives me a graphic with &lt;EM&gt;197.116.14.182&lt;/EM&gt; but I need to use &lt;EM&gt;AP01-MATRIX&lt;/EM&gt; instead. I thought about using something simple like get the 4th item separated by colon, but I dont know how.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
Feb 10 12:22:26 197.116.14.182 274: &lt;STRONG&gt;&lt;EM&gt;AP01-MATRIX&lt;/EM&gt;&lt;/STRONG&gt;: &lt;EM&gt;Mar  4 12:22:26.490 UTC: %DOT11-4-CCMP_REPLAY: Client baf6.85f8.1da6 had 1 AES-CCMP TSC replays&lt;BR /&gt;&lt;BR /&gt;
host = **197.116.14.182&lt;/EM&gt;* source = udp:514 sourcetype = syslog&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:50:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-count-by-specific-colon-separated-field-syslog/m-p/144018#M40051</guid>
      <dc:creator>onbits</dc:creator>
      <dc:date>2020-09-28T15:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Chart count by specific colon separated field (syslog)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-count-by-specific-colon-separated-field-syslog/m-p/144019#M40052</link>
      <description>&lt;P&gt;This should work from the search bar but in the long term, you'll want to set the proper host metadata at the time of input.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "^(?:[^\s]+\s){5}(?&amp;lt;new_host&amp;gt;[^:]+)" | stats count by new_host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Feb 2014 15:58:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-count-by-specific-colon-separated-field-syslog/m-p/144019#M40052</guid>
      <dc:creator>sbrant_splunk</dc:creator>
      <dc:date>2014-02-10T15:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Chart count by specific colon separated field (syslog)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-count-by-specific-colon-separated-field-syslog/m-p/144020#M40053</link>
      <description>&lt;P&gt;Tried this:&lt;BR /&gt;
sourcetype=syslog | ^(?:[^\s]+\s){5}(?&lt;NEW_HOST&gt;[^:]+) | stats count by new_host&lt;/NEW_HOST&gt;&lt;/P&gt;

&lt;P&gt;And got this:&lt;BR /&gt;
Error in 'SearchParser': Missing a search command before '^'.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 16:06:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-count-by-specific-colon-separated-field-syslog/m-p/144020#M40053</guid>
      <dc:creator>onbits</dc:creator>
      <dc:date>2014-02-10T16:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Chart count by specific colon separated field (syslog)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-count-by-specific-colon-separated-field-syslog/m-p/144021#M40054</link>
      <description>&lt;P&gt;Whoops, sorry about that.  Updated the answer.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 16:08:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-count-by-specific-colon-separated-field-syslog/m-p/144021#M40054</guid>
      <dc:creator>sbrant_splunk</dc:creator>
      <dc:date>2014-02-10T16:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Chart count by specific colon separated field (syslog)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Chart-count-by-specific-colon-separated-field-syslog/m-p/144022#M40055</link>
      <description>&lt;P&gt;Thanks a lot! It worked exactly as I wanted! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 16:33:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Chart-count-by-specific-colon-separated-field-syslog/m-p/144022#M40055</guid>
      <dc:creator>onbits</dc:creator>
      <dc:date>2014-02-10T16:33:18Z</dc:date>
    </item>
  </channel>
</rss>

