nsyslog
Version:
Modular new generation log agent. Reads, transform, aggregate, correlate and send logs from sources to destinations
78 lines (70 loc) • 1.45 kB
JSON
{
"config" : {
"datadir" : "/tmp/nsyslog",
"input" : {"buffer" : 1000},
"process" : {"buffer": 1000}
},
"register" : [
{"type":"input","id":"mypull","require":"examples/custom/pull-input.js"}
],
"inputs" : {
"file1" : {
"type" : "file",
"attach" : ["fork1"],
"config" : {
"path" : "/var/log/**/*.json",
"watch" : false,
"readmode" : "watermark",
"offset" : "start"
}
},
"file2" : {
"type" : "file",
"attach" : ["fork2"],
"config" : {
"path" : "/var/log/**/*.log",
"watch" : false,
"readmode" : "offset",
"offset" : "start"
}
},
"pusher" : {
"type" : "mypull",
"config" : {
"interval" : 100,
"threshold" : 1
}
}
},
"processors" : {
"aggregate" : {
"type" : "filter",
"config" : {
"mode" : "every",
"first" : false,
"every" : 50,
"ttl" : 5000,
"key" : "A",
"aggregate" : {
"count" : 1
},
"output" : "aggr"
}
}
},
"transporters" : {
"console" : {
"type" : "console",
"config" : {
"format" : "${JSON}"
}
},
"null" : {
"type" : "null"
}
},
"flows" : [
{"id":"fork1","from":"file1", "fork":true, "processors":["aggregate"], "transporters":["null"], "mode":"parallel"},
{"id":"fork2","from":"file2", "fork":true, "processors":["aggregate"], "transporters":["null"], "mode":"parallel"}
]
}