Remote Syslog Support

Any chance that remote syslog support will be added? I would like to send my logs to Splunk and play with building an OctoPrint Splunk App.

OctoPrint uses Python's logging framework. That in turn supports sending records to syslog. And OctoPrint also supports configuring the logging sub system through logging.yaml. So it more or less supports it already, you just need to configure the logging sub system accordingly.

Should logging.yaml exist by default? I have checked the entire volume (#find / -name logging.yaml" and I get no results. I have also looked at: /home/pi/.octoprint and I don't see it there either.

According to the link logging.yaml mentioned above, it's not typically there you have to create it.

Thanks, I will read some more, and see what I can come up with.

Jon

Just found this thread and wanted to do the same. Did anyone set this up? Looks straightforward using the Python HTTP logging handler to send to Splunk over HEC

https://docs.python.org/2/library/logging.handlers.html

I got this working by putting the following in /home/pi/.octoprint/logging.yaml

loggers:
  octoprint:
    level: INFO
    handlers: [syslog]

handlers:
  syslog:
    class: logging.handlers.SysLogHandler
    level: INFO
    address: [192.168.1.6, 514]

where 192.168.1.6 is the IP address of my syslog server