How to setup EventReporter to view Windows Eventlogs in Adiscon LogAnalyzer.

This article will help you to setup an environment to log and store Windows Events at a central place using EventReporter, and view and search them using Adiscon LogAnalyzer. In addition, we show, how a report of the events from the last 24 hours will be created.

You can download a preconfigured configuration from this link and import that into your own system. The configuration sample contains comments for better understanding. EventReporter Client can import the XML/REG configuration file via the “Computer Menu”.

 

Table of Contents

1. Requirements
1.1 About the requirements
1.2 Installing and configuring WAMP
1.3 Installing MYSQL ODBC Connector
2. Installing and configuring EventReporter
2.1 Download and Install EventReporter
2.2 Setup Processing RuleSet
2.2.1 Setup Database Logging
2.2.2 Create the Database Action in EventReporter
2.3.1 Setup File Logging
2.4 Add EventLog Monitor Service(s)
2.5 Starting EventReporter and verifying the configuration
3. Install and Setup LogAnalyzer
3.1 Download and copy LogAnalyzer to the right location
3.2 Install and configure LogAnalyzer
4.0 Configuring a report with LogAnalyzer
4.1 Choosing a Report
4.2 Setting Filters
4.3 Testing and Automization
Final Thoughts

1. Requirements

1.1 About the requirements

If you already have a web server with PHP support and MYSQL Server running, you can skip step 1.1 and 1.2.

This can also be done with Internet Information Server, but this article focuses on using Apache to do the job.

So in order to setup LogAnalyzer later, you will need a web server with PHP support and a MYSQL Server with an administration interface. For these tasks, we recommend the following open source applications:

You can install and configure all these applications separately, but it is much easier to get WAMP for Windows. WAMP means Apache, MYSQL, PHP on Windows and combines all applications with a default configuration. This results in a system which can be used out of the box. So you do not need to worry about the Apache or MYSQL configuration, you just install WAMP first.

Download the latest WAMP Version from here:
https://www.wampserver.com/

Back to Top

 

1.2 Installing and configuring WAMP

After you downloaded WAMP, start the installation and follow the instructions.
Make sure you do not have a web server or MYSQL Server already installed because this could result in conflicts. Most often Microsoft ISS is already installed on the Windows platform. If so, there is no need to install WAMP, but you still need MySQL and php for IIS. This is described in another guide.I will use the default installation location in this article which is C:\wamp.
 Back to Top

 

Once the Installation is finished, a new Icon appears in Windows Icon tray. Click it, and choose “Localhost” from the menu to verify if the installation was performed successfully. If it was, you should see a web site looking like the one on the right.

To check if your MYSQL is running, click on the phpMyAdmin Menu button in the WAMP Menu, and login with the username “root” and no password – if you are asked for a login.

Back to Top

1.3 Installing MYSQL ODBC Connector

If you intend to store messages in MYSQL database, you need to install the MYSQL ODBC Connector. Otherwise you can skip this step.

EventReporter will need a MYSQL ODBC driver in a later step in order to write into the MYSQL database. These drivers have to be downloaded and installed separately from here:
https://dev.mysql.com/downloads/connector

If your Windows System is a x64 version, it is important to install the x64 Version of the MySQL Connector driver. As the EventReporter Service runs as a 64bit application itself, it will need the connector to be 64bit as well.

 

 

 

2. Installing and configuring EventReporter

2.1 Download and Install EventReporter

So if you have not done so already, go to eventreporter.com and download the latest EventReporter Version. It is always recommended to use the latest Version of EventReporter. Once the download has completed, go ahead and install it. Depending on your system, a system restart may be needed (but it usually is not)

 

2.2 Setup Processing RuleSet

Start EventReporter Client, and skip the First Startup Wizard.

Add a new RuleSet and call it “Store Logdata”.

 

Back to Top

 

 

2.2.1 Setup Database Logging

If you want to store messages inside MYSQL, follow this step.

