Documentation forKiwi Syslog Server

Add an action to log messages to a file in KSS NG

You can add an action to log messages to a file in the file format you select. By logging messages to a file, you can archive received logs for compliance with, for example, internal security or regulatory requirements.

You can also log messages to a file using a PowerShell script. See Log a message to a specified file for details.

  1. From the Kiwi Syslog NG navigation bar, choose Setup > Rules.
  2. Locate an existing rule. If the rule does not exist, add a rule and start the New Rule wizard.
  3. If you are adding an action to an existing rule, select the rule and click Edit. If you are creating a new rule, navigate to the Actions step of the New Rule wizard.
  4. Click Add Action. Define the action name in the provided field.
  5. In the Action drop down, select Log to a file.

  6. Specify the following options:

    Path and file name of log file

    Enter a path and file name, or browse to select a file. The default file location is <installPath>\Logs\SyslogCatchAll-$Message.DateISO.txt.

    To split incoming messages into multiple files, insert an AutoSplit value in the path or file name.
    For example, the current date variable $Message.Date is inserted in the default file name. This appends the date to the file name, so a new message log file is created for each day.

    To select a value:

    1. Place your cursor in the path or file name at the location you want to insert the AutoSplit value.
    2. Click the icon on the right and select the value.
    Log file format Specify the file format. You can select a standard format or create a custom format.

    Custom formats are listed at the end of the Log file format menu, after the standard and reserved formats.

  7. Check Enable Log File Rotation to enable automated log file rotation.
  8. If you are adding an action to an existing rule, click Apply. If you are creating an action in the New Rule wizard, click Add.

You can use schedules in KSS NG to automate log file archival and retention.