-
Notifications
You must be signed in to change notification settings - Fork 1
/
nxlog.conf
67 lines (46 loc) · 1.63 KB
/
nxlog.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
## Please set the ROOT to the folder your nxlog was installed into,
## otherwise it will not start.
#define ROOT C:\Program Files\nxlog
define ROOT C:\Program Files (x86)\nxlog
Moduledir %ROOT%\modules
CacheDir %ROOT%\data
Pidfile %ROOT%\data\nxlog.pid
SpoolDir %ROOT%\data
LogFile %ROOT%\data\nxlog.log
<Extension _syslog>
Module xm_syslog
</Extension>
<Extension csv>
Module xm_csv
Fields dhcpID,dhcpDate,dhcpTime,dhcpDescription,dhcpIPAddress,dhcpHostName,dhcpMACAddress,dhcpUserName,dhcpTransactionID,dhcpQResult,dhcpProbationtime,dhcpCorrelationID,dhcpDhcid,dhcpVendorClassHex,dhcpVendorClassASCII,dhcpUserClassHex,dhcpUserClassASCII,dhcpRelayAgentInformation,dhcpDnsRegError
Delimiter ,
</Extension>
<Input dhcpWIN>
Module im_file
File "C:\\windows\\sysnative\\dhcp\\DhcpSrvLog-*.log"
SavePos TRUE
InputType LineBased
</Input>
<Processor parser>
Module pm_null
<Exec>
if $raw_event !~ /^\d\d,.+/ { # drop explanation lines (files head)
log_info('Removing "' + $raw_event + '"');
drop();
}
csv->parse_csv();
$EventTime = strptime($dhcpDate + " " + $dhcpTime,"%m/%d/%y %H:%M:%S");
$Message = $raw_event;
$SyslogFacility = "LOCAL4"; # Change as you wish if needed
$SyslogSeverityValue = 6; # Change as you wish if needed
to_syslog_bsd();
</Exec>
</Processor>
<Output syslogger>
Module om_udp
Host # your syslog address here!!!
Port 514
</Output>
<Route 66>
Path dhcpWIN => parser => syslogger
</Route>