System_log: events are not fired despite "fire_event: true"

Hello everyone!

I’m setting up a SYSLOG server for my network ( guess I’m a little bit spoiled from work :wink: ) and I would like to have the HASS information also within syslog.

As far as I can see, there is no direct way to achieve this.

But I did stumble on the “system_log” feature, which can be used to fire events.

#** Ref:

  fire_event: true

#** Log events to LOCAL (!) syslog
#** This does NOT send all messages from Logger to Syslog. It only allows you to
#** use notify.syslog2graylog to send messages like "push notifications" to syslog
  - name: syslog2graylog
    facility: local0
    platform: syslog

  - alias: Log errors to syslog
      platform: event
      event_type: system_log_event
#    condition:
      - service: notify.syslog2graylog
        # data_template:
        #   title: lalatitle
        #   #message: '{{ }}'
        #   message: '{{ trigger.payload }}'
#        data_template:
          #message: '{{ }}'
          message: "ss"

I played around a lot in order to get this work… hence all the lines with ‘#’.

I can get a message to syslog by using the Service notify.syslog2graylog from Lovelace. But it never gets fired from the automation.

What am I missing here? Any insights?

Thanks in advance!

Did you manage to solve it? I am having similar problems

Unfortunately not. I gave up on this as it seemed (at that time) that you could only send specific messages to syslog but not all above LEVEL.INFO for example.

I guess the only way right now would be to have syslog pick-up the homeassistant.log file itself.