On Mon, 17 Oct 2005 08:54 , Gerhardus Geldenhuis <gerhardus.geldenhuis@gmail.com> sent:

>Hi
>I am looking for a way to access files over the network with perl every 15 min.
>
>I can't use NFS and I can't use FTP to copy the files over.
>
>Basically what I am trying to do is filter through our inhouse
>applications logfiles scanning for certain entries. The application
>runs on various machines and I need a centralised script that can scan
>through these various files.
>
>I do have a working script in perl, but it was written with one
>machine in mind is not designed to run on more than one machine. The
>script thus needs to see all the files as if they were in one place.
>
>The logfiles on each machine are regularly archived and/or deleted,
>thus copying the logfiles is not ideal because it creates additional
>files that would need to be "managed".

A few suggestions.

1) Setup a logging server and log all your files directly to it.  Syslog has this ability so check it out.  Once you have them all on one server, just run your log checker there.

2) Rewrite your log checker to run on each of these servers and send the report to you.  In addition, you could then have a report agregator that will take this raw data and munge it into a nice consise report.

3) Create a daemon that is accessible via the network that will return the contents of these log files to you on request.  If the machines in question are running web server, you could just write a simple CGI script to do this.

4) Remotely access the file using SSH (see Richard's post).

5) Copy the files to your reporting system, run the report, delete the copied files.  No reason to keep them around as they were copied only to allow the report to run.

Of all of these, I like Richard's idea the best.  However, if you cannot (are not permitted) to setup the ssh keys as he describes, my other suggestions should help.

Andy Farnsworth


-- 
Gllug mailing list  -  Gllug@gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


