Use our NXLog configuration to get Windows logs into LogDNA securely, quickly, and reliably.
Follow the steps to use NXLog for forwarding your Windows logs to LogDNA:
- Install
NXLog Community Edition
from here, or - Run
choco install -y nxlog
onPowerShell
(make surechoco
has been installed before running this command)
- Copy
nxlog.conf
to$NXLOGDIR\conf\nxlog.conf
whereNXLOGDIR
is the directory wherenxlog
is installed in - Modify
nxlog.conf
as described below:- Make sure to replace
CUSTOM_PORT
on line 84 with a provisioned custom port which can be obtained in the account-tailored add a log source instructions - Windows Event Logging is captured here:
- Uncomment the lines to enable logging from the specified channels
- Comment out the lines to disable logging from the specified channels
- Add custom channels to enable logging from into the same
Query
block
- Windows File Logging is capture here:
- All
input
,processor
, andoutput
channels are connected inroute
block:- Comment out the whole block and remove from the
route
to disable logging from specificinput
channel - Add new
input
modules with unique names to be added to theroute
to enable logging from new sources
- Comment out the whole block and remove from the
- Make sure to replace
- Download
ld-root-ca.crt
from here to$NXLOGDIR\cert\ca.pem
, or - Run the following
PowerShell
script:
$url = "https://assets.logdna.com/rootca/ld-root-ca.crt"
$output = "$NXLOGDIR\cert\ca.pem"
(New-Object System.Net.WebClient).DownloadFile($url, $output)
- Run
nssm start nxlog
onPowerShell
to startNXLog
- Run
nssm restart nxlog
onPowerShell
to get new configurational changes applied - Run
nssm stop nxlog
onPowerShell
to stopNXLog
Contributions are always welcome. See the contributing guide to learn how you can help. Build instructions for the agent are also in the guide.