Microsoft Nano Server
This page describes the steps for installing and upgrading NXLog Agent on Microsoft Nano Server.
Installing NXLog Agent
Follow these steps to install NXLog Agent on Microsoft Nano Server.
Microsoft Nano Server does not support the installation of MSI files. In its place, Microsoft introduced the APPX format. The sandboxing and isolation imposed by the APPX format was found to be an unnecessary complication when deploying NXLog Agent; therefore, users are provided with a ZIP file that allows for manual installation instead. |
First, download the NXLog Agent ZIP archive from the NXLog website.
-
Log in to your account, then click My account at the top of the page.
-
Under the Downloads > NXLog Agent files tab, download
nxlog-6.4.9634_nano.zip
. -
Transfer the ZIP file to the Microsoft Nano Server machine. One way to do so is to use WinRM and the
Copy-Item
cmdlet. Uncompress the ZIP file atC:\Program Files\nxlog
using theExpand-Archive
cmdlet as shown below.PS C:\tmp> Expand-Archive -Path nxlog-6.4.9634_nano.zip -DestinationPath 'C:\Program Files\nxlog'
-
To register NXLog Agent as a service, navigate to the installation directory and execute the following command.
PS C:\Program Files\nxlog> .\nxlog.exe -i
-
Configure NXLog Agent by editing the
C:\Program Files\nxlog\nxlog.conf
file.
See Log collection in the NXLog Platform User Guide for more information and configuration examples.
For more details about configuring NXLog Agent to collect logs on Windows, see Microsoft Windows log sources.Because Microsoft Nano Server does not have a native text editor, you must edit the configuration file on a different system and then transfer it to the Nano Server machine. Alternatively, you can install a third-party text editor. -
Verify the configuration file syntax.
PS C:\Program Files\nxlog> .\nxlog.exe -v -c nxlog.conf 2018-09-12 19:15:55 INFO configuration OK
NXLog Agent is now installed, registered, and configured. Start the NXLog Agent
service by executing Start-Service nxlog
.
Installing NXLog Agent in a custom directory
This section deals with installation options outside the typical scenario.
The following installation options require altering the Windows Registry. Incorrect modifications could potentially render the system unusable. Always double-check the commands and ensure it will be possible to revert to a known working state before altering the registry. |
You can install NXLog Agent in a custom location on Nano Server.
-
Follow the same installation procedure outlined above, but choose a different
DestinationPath
when expanding the ZIP file. Remember to register the NXLog Agent service as shown above. -
At this point, you need to edit the registry entry for the NXLog Agent service. View the current setting:
PS C:\> Get-ItemProperty -Path "HKLM:\System\CurrentControlSet\Services\nxlog" Type : 16 Start : 2 ErrorControl : 0 ImagePath : "c:\Program Files\nxlog\nxlog.exe" -c "c:\Program Files\nxlog\nxlog.conf" DisplayName : nxlog DependOnService : {eventlog} ObjectName : LocalSystem PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\nxlog PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services PSChildName : nxlog PSDrive : HKLM PSProvider : Microsoft.PowerShell.Core\Registry
-
The value of the
ImagePath
parameter needs to be modified to update the location of both the NXLog Agent executable and the configuration file. For example, if NXLog Agent is installed inC:\nxlog
, execute the following command to update the registry key.PS C:\> Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Services\nxlog" -Name "ImagePath" -Value '"C:\nxlog\nxlog.exe" -c "C:\nxlog\nxlog.conf"'
-
The configuration file (
nxlog.conf
) also needs to be edited to reflect this change to a non-default installation directory. Make suredefine ROOT
points to the correct location.
Upgrading NXLog Agent
Follow these steps to upgrade NXLog Agent to the latest release. We recommend making a backup of the configuration files before starting this process.
-
Stop the NXLog Agent service by issuing the command
Stop-Service nxlog
. -
Back up any configuration files that have been altered, such as
nxlog.conf
,managed.conf
, and any certificates. -
Either delete the
nxlog
directory and follow the installation procedure again or use the-Force
parameter when extracting the NXLog Agent ZIP file. There is no need to register the service again.PS C:\tmp> Expand-Archive -Force -Path nxlog-6.4.9634_nano.zip -DestinationPath 'C:\Program Files\nxlog'
-
Restore any configuration files and certificates.
-
Start the NXLog Agent service by executing
Start-Service nxlog
.