I've been searching a few hours but couldn't find useful information. Just wondering if anyone know how to send log information by mosquitto_pub whenever logs get updated
I use syslog-ng I'd like to use mosquitto_pub to publish topic and message whenever the log (/var/log/syslog or other logs that are located in /var/log/) get updated.
eg.
/var/log/syslog new log Started on ttyS1.
then
mosquitto_pub -h 127.0.0.1 -t Started on ttyS1 -m "Started on ttyS1." automatically fires