Jormungandr on Windows


Jormungandr on Windows

Setting Up Syslog

Install a third party syslog tool

Setting up a syslog server and forwarder is an optional step for your Jormungandr node on a Windows computer. It may becomes useful in future testnet phases.

There are many different Syslog servers available for windows. For this guide we will rely on the free and open-source community Edition of NXLog.

First, download the most recent pre-compiled windows binary from the NXLog download page

Logs and folders

After a default installation, I recommend editing the config file in

C:\Program Files (x86)\nxlog\conf\nxlog.conf

You can change the log folder by manually creating the subfolder /logs in the existing nxlog/data directory (optionally enable NTFS compression).

define LOGDIR %ROOT%\data\logs

If your windows system has a separate data partition (eg D:\ ) it is a good idea to create a D:\nxlog directory and subfolders \cache \log and \spool. Then change the config like this:

define DATADIR   d:\nxlog
define LOGFILE  %DATADIR%\log\nxlog.log

Moduledir %ROOT%\modules
CacheDir  %DATADIR%\cache
Pidfile   %DATADIR%\
SpoolDir  %DATADIR%\spool

Input and Output

Next let’s add some input- and output-modules and pair it with a forwarding route.

We listen for standard IETF Syslog messages as input on UDP IP port 514, and (for now) we want the messages written to a local output logfile.
The Route directive connects the defined input to output module.

<Input ietf>
 Module im_udp
 Port 514
 Exec parse_syslog_ietf();

<Output file>
 Module om_file
 File "D:/nxlog/log/sys.log"
   When    @daily
    file_cycle(file_name(), 30);

<Route ietf_to_file>
 Path ietf => file

Now it’s time to start the NXLog service in the Windows > Computer management > Services list.  The service was installed during NXLog setup and is configured to autostart after the operating system boots up next time.

You should see both nxlog.log and sys.log files in the configured nxlog > log folder. If the service does not start as expected you may see the reason in the NXLog install/data folder.

Test messages

Test the setup by generating some test syslog messages by downloading the SysLogGen command line tool (see page bottom) and execute the tool with these parameters

SyslogGen.exe -t: -f:1 -s:7 -tg:test -m:"Hello from Sys to Log"

Send Syslog to remote server

You can now add a second output directive to send the incoming syslog messages also to a remote syslog server

<Output testnetsyslog>
 Module om_udp
 Host []
 Port 514

<Route ietf_to_testnetsyslog>
 Path ietf => testnetsyslog

Now the incoming message is forwarded to both your local logfile and the remote syslog server.

Full NXLog documentation