log all freenas rsync activity to remote syslog

I run a file server utilizing Freenas 7. I have freenas sending logs to a remote syslog server. Freenas only sends RSYNC "start" "end" messages to the remote syslog. I would like it to send all the RSYNC activity including the file changes to the remote syslog. I imagine this would need to be done through the command line since the web interface doesn't contain an option for this (at least not that i see). Any ideas how I could accomplish this?
Who is Participating?
gheistConnect With a Mentor Commented:
PS i do use FreeBSD, Linux and other general purpose operating systems. They have manuals (man intro) for beginner and advanced admins, visual package managers (sysinstall) and other luxury like X11 one might enjoy.

PPS I would suggest you get your hands on virtualbox and recent release of freebsd (disk1 iso is enough tp install sysinstall which in turn allows to get rsync + manuals) to have manuals for production system around when they are needed

i assume FreeNAS loggs through syslog

read the syslog.conf man page

syslog can be instructed to send anything it receives to a remote syslog, possibly keeping a local copy

the config is performed in the usual way, based on the facility, priority, or syslog_name (usually the name of the process)

beware, you should probably check wether FreeNAS overwrites this file periodically. i consider it is unlikely
In rsyncd.conf

transfer logging = yes
syslog facility = local3

In syslog.conf

local5.* @loghost # loghost can be name or IP
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

flyinace2Author Commented:
Hi gheist, you seem to be on the right track, but do you know where I find "Rsyncd.conf"? I cant find it in the Freenas directory.
should be in /usr/local/etc/ or possibly /usr/local/etc/rsync

if freenas performs the rsync over rlogin or ssh, you may not have an rsync daemon, in which case the server rsync is run on the server by the client, using the config file found in the user's home directory

but beware, it is very likely that freenas generates this file and will overwrite it either periodically or any time you use the admin interface which is why i suggested otherwise


it is also very unlikely that freenas itself does not provide a remote logging feature since it is built on top of monowall which as far as i remember can be instructed to do this


to do it using the syslog.conf file (located in /etc)


         A hostname (preceded by an at (``@'') sign).  Selected messages are
       forwarded to the syslogd(8) program on the named host.  If a port
       number is added after a colon (`:') then that port will be used as
       the destination port rather than the usual syslog port.

just find the line that corresponds to rsync and add @remote_host as gheist suggested


you can probably also replace the syslog program itself with a proxy that will forward datagrams to the remote server, possibly over ssh or even using ssh itself for extra security but i would not recommend doing this unless you really know what you are doing, which means know network and freebsd admin basics, but also freenas
Freenas 6 not freenas 7

On a FreeBSD you find one in /usr/local/etc/ or /usr/local/etc/rsync/ or .../rsyncd

find / -type f -name rsync*conf -print # is another good try

flyinace2Author Commented:
While all these suggestions seem very good, I can't find the rsync conf file anywhere on the Freenas 7 system. I even did a search in the file manager and it had no success...Any idea why or where else the rsync conf file might be hiding?
#> ps -auxww | grep rsync
either the config file is given on the command line, or it is in one of the locations specified in rsync manual page
i guess this could help when you need man pages


concerning how to start with Freebsd, i'd recommend the handbook (type freebsd handbook in google) and "man hier"

beware that freenas is a heavily customised freebsd system

most customisations can be found on the monowall site since freenas is based on their work
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.