-
-
Notifications
You must be signed in to change notification settings - Fork 28
Example: File to MQTT
Lorenzo Mangani edited this page Mar 8, 2022
·
2 revisions
PaStash natively support MQTT (or Mosquitto) a high-performance asynchronous messaging library, aimed at use in distributed or concurrent applications without a dedicated message broker.
# npm install -g @pastash/pastash @pastash/output_mqtt @pastash/input_mqtt
input {
file {
path => "/var/log/nginx/access.log"
}
}
output {
mqtt {
address => ["mqtt://broker.hivemq.com"]
topic => pastash
}
}
input {
mqtt {
address => ["mqtt://broker.hivemq.com"]
topic => pastash
}
}
output {
loki {
host => localhost
port => 3100
path => "/loki/api/v1/push"
}
}