Collect System Log

freddie_cox
Contributor III

I'm looking for ideas/best practices on remotely retrieving log files from a client over the internet.

I would like to have a Self Service policy that grabs and zips up the requested log files. Once compressed, I have had a few thoughts on where those files go for retrieval.

1) As an attachment to the Computer's record in the JSS using the API
2) File Upload via AFP/FTP/SCP/SFTP
3) *Insert your idea here!

Since this would be over the internet I'm looking for options that do not expose a username & pass in clear text and other clever ideas that you may use to gather larger files from your clients.

Thanks!

3 REPLIES 3

rderewianko
Valued Contributor II

Andrina has a nice script she's built and posted here, that uploads it if they have a mail client sent, if not instructs them to send the file to an email address.. More info here https://jamfnation.jamfsoftware.com/discussion.html?id=7174

freddie_cox
Contributor III

@rderewianko Thanks for the link! I searched here first because I knew someone else had already done something similar. However, I was unable to find her post in all of my valiant efforts.

Most of my users use Outlook Web Access so I was hoping to avoid relying on e-mail as a delivery method, even thought this gives a backup option for them to manually send the file. Even compressed, the system.log can easily bypass our email size sending limit.

stevewood
Honored Contributor II
Honored Contributor II

It may not get around sending limits in email, but the mail command from the command line, mixed with uuencode, will allow you to send attachments from the machine. I use the mail command to send violators of my "uptoolong" script an email indicating their machines have been up for over 10 days.

The command, combined with uuencode if you are sending a file, takes this format:

uuencode <file-to-send> <name-of-file-attachment> | mail -s "<subject line>" <email address>

The <name-of-file-attachment> is simply the name you want it to appear as in the email message. I tested this on my machine just now and it worked flawlessly. Again, it doesn't get around receiving limits, but it should get around sending limits.

You can check out this link for more info:

http://www.shelldorado.com/articles/mailattachments.html