fancy let's you fanout rsyslog
to Loki and is meant to be executed by rsyslog
under
omprog
module(load="omprog")
$template fancy,"%timegenerated:::date-rfc3339% %syslogseverity% %hostname% %programname%%msg%\n"
action(type="omprog" name="fancy" template="fancy" output="/var/log/fancy.log" binary="/opt/fancy --loki-url http://lokihost:3100")
rsyslog
. systemctl restart rsyslog