{
	"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" : "tcp://localhost:514",
				"delimiter" : "priority"
			}
		}
	},

	"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" : "${JSON:2}",
				"json" : {
					"format" : true,
					"color" : true
				}
			}
		},
		"null" : {
			"type" : "null"
		}
	},

	"flows" : [
		{"from":"file", "processors":["timestamp"], "transporters":["syslog"], "mode":"parallel", "disabled":true},
		{"from":"syslog", "processors":["parser"], "transporters":["logger"], "mode":"parallel"}
	]
}
