MediaBrowser / Emby

Emby Server is a personal media server with apps on just about every device.
https://emby.media
GNU General Public License v2.0
4.16k stars 809 forks source link

remote syslog support for Emby Server (linux) #1223

Closed the4ndy closed 8 years ago

the4ndy commented 9 years ago

Is there a way to dump Emby logs to a syslog server or is this feature on the roadmap or is there a work around or most likely im just a noob with Linux and cant figure out how to set up Emby logging to a syslog server. I have already added an entry to the rsyslog conf file on the server to log to my syslog server, but that doesnt appear to contain anything related to Emby or the Emby processes.

Any and all help is greatly appreciated.

Also, in case someone can point me in the right direction, the reason I am looking to get logging to a syslog server is because I am experiencing crashes while watching videos via the browser and I think the problem is that my server does not possess the resources to properly run Emby server. Thus I would like to examine the logs to hopefully detect the problem at hand. Also, if anyone knows the system requirements or preferred hardware to run a dedicated Emby server (ubuntu 14.04) that might make it blatantly obvious one way or another if system resources are an issue.

LukePulverenti commented 9 years ago

i'm not aware of anyone doing this as of yet but perhaps you can be the first and then show us how it's done. you can also always just find the logs folder and write some script to manipulate the files.

the4ndy commented 9 years ago

currently it seems that Emby outputs its logs (or at least the ones at the path listed in the web management interface) to text files but it doesn't appear to be using rsyslog to do this. Can anyone shed some light on how Emby logs to those files (there are transcode logs and basic server logs)?

Also, it appears that Emby was originally written for Windows and ported to linux as there appear to be a large number of DLL files involved in the operation of my server. I realize this is a super general question so maybe someone can point me to a document explaining all this, but what language is Emby written in primarily? How does Emby work essentially (like a 35k foot overview).?

Thanks again everyone for your help. I do intend to submit / share my end result with the community.

LukePulverenti commented 8 years ago

Emby is written mostly in C#. We use NLog for logging. You can probably write some kind of script to interact with the log files that are created. I'm closing this because there doesn't appear to be an actual issue, but discussion can continue.

metsuke0 commented 5 years ago

Examples of remote syslog support: https://docs.nginx.com/nginx/admin-guide/monitoring/logging/#logging-to-syslog https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#8.2.1

Remote logging is nice for containers and jails so that they don't have to store text files, and even if the local drive has I/O issues, logging can still occur. I use the ELK stack, and with most of my other applications, I forward all my logs directly to Logstash. As a paying supporter, this is a nicety that I'd be grateful for if it can be looked at in the midst of blockers and issues.

buccinator commented 2 weeks ago

second this, tired of telling family what the port is each time so setting up reverse proxy. not a fan of it being open on common ports though so would like to integrate it with fail2ban, for that would need the logs sent to the webserver(/syslog/somewhere-else)

https://github.com/luigiberrettini/NLog.Targets.Syslog https://emby.media/community/index.php?/topic/80753-how-to-fail2ban-configuration-using-linux/

softworkz commented 2 weeks ago

Emby Server creates log entries for authentication failures that are compatible with Fail2Ban

Please see here: https://emby.media/support/articles/Log-Files.html#fail2ban-support