Freelancer

AWS S3 :: PHP script that parses log files  

AWS S3 :: PHP script that parses log files is project number 560195
posted at Freelancer.com. Click here to post your own project.


| More Free Trial For New Buyers
 

Status: Awarded

Selected Providers: hughperkins

Budget: $30-250

Created: 11/28/2009 at 12:38 EST

Bid Count: 3

Average Bid:
$ 200

12/01/2009 at 12:38 EST

Project Creator: gladideg
Employer Rating: 10/1010/1010/1010/1010/1010/1010/1010/1010/1010/10 (12 reviews)

Bid On This Project
 

Description

I need a PHP script that fetches log files from a given S3 bucket, and then parses values into an array I can use for different purposes.

The script should be based on the [Amazon S3 PHP class] to download/delete/move log files on the remote S3 Bucket, so what I need is just a PHP script that executes the [S3 PHP Class] and parses and handles the log files using regex and other fancy php features. If you suggest another way to accomplish this, please collaborate.

[Script work flow:]

1. Initialize Amazon S3 PHP class

2. Set bucket name from: $_POST['bucket']; ($bucket = $_POST['bucket'];)

3. Set log file prefix from: $_POST['logfileprefix']; ($prefix = $_POST['logfileprefix'];)

4. Download all log files that are present in [$bucket], based on the file prefix [$prefix] ($prefix can for example be: "logfile_") into a sub folder of the script it self.

5. Move all log files that were downloaded from the $bucket folder and into a sub folder of the given bucket, so they are not processed next time the script runs. ($bucket."/processed_single_log_files")

6. To make the parsing job easy, I suggest compacting all log files into one big log file, before parsing it.

7. Start parsing the log files. They are "space" separated as far as I know. Check this link from Amazon AWS to learn more about the log format: http://bit.ly/4EVVGW

8. a
For each line/loop - I need all the values/fields available in an array, so I can properly insert each line into a MySQL database.

8. b
For each line/loop - I need a incremental $string/$integer that sums the total "Bytes Sent" (from the "Bytes Sent" column) for all the lines.

9. Upload the "compacted" file to a sub folder of $bucket, ($bucket."/processed_compacted_log_files")

10. You shall not covet anything that belongs to your neighbor

If you have no idea what S3 or AWS, don't bid. I need this done fast.

Messages Posted:2 View project clarification board Post message on project clarification board

Bid On This Project
 

If you are the project creator or one of the bidders Log In for more options

 

300

5 days

11-28-2009 18:02 EST

pls chk pmb

help

 

50

1 day

11-29-2009 21:36 EST

Sounds fairly easy. I love Amazon EC2.

help

 

250

7 days

11-28-2009 13:29 EST

(No Feedback Yet)

please see my message in PMB for details, thanks

help


    Bid on this Project