Raised This Month: $51 Target: $400
 12% 

[REQ] Auto Upload Logs to an external FTP


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sessus
Senior Member
Join Date: May 2006
Old 05-24-2008 , 23:31   [REQ] Auto Upload Logs to an external FTP
Reply With Quote #1

The Idea: Have a plugin upload the logs from the server running the plugin to an external FTP server. The upload should just be performed once daily and only include the relevant log-file (it would be great if the path for this could be altered, e.g. choose either the SM specific logs [$/addons/sourcemod/logs] or the logs for the entire server [$/logs]), which shows all the activities that were performed on the server for the day.

The reason behind it: Just to provide a chance for admins to check over activity of other admins and/or follow up complaints from clients that claim not have spammed etc. after having been banned from the server.
sessus is offline
teddyruxpin
Overseer of lost packets
Join Date: Feb 2008
Old 05-25-2008 , 04:07   Re: [REQ] Auto Upload Logs to an external FTP
Reply With Quote #2

IMHO you are better off using a crontab + rsync or a Scheduled Task + rsync to complete this task. Not really something I would see SourceMod doing as it is more of a system level task.

What OS are you running on I may already have an rsync / ftp shell script you can use. If you are using a Linux based OS you can also use 'grep|sed|awk' to quickly sort out the logs and scrape out the admin bits only.

-Teddy
teddyruxpin is offline
ottobohn
Senior Member
Join Date: Sep 2007
Old 05-25-2008 , 10:16   Re: [REQ] Auto Upload Logs to an external FTP
Reply With Quote #3

I agree with Teddy. The only option after this would be having the logs go directly into a mysql database remotely.

otto
ottobohn is offline
sessus
Senior Member
Join Date: May 2006
Old 05-26-2008 , 10:58   Re: [REQ] Auto Upload Logs to an external FTP
Reply With Quote #4

I run a box w/ the latest Debian release.

Thx for your tips. Any chance you'd be able to post those scripts here?
sessus is offline
teddyruxpin
Overseer of lost packets
Join Date: Feb 2008
Old 05-27-2008 , 16:26   Re: [REQ] Auto Upload Logs to an external FTP
Reply With Quote #5

Are you familiar with how to use 'ssh-keys'? If so check out this article and replace the 'DynaVol' with your remote linux host of choice. You will only need to have rsync with ssh shell access working and not the full rsyncd install.

Article here: http://ms.layeredtech.com/blog/blog/.../#comment-3594

Sample Script here:

http://ms.layeredtech.com/blog/downl...cbackup.sh.txt

You are mostly concerned about the backup dirs at the bottom. Change them to the locations of your log files on the host being backed up and it will replicate them every day at X time that you specify and only copy the data that has changed and not all data like FTP would. Saving you some b/w.

-Teddy
teddyruxpin is offline
maitredede
Senior Member
Join Date: May 2005
Old 06-02-2008 , 18:27   Re: [REQ] Auto Upload Logs to an external FTP
Reply With Quote #6

I +1 for mysql...

But, I think about the FTP idea is great too : I can't SSH to my rented servers...

So using the socket extension, someone can create a FTP extension to allow file upload...

But I prefere mysql logging...
__________________
make brain && make install
maitredede is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode