Export logs to a remote syslog

I think as any system running in a network, Hassio should support the possibility to send all logs and data to a remote syslog.
As I understand, today hassio only supports a local syslog, which is really not sufficient enough.

I think Hassio should support a remote syslog server, both for normal OS logs but also authentication and all logs of what happens in the system.
This means this option needs to support all logs events that are in the system.

  • This could very well be an add-on that supports sending the data to a remote server using the standardized formats for syslog events.

I totally agree. The syslog component should be able to send logs to a remote syslog server. Just specify the IP and go!

3 Likes

Preferably also some settings like, what kind of logs do you want to send :slight_smile:
It might be alot if you want to send every single log event and maybe you are only interrested in the administrative logs.
And of course, if you send logs, and you change theese settings, thats also a log entry that should be sent.

Need access to rsyslog or a way to send logs to a syslog server. I would like to use graylog for advanced troubleshooting.

1 Like

I know this isn’t the same as full remote syslog, but I found a way to send notifications into syslog via netcat.

notify:
  - name: syslog
    platform: command_line
    command: "nc 10.10.10.10 -u 514 -w 1"
service: notify.syslog
data:
  message: <14>this is a test
3 Likes

I would also love this function. Much better to get alerts when something is wrong in HA.

Although it probably doesn’t cover all use-cases mentioned above, I just want to let you know that I created a Logspout add-on some time ago which can be used to send the container logs to rsyslog or some other log management system.

1 Like

its kind of crazy that this is not a thing. i use splunk for monitoring and the thing that needs the most monitoring … cant.

1 Like

Did you find a way to get your logs to Splunk somehow? I did find some adapters for Logspout so I might be able to add support to the Logspout Addon.

I think its also possible to use the syslog or GELF adapter for Splunk though which is already supported by the Logspoud addon.

I am sitting here ready to write a splunk add on for HA. Now I am sad.

I found this as a surprise, that Home Assistant Operating System does not support remote syslog :confused:

Now I’m thinking of migration to some other installation method, so I can access the raw logs…

Thanks! That’s very helpful. I’m running HA on a Synology and netcat is not available but socat is via the SynoCli Network Tools package. It can work the same way:

notify:
  - name: syslog
    platform: command_line
    command: "socat - UDP:192.168.1.100:514"

This works great, thanks!

The format of command_line notify has shifted to be under the command_line hierarchy. This is what my example looks like now:

command_line:
  - notify:
      name: syslog
      command: "nc 10.10.10.10 -u 514 -w 1"

Just here to upvote this and share our requirements and use case

We need to send logs via syslog to a specified remote server with a configurable destination IP, Port, and ideally, protocol (UDP/TCP). Syslog Facility and Severity parameters should be supported.

I’m in a business context in the IT department and we want to use Home Assistant and Konnected to create entry alarms which leverage installed sensors. The business policy requires that everything log to our remote centralized seim so we can coordinate physical and digital events.

Thanks very much.

1 Like

I would like to be able to add my logs to rsyslog server as well. Hope we can get this feature anytime soon.

1 Like