I have a log file for which I need a parser to be written. A sample line looks like this:
?/1/1161/238 [08/Jul/2015:12:45:34 +0000] "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0"
I need to take values out and put them into mysql. The first part just wants numbers taking ?/1/1161/238 converts to 1 1161 and 238. Next I need to take the timestamp [08/Jul/2015:12:45:34 +0000] and convert it to DATETIME. Finally the user agent string needs to be converted into operating system and browser info. This is the mapping:
OS:
'Windows' => 1,
'Mac OS X' => 2,
'Linux' => 3,
'iOS' => 4,
'Android' => 5,
'Windows Phone' => 6,
Browser:
'IE' => 1,
'Android' => 2,
'Firefox' => 3,
'Chrome' => 5,
'Opera' => 6,
'Safari' => 4,
'default_browser' => 99,
'default_os' => 99
Eventually the above data would be inserted into mysql like this:
INSERT INTO `raw` (`eid`, `tid`, `pid`, `os`, `browser`, `dtime`) VALUES (1, 238, 1161, 1, 3, '2015-07-08 12:45:34');
It is very important that the script will omit lines that do not match this format. So is the line is incompatible or has some data missing then its ignored.
We can do this in quick time. We are a team of expert web developers with lots of experience in web [login to view URL] are new to freelancer.com but not to web [login to view URL] give us a chance we will not let you down.
Thanks
This is pretty easy work for me. I can complete it in couple of hours.
All I need to start is milestone payment from you. You'll release it after you check everything on your side so nothing to worry about for you.
Thanks.
Roman
Hi.
I have about 15 years of programming experience. I'm planning to implement the task using C# language.
Please, send me examples of your log file before awarding the project to me.
I want to discuss this project with you further, let me know the best suitable time for you to schedule the meeting, Feel free to message me at any time, i used to be online 14 hrs in a day on this website so probably you will get a quick response from my end.
Hi Sir/Madam,
I'm expert in Python programming and I have a lot of experience with file parsing, so I can help You with this project.
Best regards,
Fejs.
Hello. More 20 years programming experience.
Had made similar many times on perl.
Regards.
---------------------------------------------------------------------------------------------------------------------------------------------------
Dear employer,
I've very good experience in data parsing. I can proceed with your project to parse the log file and insert the extracted data into mysql. I can give you a java program that can do this task. Hope that works for you. Please send in more details to proceed with the project.
I'm ready to start working on the project. Looking forward to working with you. Awaiting a positive reply from you.
Thanking you
Shaik Allabakash.
Hi,
I have experience in scripting, I can do this job.
Please check my work history for relevant feedback.
Do you have any preference in terms of scripting language and OS platform?
Cheers,
George
Hi, I'm fluent in Python and regular expressions. I can write a simple Python script that would perform all the necessary operations in a single run.
Feel free to contact me :)
The line you posted as an example '?/1/1161/238 [08/Jul/2015:12:45:34 +0000] "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0"' can be parsed using regular expression, so my question here: is that OK with you?
Also, you said after parsing and tokenize the lines, you would to insert it to a database, I am going to use MySQLi or PDO, so I would to know which one you prefer to use.
Please feel free to contact me if you have any questions.
I can do it in 2 hours maximum.
I am very skilled in this kind of work.
I made a log parser for about 2 billion logs per day, realtime.
Contact me if you are interested.
10 lat doświadczenia w konfiguracji i zarządzaniu serwerami opartymi o system Linux z szerokim wachlarzem usług. Pisanie skryptów w bashu i perlu wspomagających zarządzanie (również parsujących logi). Uczciwy i niezawodny.