Hello everyone!
I’m setting up a SYSLOG server for my network ( guess I’m a little bit spoiled from work ) 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: https://www.home-assistant.io/integrations/system_log/
system_log:
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
notify:
- name: syslog2graylog
facility: local0
platform: syslog
#**/
automation:
- alias: Log errors to syslog
trigger:
platform: event
event_type: system_log_event
# condition:
action:
- service: notify.syslog2graylog
# data_template:
# title: lalatitle
# #message: '{{ trigger.event.data.message }}'
# message: '{{ trigger.payload }}'
# data_template:
data:
#message: '{{ trigger.event.data }}'
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!