Link to home
Start Free TrialLog in
Avatar of RDM1776
RDM1776

asked on

FreeBSD Logrotate and FTP

I am not a FreeBSD or Linux expert--quickly becoming so--and I have a server that generates large and frequent FreeRADIUS detail files. I was told that there is an built-in logrotate in FreeBSD, but my machine (inherited) doesn't have it. I need to install that, and then either have a log rotation to save disk space, or have a way to send the files--then delete them from the server--to a jumpbox to be accessed by ftp by other IT people who don't have access to the server. Is this possible? and how would it be done?

Thanks
Avatar of Aaron Tomosky
Aaron Tomosky
Flag of United States of America image

I'm also learning through experience with FreeBSD and From a similar situation I found rsyslog. It takes over syslog and can also pull log files if you can't write using syslog directly. Then I added the elasticsearch output module and push to an elasticsearch setup on centos that was super easy to create. From there you can use kibana or whatever you want to view the logs.

I know this isn't exactly what you asked about but I hope my limited experience can help in this area. If you need any more details I have notes of everything I did and config files.
Avatar of RDM1776
RDM1776

ASKER

Yes, I'd like to see what you have, it might work to give me an alternative solution.
BSD never had logrotate.
nesyslog is rotating logs and has good manuals (even less one might replace system's default logger with something blurry and unsecure)
SOLUTION
Avatar of Aaron Tomosky
Aaron Tomosky
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I wonder how that eventually can do any log rotation at all

pkg_add -r syslog-ng rsyslog
might be much faster and leave less dirt on the disk...
Rsyslog has an elasticsearch output module. Like I said before, pushing to that is all I have experience with and the author asked to see it
detail files is essentially logs by radius clients.
you can replace them with syslog, and plainly disable detail listener.
Avatar of RDM1776

ASKER

Or simply, is there an elegant way to just scp these files to another server that isn't quite as locked down, and just have a cron job that periodically deletes the files?
Maybe not create them first hand...
Well freebsd has cron too...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RDM1776

ASKER

I am so new at server management it is not funny. That said, I like that idea of a script, but I would need at least an example so that I have an idea of where to go with it.
The detail files come from remote devices
You can dysable them on remote devices while converting logging to syslog.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RDM1776

ASKER

These are decent directions to search to help me solve the issue. I'll have to research more and decide how to do it. Thanks