Difference between revisions of "Cool Solution - Eventlog to Syslog"
From Univention Wiki
(Removed review status, fixed typos and added some hints)
Revision as of 12:16, 1 September 2016
If a central syslog logging server is used within a Univention Corporate Server (UCS) domain, one might want to connect Microsoft Windows servers and clients to it. Therefore, the Eventlog-to-Syslog service might be used.
This article describes the setup of the service.
The shown procedure works for all common Windows operating systems (XP, Vista, 7, 8, 8.1, Server 2003, Server 2008, Server 2012)
Create a file called eventlog.conf withing the directory /etc/rsyslog.d/ and insert the following content:
# Provides UDP syslog reception $ModLoad imudp $UDPServerRun 514
Explanation: At first, the input module for UDP (imudp) will be loaded to provide the ability to receive syslog messages via UDP. Then the UDP port on which the server listens is defined.
rsyslog has powerful features, including filters. You might want to have a look at the official documentation.
Save the config file and restart your rsyslog deamon:
service rsyslog restart
In the next step, a packet filter rule for the UDP server must be set. To do so, execute the following command:
ucr set security/packetfilter/package/rsyslog/udp/514/all=ACCEPT
Afterwards, restart the univention-firewall:
service univention-firewall restart
The serverside installation is now complete.
The following steps must be executed on every client from which you want the eventlogs in your syslog file.
- Download the Eventlog-to-Syslog service from its Website
- Extract the .zip file
Note: The next steps must be made on the commandline on your Windows Client with and Administrative user.
Change in the directory you extracted from the .zip file. Execute the following command while replacing [syslog server] with the IP adress of your remote logging server:
evtsys.exe -i -h [syslog server]
Afterwards, activate the service with
net start evtsys
Now, you should see the first log entries on your syslog server in /var/log/syslog. Log entries from your Windows clients always start with their hostname in front of the log messages.