Cool Solution - Eventlog to Syslog

From Univention Wiki

(Redirected from Eventlog to Syslog)
Jump to: navigation, search
Produktlogo UCS Version 4.1

Note: Cool Solutions are articles documenting additional functionality based on Univention products. Not all of the shown steps in the article are covered by Univention Support. For questions about your support coverage contact your contact person at Univention before you want to implement one of the shown steps.

Also regard the legal notes at Terms of Service.

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)

Installation

Server side

Create a file called eventlog.conf within 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.

Client side

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
  • Optional: Move the evtsys.exe somewhere more preferable, as it is going to get installed as a service.

Note: The next steps must be made on the commandline on your Windows Client with an 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


Note: The following additional command has to be executed under Windows 10, to make sure, that the service will get started automatically on reboot:

REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\EvtSys" /f /v "DependOnService" /t REG_MULTI_SZ /d eventlog\0LanmanServer\0netman


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.

Archive

There is a version of this article for UCS 3.2.

Personal tools