Click on your WAMP Icon, and open the phpMyAdmin. Now Create a new database called “eventreporter”.

 

Back to Top

 

Once done, select the newly created database, switch to the “SQL” tab and copy the SQL statements from the textbox below.

Now insert the copied commands into the SQL field. Then Click “GO”, you should see “Your SQL query has been executed successfully” after that as well as two new tables on the left list called systemevents and systemeventsproperties.

Back to Top

 

2.2.2 Create the Database Action in EventReporter

Get back to the EventReporter Client and create a new Rule in your self-created RuleSet called “Database”. Then add a new “Write to Database” Action, and name it “MYSQL ODBC”. After creating this action, you should automatically be taken to the actions properties.

Click on the “Data Sources (ODBC)” button to open the System ODBC Administrator. Click on the “System DSN” Tab and add a new Datasource, select “MySQL ODBC 5.1 Driver” as driver. It is important to add a System DSN rather then a User DSN, because User DSN’s are not usable by the EventReporter Service (this is a Windows design restriction).

Name the new datasource “eventreporter” and use “localhost” as Server, “root” as username and no password. Then you are able to select the database which we created before called “eventreporter”.

Back to Top

 

Check the database logging action again, it should look like the one in the screenshot.

Back to Top

2.3.1 Setup File Logging

If you want to consolidate your Windows Events in one large logfile, proceed with this step. Otherwise you can skip this step.

  • Create a new rule called “File Logging” and add a “Write to File” Action.
  • Select Custom Line Format, use the following (use copy&paste to enter it):
Back to Top

 

Back to Top

2.4 Add EventLog Monitor Service(s)

Now add a Eventlog Monitor service. Inside that service, configure the logs to be monitored. For example you could only monitor the system or the security log. Just set the check markers as you like.

It may also be a good idea to set a syslog tag name that matches the log (or the function of the machine name, e.g. “server_1”). By doing so, you can easily filter inside LogAnalyzer.

Back to Top

 

Back to Top

2.5 Starting EventReporter and verifying the configuration

From the EventReporter configuration point of view, everything is setup now. So kindly start the EventReporter Service and wait a few moments, so that the data can be processed.

If you are using file logging, you should see that the logs folder on C:\ has been created and contains a WebServer.log file. If not, something went wrong. In this case please check the Windows Application EventLog for possible error reports from EventReporter.

 

 

Back to Top

 

If you are logging into a database, switch back to phpMyAdmin and browse through the systemevents table. You should see at least one data record in this table now, like in the screenshot sample. If not, something went wrong, in this case please check the Windows Application Event Log for possible error reports from EventReporter.

 

Back to Top

 

3. Install and Setup LogAnalyzer

3.1 Download and copy LogAnalyzer to the right location

If you are using MonitorWare Agent 6.0 or higher, a proper version of LogAnalyzer can be found in the MonitorWare Agent installation folder. If you are using an older Version of MonitorWare Agent or EventReporter, I recommend to download the latest stable or beta build from here: https://loganalyzer.adiscon.com/downloads
In this article I will use LogAnalyzer Version 3.2.1.

To unpack the install set, you need a program capable of processing tar.gz files. Most ZIP programs support this. If you do not have one, you can find WinRAR by following the link (we have no affiliation with the makers of WinRAR, but have found it to be a useful tool – use at your own risk).

Open windows explorer and go to the www folder of your Apache web server, which is the folder where you can place html/php files. By default this will be “C:\wamp\www” if you have installed WAMP into the default installation folder. Create a new folder called LogAnalyzer there.

If you downloaded and unpacked LogAnalyzer, and copy or move the content of the src folder into the C:\wamp\www\loganalyzer folder. If you have MonitorWare 6.0 or higher, you can use and copy the contents of the LogAnalyzer folder of your MonitorWare installation.

The explorer window should look like in the screenshot now.

Back to Top

 

3.2 Install and configure LogAnalyzer

Open this link to start the LogAnalyzer installation: https://localhost/loganalyzer/

