<?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 extract a keyword from a log and create a chart based on the count of this field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-keyword-from-a-log-and-create-a-chart-based-on/m-p/125368#M33884</link>
    <description>&lt;P&gt;It depends on how you want to chart it, and what other events look like. Your original request can be satisfied with something like;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype=your_sourcetype " DENY " | timechart span=1h count&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I.e. not extracting the field at all, but just searching for events that have the matching string, and then use a timechart to show them over.. time.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
    <pubDate>Mon, 15 Sep 2014 22:19:05 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2014-09-15T22:19:05Z</dc:date>
    <item>
      <title>How to extract a keyword from a log and create a chart based on the count of this field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-keyword-from-a-log-and-create-a-chart-based-on/m-p/125367#M33883</link>
      <description>&lt;P&gt;I am trying to extract the DENY keyword from the log, and then create a chart based on this field count. &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;"2014-06-15 21:29:51" Junior  id=&lt;A href="mailto:test3@test.com"&gt;test3@test.com&lt;/A&gt;,ou=user,o=test,ou=services,dc=test,dc=rock,dc=org 726c434d6024d0a706  "Not Available" INFO    o=test,ou=services,dc=test,dc=rock,dc=org   "cn=dsameuser,ou=DSAME Users,dc=openam,dc=forgerock,dc=org" DENY    ourusers.access "Not Available" 10.0.0.1&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 15 Sep 2014 22:01:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-keyword-from-a-log-and-create-a-chart-based-on/m-p/125367#M33883</guid>
      <dc:creator>raindrop2</dc:creator>
      <dc:date>2014-09-15T22:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a keyword from a log and create a chart based on the count of this field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-keyword-from-a-log-and-create-a-chart-based-on/m-p/125368#M33884</link>
      <description>&lt;P&gt;It depends on how you want to chart it, and what other events look like. Your original request can be satisfied with something like;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype=your_sourcetype " DENY " | timechart span=1h count&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I.e. not extracting the field at all, but just searching for events that have the matching string, and then use a timechart to show them over.. time.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2014 22:19:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-keyword-from-a-log-and-create-a-chart-based-on/m-p/125368#M33884</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-09-15T22:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a keyword from a log and create a chart based on the count of this field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-keyword-from-a-log-and-create-a-chart-based-on/m-p/125369#M33885</link>
      <description>&lt;P&gt;" I have "Permit" "Deny" "NA"   variables, so i want on the  chart to show me " how many permit,denay or na.  thanks for your help ...&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2014 22:21:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-keyword-from-a-log-and-create-a-chart-based-on/m-p/125369#M33885</guid>
      <dc:creator>raindrop2</dc:creator>
      <dc:date>2014-09-15T22:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a keyword from a log and create a chart based on the count of this field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-keyword-from-a-log-and-create-a-chart-based-on/m-p/125370#M33886</link>
      <description>&lt;P&gt;Since we still don't know how the other events look like, it'll be hard to give very precise advice. However, if the keyword you're after is either "PERMIT", "DENY" or "NA" (without the quotes), and these strings do not appear otherwise in your events, you could try;&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
&lt;CODE&gt;[your sourcetype]&lt;/CODE&gt;&lt;BR /&gt;
 &lt;CODE&gt;EXTRACT-blah = \s(?(PERMIT|DENY|NA))\s&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;or if the position of the keyword is fixed, you can try to anchor your regex towards the end of the line;&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
 &lt;CODE&gt;[your sourcetype]&lt;/CODE&gt;&lt;BR /&gt;
  &lt;CODE&gt;EXTRACT-bleh = (?\S+)\s+\S+\s+\"[^\"]+\"\s+[\d.]+$&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;These are just some of the options available. With more information and sample events, you'll be able to get better help.&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Tue, 16 Sep 2014 05:55:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-keyword-from-a-log-and-create-a-chart-based-on/m-p/125370#M33886</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-09-16T05:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a keyword from a log and create a chart based on the count of this field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-keyword-from-a-log-and-create-a-chart-based-on/m-p/125371#M33887</link>
      <description>&lt;P&gt;thanks much for your response, I don't have permission to modify props.conf. so i have to figure out to get string to extract this keyword. The logs are the same format the only variable  the status either (Permit Deny NA)&lt;/P&gt;</description>
      <pubDate>Tue, 16 Sep 2014 15:34:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-keyword-from-a-log-and-create-a-chart-based-on/m-p/125371#M33887</guid>
      <dc:creator>raindrop2</dc:creator>
      <dc:date>2014-09-16T15:34:32Z</dc:date>
    </item>
  </channel>
</rss>

