<?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: Using regex with timechart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-regex-with-timechart/m-p/345384#M102342</link>
    <description>&lt;P&gt;Hi  sarahw3,&lt;BR /&gt;
probably your events have more than one tag for each, you could use eval to choose only the needed five, the problem is that if an event has more than one of the five tags, it takes only the first.&lt;BR /&gt;
try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search
| eval event=case(tag="tag1","tag1",tag="tag2","tag2",tag="tag3","tag3",tag="tag4","tag4",tag="tag5","tag5")
| search tag=tag1 OR tag=tag2 OR tag=tag3 OR tag=tag4 OR tag=tag5
| timechart count by tag
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Wed, 02 Aug 2017 13:36:33 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2017-08-02T13:36:33Z</dc:date>
    <item>
      <title>Using regex with timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-regex-with-timechart/m-p/345383#M102341</link>
      <description>&lt;P&gt;I want to create a timechart based on 5 tags. I have tried &lt;CODE&gt;| timechart count by tag |regex tag="Working|No_Images|Other|Never_Checked|Camera_Not_Working"&lt;/CODE&gt; and it does not work. If I get rid of the regex, it generates the timechart but it has all the tags (70+) in the chart when I only want 5. Is there another way I can make the timechart just show the 5 tags?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 13:12:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-regex-with-timechart/m-p/345383#M102341</guid>
      <dc:creator>sarahw3</dc:creator>
      <dc:date>2017-08-02T13:12:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using regex with timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-regex-with-timechart/m-p/345384#M102342</link>
      <description>&lt;P&gt;Hi  sarahw3,&lt;BR /&gt;
probably your events have more than one tag for each, you could use eval to choose only the needed five, the problem is that if an event has more than one of the five tags, it takes only the first.&lt;BR /&gt;
try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search
| eval event=case(tag="tag1","tag1",tag="tag2","tag2",tag="tag3","tag3",tag="tag4","tag4",tag="tag5","tag5")
| search tag=tag1 OR tag=tag2 OR tag=tag3 OR tag=tag4 OR tag=tag5
| timechart count by tag
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 13:36:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-regex-with-timechart/m-p/345384#M102342</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-08-02T13:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using regex with timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-regex-with-timechart/m-p/345385#M102343</link>
      <description>&lt;P&gt;The easy way, will be to filter on the tags before the timechart (this will also be more efficient) : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo (tag=Working OR tag=No_Images OR tag=Other OR tag=Never_Checked OR tag=Camera_Not_Working) | timechart count by tag
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Aug 2017 13:40:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-regex-with-timechart/m-p/345385#M102343</guid>
      <dc:creator>3no</dc:creator>
      <dc:date>2017-08-02T13:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using regex with timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-regex-with-timechart/m-p/345386#M102344</link>
      <description>&lt;P&gt;Thank you so much!! That worked perfectly!&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 13:48:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-regex-with-timechart/m-p/345386#M102344</guid>
      <dc:creator>sarahw3</dc:creator>
      <dc:date>2017-08-02T13:48:38Z</dc:date>
    </item>
  </channel>
</rss>