If you do not see a page like in the screenshot, something went wrong in the steps before, please check them in this case.

Otherwise click on the text-link “here” on LogAnalyzer’s error page to start its installation routine.

Back to Top

 

Follow the installation steps of LogAnalyzer.

I recommend to “Enable User Database” in Step 3, as this will give you an advanced admin control panel. The User Database requires a MYSQL database to work, you can use the same one as you are using for EventReporter. 

Back to Top

 

If you are using MYSQL to store log messages and you have reached Step 7, switch the source type to “MYSQL Native” and name the Source “WebLogStore DB” Use “eventreporter” as Database Name and “root” as Database User. Leave the other configuration variables as they are, see the screenshot for how it should look like. Then click on the Next button to finish the installation.
After you finished the Installation of LogAnalyzer, you need to login and switch to the sources admin and configure the source “WebLogStore DB” there.

– In field “Message Parsers” add apache2 if you are using combined log format. Add apach2common if you are using common log format.

 

Back to Top

 

If you are using file logging and you have reached Strep 7, switch the source type to “Diskfile” and name the Source “WebLogStore FILE” Use “C:/logs/WebServer.log” as syslog file. Leave the other configuration variables as they are, see the screenshot for how it should look like. Then click on the Next button to finish the installation.
After you finished the Installation of LogAnalyzer, you need to login and switch to the sources admin and configure the source “WebLogStore FILE” there.

– In field “Message Parsers” add “eventlog” which is the required message parser to split the eventlog files correctly.

Back to Top

 

After clicking on the “Finish” link, you should see a working LogAnalyzer installation. If you do not see any data, there may be no data in your database yet. Otherwise you will see an error code and message from LogAnalyzer.

Back to Top

 

4.0 Configuring a report with LogAnalyzer

In this paragraph we want to show, how to create a Report to review the EventLog messages from the last 24 hours. The steps are pretty straight-forward.

 

4.1 Choosing a Report

Login buttonFirst of all use the Login Button to log in to your account. You can directly go to the admin center. As you can see, you get a new menu with a lot of submenus for customizing your configuration. But this is all not so interesting right now. All except the Report Modules. Click on the “Report Modules” button to get to the configuration menu. There you will find a overview of the installed reports.

Add SavedreportBy clicking on “Add Savedreport” at the report you want to configure, you get to a configuration window. For our example we need the EventLog Summary Report.

Back to Top

 

4.2 Setting Filters

Report configuration 01Here you can set various details like the name and description of the report, configure a filter for the report or set the Data Source you want to use and the output format. We need to add an additional filter. Choose the Date Filter and click on “Add filter”.

Report configuration 02 As you can see here, the filter has been added. By default it is set to the last 24 hours. So from the time of report creation until 24 hours in the past, all log messages will be taken into account. If you want, you can also change some of the other values, like “Max hosts”. This might even be necessary for larger environments. Now save this report by clicking on “Add Savedreport”. You will be automatically redirected to the report overview and your new report is ready to use.

Back to Top

 

4.3 Testing and Automization

Test ReportNow you can directly test the report by clicking the green arrow on the right. The report will be generated and (depending on your settings) stored or opened. The report will look like this:

Report configuration 03

If you want to schedule the report to be automatically generated, click on the name of your configured report. You get to the configuration window again. At the bottom of the form, you see a line with a console command.

Schedule ReportsThis is automatically generated when saving the report the first time. With this command line you can create a cron job or a scheduled task, which allows you to automatically generate the report at specific time intervals as you need it.

Back to Top

 

Final Thoughts

I hope this article will help you installing and configuring Loganalyzer and EventReporter. If you have problems or question related to this article, don’t hesitate to contact me or our support by email.

Please note that while this setup works, it is not very secure. At a minimum, it is recommended to set proper passwords for the databases (instead of using a password-less root account). Please review the relevant documentation on how to do that.

How to setup EventReporter to view Windows Eventlogs in Adiscon LogAnalyzer.
Scroll to top