You are not logged in.

#1 2014-07-29 18:56:02

oliver
Member
Registered: 2007-12-12
Posts: 406

how to archive a dynamic remote file?

A number of servers I use log their SNMP messages to a file called snmptraps.log but it's a rolling record of the last 1000 errors (FIFO) so it could be 30 minutes worth or 3 days worth depending on what's going on.

I would like to copy that file to my Arch box and have it grow incrementally throughout the day before being split using something like logrotate

Just to add to the fun, the log entries cover multiple lines in the following format so I can't easily copy and then delete duplicate lines (the first line of real output does include a unique trap number though)

<
20140727000001,123456,2
daemon name
error type
error msg 
>

I was trying to get this working with rsync but the --append option doesn't work the way I want it to :-)

How would you do this?  I have any tools in the repos/AUR at my disposal

Offline

Board footer

Powered by FluxBB