Example: File to MQTT - sipcapture/paStash GitHub Wiki
MQTT
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.
Setup
# npm install -g @pastash/pastash @pastash/output_mqtt @pastash/input_mqtt
Log Agent(s)
input {
file {
path => "/var/log/nginx/access.log"
}
}
output {
mqtt {
address => ["mqtt://broker.hivemq.com"]
topic => pastash
}
}
Log Server
input {
mqtt {
address => ["mqtt://broker.hivemq.com"]
topic => pastash
}
}
output {
loki {
host => localhost
port => 3100
path => "/loki/api/v1/push"
}
}