title: How to use RRDTool/Cacti to count "user activities" in apache access logs?
body: <p><strong>Goal</strong></p>
  
  <p>I wish to use RRDTool to count logical "user activity" from our web application's apache/tomcat access logs.</p>
  
  <p>Specifically we want to count, for a period, occurrences of several url patterns. </p>
  
  <p><strong>Example</strong></p>
  
  <p>We have two applications (call them 'foo' and 'bar')</p>
  
  <p>These url's interest us. They indicate when users 'did interesting stuff'.</p>
  
  <pre><code>/foo/hop
  /foo/skip
  /foo/jump
  
  /bar/crawl
  /bar/walk
  /bar/run
  </code></pre>
  
  <p>Basically we want to know for a given interval (10 minutes, hour, day, etc.) how many users: hopped,skipped,jumped,crawled, walked, etc.</p>
  
  <p><strong>Reference/Starting point</strong></p>
  
  <p>This article on importing access logs into RRDTool seemed like a helpful starting point. 
  <a href="http://neidetcher.com/programming/2014/05/13/just-enough-rrdtool.html" rel="nofollow">http://neidetcher.com/programming/2014/05/13/just-enough-rrdtool.html</a></p>
  
  <p>However to clarify, this example uses the access log directly , whereas we want to a handful of url's 'in buckets' and count the 'number in each bucket'</p>
  
  <p><strong>Some Scripting Required..</strong></p>
  
  <p>I could do this with bash &amp; grep &amp; wc --iterating through the patterns, sending output to an 'intermediate results' text file....but believe RRDTool could do this with minimal 'outside coding'</p>
  
  <p>That said, I believe RRDTool could do this with minimal 'outside coding'--but am unclear on the details.</p>
  
  <p><strong>Some points</strong></p>
  
  <ul>
  <li>I mention 'two applications' because we actually serve them up from separate servers with different log file formats. I'd like go get them into the same RRA file</li>
  <li><p>Eventually I'd like to report this in cacti; initially however, I wanted to understand RRDTool details</p></li>
  <li><p>Open to doing any coding, but would like to keep it as efficient as possible--both administratively and computer-resources. (By administratively, I mean: easy to monitor new instances)</p></li>
  <li><p>I am very new to RRDTool and am RTM'ing . (and Walking through the Tutorial). I'm used to relational databases and spreadsheets, etc and don't have my mind around all the nuances of the RRA format.</p></li>
  </ul>
  
  <p>Thanks in advance!</p>