Analyze logfile & take action, Linux Scripting
$30-250 USD
Paid on delivery
There is an application running which generates log file. We need to create some script which will check for errors in the logfile do the following:
1. Tail last 10 minutes of log file |grep only the rows which contain specific word
2. from the output we need to fetch 2 variables - "username" & "IP", as it is both variables we need to sed next words after specific patterns
3. the output will look like
user1 1.1.1.1
user2 2.2.2.2
user3 3.3.3.3
user1 1.1.1.1
user4 4.4.4.4
4. If the username exists more than "X" times in the final output take action -
ban IP for specific time &
send email to email address fetched from db mysql [url removed, login to view] where username = $user &
write some info to mysql [url removed, login to view] where username = $user
The script must be optimized, not memory or cpu hungry, will be run each 10 min in cron job, so please only experienced users who know what to do.
thank you
Project ID: #5240553
About the project
Awarded to:
Hello, I will be glad to wire a script for you. For this I will need: 1. example of log file 2. dump of database 3. Installed firewall on server (CSF, iptables, lfd?) Regards, Alex_ks
8 freelancers are bidding on average $105 for this job
Hello I'm linux system engineer with more than 8 years of production experience, familiar with such kind of work. I can help you fast and quality. Regards, Tony
Hello, I work as a Linux/Unix system administrator for the past 10 years and have all the necessary skills and hands-on experience to complete the task. Hope to hear from you soon.
Hello there. I'm an experienced linux system administrator and I can write the script you need quickly and well documented. Please feel free to contact me if you've any question. Best regards.
looks like you definitelly know what do you need, it is good for both of us. I believe I can help you, It will not be too long, I guess 1..2 days. Please give me a sample of source log. Thank you.
hi I am experience. programmer. I have expertise in c cpp perl Linux and kava. I can do your this work easy in perl scripting. I have also experience in mysql and familiar with cron job.