How to send Syslog to a non-boot USB key


Recommended Posts

I kept searching for a few days but I can't seem to find the topic correctly.

Currently using Unraid 6.11.5. Running smoothly but I still want to monitor the system log from time to time. However there is very little recorded onto my syslog, as it is only in RAM. I'd like to add a separate USB thumbdrive and point the syslog to record logs to it. 
I think my main issue here is that I can't create a Pool device out of that thumbdrive and then hotswap it whenever I need to read its contents. Because it's a pool, I keep thinking it will not be readable from my main Win10 workstation.

So how do I send the syslog to the USB key so that I can remove it whenever I want and hard-read it from a different PC?
I need configuration how-to steps, if they're available.
Thank you!

Link to comment
6 minutes ago, Kilrah said:

You should be able to mount as UD, but things will probably break when mounting/unmounting it in OP's scenario. Why not just write to a share and access it via the network?

The big disadvantage to writing it a share is the possible delay in waiting to spin up a HD and the problem with the data being caught in the write cache if the condition you are trying to catch is a lock-up or something similar.   That was the reason for suggesting using a SSD cache drive when the FAQ was written back in 2019. 

Link to comment

Request from OP:

23 hours ago, couzin2000 said:

So how do I send the syslog to the USB key so that I can remove it whenever I want and hard-read it from a different PC?

Comment In Thread:

1 hour ago, Kilrah said:
6 hours ago, Frank1940 said:

The big disadvantage to writing it a share is the possible delay in waiting to spin up a HD

Never said you'd set syslog to write to an HDD-backed share, that's the last thing you'd want... cache-only/prefer share of course.

 

@couzin2000, if you do as suggested (Even if you have to make a cache only share for the syslog) and export that share, you would be able to read it anytime when the server is running.  (The syslog server opens and closes that file for each write.)    The only time when it would not be available is if the server crashed.  You have not indicated that you needed to be able to address that particular issue.  By the way, I am assuming that you know that when the system restarts, the syslog server will be appending any new writes onto that file.  So you do have to monitor it as it will continue to grow.  (You don't want it get so large that finding something in it becomes a real issue in its self.)

 

 

Link to comment
On 11/19/2023 at 6:37 PM, Frank1940 said:

Request from OP:

Comment In Thread:

 

@couzin2000, if you do as suggested (Even if you have to make a cache only share for the syslog) and export that share, you would be able to read it anytime when the server is running.  (The syslog server opens and closes that file for each write.)    The only time when it would not be available is if the server crashed.  You have not indicated that you needed to be able to address that particular issue.  By the way, I am assuming that you know that when the system restarts, the syslog server will be appending any new writes onto that file.  So you do have to monitor it as it will continue to grow.  (You don't want it get so large that finding something in it becomes a real issue in its self.)

 

 

The only disadvantage I can see is not being able to boot after a critical failure, therefore having to use the backup from the boot device without seeing what can be at fault in the log. This is why I'd rather have the log be removeable and readable elsewhere.

Link to comment
On 11/19/2023 at 11:58 PM, Hoopster said:

I do this to send the syslog to a USB flash drive mounted as an unassigned device.

this  =   https://forums.unraid.net/topic/104938-syslog-to-ntfs-kingston-card-reader-unassigned-device/

 

@couzin2000, did you try the method suggested by @Hoopster.   It seems to meet all of your requirements...

Edited by Frank1940
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.