Ask A Question

Questions

1
ANSWERED

[Nxlog] How can I forward my logs on a local central server with Nxlog ?

If you want to centralize all your logs from several **originator servers** to a **collector server** before sending them to [logmatic.io](http://logmatic.io/), here is what you need to do: ##On the **Collector server** Add an input module into your collector server *nxlog.conf* file to listen to any tcp connections on a choosen port: ``` <Input input_collector> Module im_tcp Host 0.0.0.0 Port <your_choosen_port> </Input> ``` **The host field:** - This specifies the IP address or a DNS hostname which the module should listen on **to accept connections**. Because of security reasons the default listen address is localhost if this directive is not specified (the localhost loopback address is not accessible from the outside). You will most probably want to send logs from remote hosts, so make sure that the address specified here is accessible. **The any address 0.0.0.0 is commonly used here** Then edit your Route module of your collector server *nxlog.conf* file to forward all your log entries to logmatic.io: ``` ############ ROUTES TO CHOOSE ##### <Route 1> Path syslog,input_collector => out </Route> ``` ##On the **Originator server** Change the output module of your originator *nxlog.conf* file into: ``` <Output out> Module om_tcp Host <your_collector_server> Port <your_choosen_port> </Output> ``` **The host field:** This specifies the IP address or a DNS hostname to which the module should send the log entries

Posted by Pierre Guceski about a year ago