Remote access to system logs

The .info file created by the safepoint create process is an easy (although unfriendly) way to remotely monitor safepoint creation via mycloud.com login.

This got my thinking, how about access to other system log files (residing in /var/log)?

I’m thinking of creating a syslog share and setting up some regular cron job to clone the important long files to that share. Then I would be able to access them remotely via mycloud.com (rather than needing to login to a PC on my home network).

Anyone done something like this or have any suggestions for a better solution?

Maybe you can just create a symbolic link to the log file in the new public share.

RAC

EDIT: Never mind the symbolic link won’t work permissions problems. Will need to use a cron job.

Another way would be to use vsftp. There is a program link putty called psftp.exe
I just did a test. I ran “psftp -l root” It asked for the password. After which I
“cd /var/log” then “get user.log” followed by “exit”
Now I have a co[y of the user.log on my PC. The commands in quotes is entered without the quotes. vfstp is enabled by default.

RAC

You can set the syslog daemon to forward messages to a remote syslog server.

I think I’ll do something like this (in crontab at 5 minute intervals)

tail -n50 /var/log/wdnas.log > /shares/Syslog/wdnas.log

Where Syslog is a the name of the share I setup for this.

Are there any other /var/log files that have useful information related to the operation of the device?

Add to /etc/fstab:

/var/log   /DataVolume/shares/Public/logs     none    bind,ro,uid=root,gid=users    0       0

Then - create folder and mout that dir:

mkdir /DataVolume/shares/Public/logs mount -a
Notes:

  • Change /DataVolume/shares/Public/logs to any other folder (Include private)
  • uid = user, gid = Group. Change root/users to any other user if you want access to logs from private share
  • Maybe need change “users” to “share” (Or “shares”). ls -la /DataVolume/shares/Public and see what correct.

I like this idea. I want to have it mounted under shares/Royce/logs and be private to me only. I already have the Royce share setup with Public access off and me having full access. I am a little vague as to what to set the uid and gid values for the fstab entry. If I set uid=royce and gid=shares would that work?

I didn’t see any group called users.

Try both.
For correct user/group run this:
ls -la /DataVolume/shares/

For testing:

[code]umount /shares/Public/logs

change uid/gid and folder in fstab

mount -a[/code]