Creating a Syslog-NG client

Procedure 44.  Configuring a Syslog-NG client

  1. Install the software: apt-get install syslog-ng

  2. Modify /etc/syslog-ng/syslog-ng.conf:

    1. Declare the name of the syslog server:

      destination syslog_server { udp(log.server.my.com); };
      	      

    2. Make the system log to the syslog server:

      log { source(src); destination(syslog_server); }; 1
      	      

      1

      Make sure to put this at the top of the list of log statements, before any statements that carry final flags.

  3. Restart the daemon: /etc/init.d/syslog-ng restart

  4. If you have a server running already, you can now test the configuration by logging on to the client and saying something like: echo "JohnDoe testing Syslog-NG" | logger

    You should see the message turn up in the log files of the server.