<?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: Unable to count error events by source IP in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Unable-to-count-error-events-by-source-IP/m-p/63548#M12756</link>
    <description>&lt;P&gt;If&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;"error" | rex "\[client\s(?&amp;lt;src_ip&amp;gt;\S+?)\]"&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;gets results, take a look at the fields sidebar (on the left) and see if you can find the &lt;CODE&gt;src_ip&lt;/CODE&gt; field. I believe that the field is probably not right, and that is why the &lt;CODE&gt;stats&lt;/CODE&gt; command is not returning results.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Sep 2013 22:25:00 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2013-09-13T22:25:00Z</dc:date>
    <item>
      <title>Unable to count error events by source IP</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Unable-to-count-error-events-by-source-IP/m-p/63544#M12752</link>
      <description>&lt;P&gt;Granted I am new to splunk, and while I am utilizing the tutorials and help, it seems that I can not get something as simple as a error by IP report to work. &lt;/P&gt;

&lt;P&gt;I have loaded data into splunk, and I can search the data and find what I want - quite simply, errors as reported in an Apache error log. What I want to do is show a count of errors by source IP address. For example the line in the log reads like this ( where xx is the source IP address ) : &lt;BR /&gt;
[Fri Aug 22 16:59:01 2013] [error] [client xx.xx.xx.xx] File does not exist: /home/file.jpg&lt;/P&gt;

&lt;P&gt;It seems I can't index by the source IP , so I attempted to to create a regex to extract that value. I was able to do so using the interactive field extractor. It was able to generate a regex pattern, which appeared to work properly. &lt;/P&gt;

&lt;P&gt;Unfortunately , when I click on the TEST button , a window pops up for a few moments with some information on testing the regex, however it disappears after a few seconds before I can read it. I can see the buttons " cancel " and " test " , but again the window closes before I can click on either. &lt;/P&gt;

&lt;P&gt;The same happens when I try to save the generated regex. I click on the "save" button and a window pops up requesting a field name, but again it closes before any information can be given. &lt;/P&gt;

&lt;P&gt;This is an incredibly simple thing to do : Show me a count of errors, by source IP address.  Can anyone please direct me to where I am making a mistake? &lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2013 20:47:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Unable-to-count-error-events-by-source-IP/m-p/63544#M12752</guid>
      <dc:creator>fclarkgeek</dc:creator>
      <dc:date>2013-09-13T20:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to count error events by source IP</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Unable-to-count-error-events-by-source-IP/m-p/63545#M12753</link>
      <description>&lt;P&gt;It sounds like something is wrong with your install or with the Interactive Field Extractor. Here is my suggestion: don't click the Test button. It sounds like a dumb suggestion, but it really isn't.  Just save the field extraction and try it -- if you don't like it, you can just delete it and try again. You don't truly need the Test button.&lt;/P&gt;

&lt;P&gt;Field extractions in Splunk are dynamic. You can create and delete them at will, without affecting the underlying data store.&lt;/P&gt;

&lt;P&gt;I would definitely create the field extraction. But if you want, you can create an on-the-fly field like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=yourlogfile "File does not exist" 
| rex "\[client\s(?&amp;lt;src_ip&amp;gt;\S+?)\]" 
| stats count by src_ip
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(I hope I got the regular expression right!)&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2013 21:04:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Unable-to-count-error-events-by-source-IP/m-p/63545#M12753</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-09-13T21:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to count error events by source IP</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Unable-to-count-error-events-by-source-IP/m-p/63546#M12754</link>
      <description>&lt;P&gt;Unfortunately I have tried saving the field extraction, and as I indicated the result was the same : a window pops up for a moment asking me to name the field, but disappears before I can input anything and the field is not saved. &lt;/P&gt;

&lt;P&gt;I'm going to try your ' on the fly ' method now. I'm familiar with regex, but I need to ask , is &lt;SRC_IP&gt; in your regex considered a field name ? &lt;/SRC_IP&gt;&lt;/P&gt;

&lt;P&gt;Also , I am not looking specfically for " File does not exist " , I am looking for any error, so I should be able to replace that with "error" as I did in my initial search, correct? &lt;/P&gt;

&lt;P&gt;Thank you for your assistance!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2013 21:09:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Unable-to-count-error-events-by-source-IP/m-p/63546#M12754</guid>
      <dc:creator>fclarkgeek</dc:creator>
      <dc:date>2013-09-13T21:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to count error events by source IP</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Unable-to-count-error-events-by-source-IP/m-p/63547#M12755</link>
      <description>&lt;P&gt;I tried what you suggested , slightly modified : &lt;BR /&gt;
&lt;CODE&gt;"error" | rex "\[client\s(?&amp;lt;src_ip&amp;gt;\S+?)\]" | stats count by src_ip&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;It came back with no results. When I used the inspector it indicated that " stats count by src_ip " generated no results. &lt;/P&gt;

&lt;P&gt;To ensure the regex was right ( I believed it was! ) I redid the query using : &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;"error" | rex "\[client\s(?&amp;lt;src_ip&amp;gt;\S+?)\]"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;and it DID find results - so I believe your regex is correct, but still something is not quite working.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2013 21:20:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Unable-to-count-error-events-by-source-IP/m-p/63547#M12755</guid>
      <dc:creator>fclarkgeek</dc:creator>
      <dc:date>2013-09-13T21:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to count error events by source IP</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Unable-to-count-error-events-by-source-IP/m-p/63548#M12756</link>
      <description>&lt;P&gt;If&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;"error" | rex "\[client\s(?&amp;lt;src_ip&amp;gt;\S+?)\]"&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;gets results, take a look at the fields sidebar (on the left) and see if you can find the &lt;CODE&gt;src_ip&lt;/CODE&gt; field. I believe that the field is probably not right, and that is why the &lt;CODE&gt;stats&lt;/CODE&gt; command is not returning results.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2013 22:25:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Unable-to-count-error-events-by-source-IP/m-p/63548#M12756</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-09-13T22:25:00Z</dc:date>
    </item>
  </channel>
</rss>

