Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7796917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:31:08+00:00 2026-06-01T23:31:08+00:00

My specific problem is that I have a set of Apache access logs, and

  • 0

My specific problem is that I have a set of Apache access logs, and I want to extract from them a “rolled up” count of requests by grouping them into a set of time windows of a specified time.

Example of my data:

127.0.0.1 - - [01/Dec/2011:00:00:11 -0500] "GET / HTTP/1.0" 304 266 "-" "Sosospider+(+http://help.soso.com/webspider.htm)"
127.0.0.1 - - [01/Dec/2011:00:00:24 -0500] "GET /feed/rss2/ HTTP/1.0" 301 447 "-" "Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 1 subscribers; feed-id=12878631678486589417)"
127.0.0.1 - - [01/Dec/2011:00:00:25 -0500] "GET /feed/ HTTP/1.0" 304 189 "-" "Feedfetcher-Google; (+http://www.google.com/feedfetcher.html; 1 subscribers; feed-id=12878631678486589417)"
127.0.0.1 - - [01/Dec/2011:00:00:30 -0500] "GET /robots.txt HTTP/1.0" 200 333 "-" "Mozilla/5.0 (compatible; ScoutJet; +http://www.scoutjet.com/)"
127.0.0.1 - - [01/Dec/2011:00:00:30 -0500] "GET / HTTP/1.0" 200 10011 "-" "Mozilla/5.0 (compatible; ScoutJet; +http://www.scoutjet.com/)"

as you can see, each line represents an event — in this case, a HTTP request — and contains a timestamp.

Assuming my data covers 3 days, and I specify a time window size of 1 day, I’d like to generate something like this:

Start    End     Count
2011-12-01 05:00     2011-12-02 05:00    2822
2011-12-02 05:00     2011-12-03 05:00    2572
2011-12-03 05:00     2011-12-04 05:00    604

But I need to be able to vary the size of the window — I might want to analyze a given dataset using windows of 5 minutes, 10 minutes, 1 hour, 1 day, or 1 week, etc.

I also need the library/tool to be capable of analyzing a dataset (a series of lines) of hundreds or even thousands of megabytes in size.

A prebuilt tool which can accept the data via standard input would be great, but a library would be totally fine, as I could just build the tool around the library. Any language would be fine; if I don’t know it I can learn it.

I’d prefer to do this by piping the access log data directly into a tool/library with minimal dependencies — I’m not looking for suggestions to store the data in a database and then query the database to do the analysis. If I need to, I can figure that out myself.

I tried Splunk and found it way too heavyweight and complex for my case. It’s not just a tool, it’s a whole system with its own datastore, complex indexing and querying abilities, etc.

My question is: does such a library and/or tool exist?

Full disclosure

I must admit, I actually tried and failed to find something like this a few months ago, so I wrote my own. For some reason I didn’t think to post this question at that time. I will share the lib/tool I wrote in an answer shortly. But I really am curious if something like this does exist; maybe I just missed it when I was searching a few months ago.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T23:31:10+00:00Added an answer on June 1, 2026 at 11:31 pm

    As mentioned in the question, I actually attempted a few months ago, unsuccessfully, to find something like this, so I wrote my own. (For some reason I didn’t think to post this question at that time.)

    I took this as an opportunity to learn functional programming (FP) and to shore up my proficiency with CoffeeScript. So I wrote Rollups as a CoffeeScript tool which runs on Node. I’ve since added Scala and Clojure versions, as part of my further exploration of FP.

    All the versions are intended to be usable as both a tool and a library, although they’re all only part of the way towards that — I think currently only the Clojure version is truly safe to use as a library, and I haven’t tested it that way.

    The tools work as I described in my question. Given a file or set of files containing Apache access logs, I invoke them like so:

    $ gzcat *.access.log.gz | rollup.clj -w 1d
    

    (or rollup.coffee, rollup.scala) and the output is exactly like the example in the question.

    This tool solved my problem, and I’m no longer actively using it on a day-to-day basis. But I’d love to improve it further for others’ use, if I knew that others were using it. So feedback would be welcome!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The problem that I have is somehow very specific. I have to implement a
I have a quite specific problem. I created a webapp and want to have
I'm looking to pull a specific line from a number of table that have
I have very specific problem running PHP as Apache 2.2 module. When running PHP
Sometimes I come across this problem where you have a set of functions that
and pardon my english I have a specific problem with Chrome browser, just in
I have run into a bit of a problem here: I had a problem-specific
I have a problem that I have found many similar problems related to multi
I have set of classes which inherit from a single super class: Super |
I am currently working on a problem that I have an inelegant solution for.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.