0

I need to pull log files from a Windows server. The log files appear every minute and I am trying to ftp to the server pull the file back to the linux box and process it. I have been looking around and found about inotify, I am not sure how to use it in a bash script after ftp to the Windows server. I am open to other implementation it does not have to be ftp/inotify but I am not sure how this could be done.

any ideas??

laitha0
  • 4,148
  • 11
  • 33
  • 49
  • When you say "pull the file back to the linux box and process it.", what do mean by that? – sparecycle Sep 11 '13 at 19:14
  • It's first time I heard that there's inotify in windows. Are you accessing the directory via Samba? – konsolebox Sep 11 '13 at 19:18
  • @deeperDATA New files get dumped in some directory on the windows server every minute, I need to detect the new file and copy/pull it back to a linux box where I will do (grep+insert to a database). – laitha0 Sep 11 '13 at 19:21
  • i do not think inotify exists on windows I am trying to execute it remotley – laitha0 Sep 11 '13 at 19:21

1 Answers1

1

Two products come to mind depending on how you plan to approach the solution.

I personally use Splunk on a variety of platforms (Windows & Linux servers/local Linux & OSX dev environments). It is a real-time log aggregator that features an API and the ability to query. Even if this doesn't solve your problem, the free version has some very robust features that you should consider: http://www.splunk.com

The second approach would be synchronization of your web directories using something like RSync. I've used RSync on Linux boxes and always appreciated what it can do. I even see it now has a Windows port: https://www.itefix.no/i2/cwrsync

sparecycle
  • 2,038
  • 5
  • 31
  • 58