UNPKG

nsyslog

Version:

Modular new generation log agent. Reads, transform, aggregate, correlate and send logs from sources to destinations

87 lines (81 loc) 1.85 kB
{ "config" : { "datadir" : "/tmp/nsyslog", "input" : {"maxPending" : 1000}, "buffer" : {"maxPending": 1000}, "processor" : {"maxPending": 1000}, "transporter" : {"maxPending": 1000} }, "description" : [ "This configuration shows the use of syslog, both as transporter and as an input", "First, we read log files from log folder, and sends them to a syslog endpoint.", "Then, we create a syslog server that receives the messages, parse them and", "show them on screen" ], "inputs" : { "file" : { "type" : "file", "config" : { "path" : "/var/log/**/*.log", "watch" : true, "readmode" : "offset", "offset" : "start" } }, "syslog" : { "type" : "syslog", "config" : { "url" : "udp://localhost:514" } } }, "processors" : { "timestamp" : { "type" : "timestamp", "config" : { "output" : "timestamp" } }, "parser" : { "type" : "syslogparser", "config" : { "input" : "${originalMessage}" } } }, "transporters" : { "syslog" : { "type" : "syslog", "config" : { "url" : "udp://localhost:514", "format" : "${originalMessage}", "application" : "${filename}", "hostname" : "localhost", "level" : "info", "facility" : 5, "stream" : true, "tls" : { "key" : "./config/server.key", "cert" : "./config/server.crt" } } }, "logger" : { "type" : "console", "config" : { "format" : "${this}", "json" : { "format" : true, "color" : true } } }, "null" : { "type" : "null" } }, "flows" : [ {"from":"file", "processors":["timestamp"], "transporters":["syslog"], "mode":"parallel"}, {"from":"syslog", "processors":["parser"], "transporters":["logger"], "mode":"parallel"} ] }