enterprise reporting - beyondtrust · 2020-05-18 · microsoft sql server reporting services 2008...

48
Defendpoint 4.3 Enterprise Reporting Setup Guide Enterprise Reporting October 2016 Setup Guide v1.2

Upload: others

Post on 19-Jul-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

Defendpoint 4.3 Enterprise Reporting Setup Guide

Enterprise Reporting

October 2016

Setup Guide v1.2

Page 2: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

2 Defendpoint 4.3 ER Setup Guide

Copyright Notice

The information contained in this document (“the Material”) is believed to be accurate at the time of printing, but no

representation or warranty is given (express or implied) as to its accuracy, completeness or correctness. Avecto Ltd, its

associated companies and the publisher accept no liability whatsoever for any direct, indirect or consequential loss or damage

arising in any way from any use of or reliance placed on this Material for any purpose.

Copyright in the whole and every part of this document belongs to Avecto Ltd (“the Owner”) and may not be used, sold,

transferred, copied or reproduced in whole or in part in any manner or form or in or on any media to any person other than in

accordance with the terms of the Owner’s Agreement or otherwise without the prior written consent of the Owner.

Accessibility Notice

In the event that you are unable to read any of the pages or documents on this website, please contact us and we will arrange

to get an accessible version to you.

Page 3: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

3 Defendpoint 4.3 ER Setup Guide

Table of Contents

Introduction and Overview ................................................................................................. 5

Configuration Options ........................................................................................................... 6

1.1.1. Option 1 – Single Box Solution ....................................................................................... 6

1.1.2. Option 2 – Enterprise Scaled Out Deployment ............................................................... 7

SQL Server Database ........................................................................................................... 7

Event Collector (Server) ........................................................................................................ 8

Reporting Server ................................................................................................................... 8

Client Configuration ............................................................................................................... 8

Database Sizing and Resource Consumption ...................................................................... 9

1.6.1. Data Retention Considerations ....................................................................................... 9

1.6.2. Database Sizing ............................................................................................................ 10

1.6.3. SSRS Sizing .................................................................................................................. 11

Defendpoint Reporting Database Installation ................................................................ 12

Pre-installation Tasks .......................................................................................................... 12

2.1.1. Accounts ........................................................................................................................ 12

Installation ........................................................................................................................... 14

Defendpoint Event Parser Installation ............................................................................ 19

Pre-installation Tasks .......................................................................................................... 19

3.1.1. Accounts ........................................................................................................................ 19

Installation ........................................................................................................................... 20

Defendpoint Reporting Pack Installation ........................................................................ 24

Pre-installation Tasks .......................................................................................................... 24

4.1.1. Accounts ........................................................................................................................ 24

4.1.2. Creating the ReportWriter Account ............................................................................... 26

Installation ........................................................................................................................... 27

Security Configuration ..................................................................................................... 31

SQL Server Reporting Services .......................................................................................... 31

Viewing Dashboards and Reports ................................................................................... 33

Upgrading Enterprise Reporting ..................................................................................... 37

Assumptions ........................................................................................................................ 37

Page 4: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

4 Defendpoint 4.3 ER Setup Guide

Upgrade............................................................................................................................... 37

7.2.1. Uninstall the Reporting Pack ......................................................................................... 37

7.2.2. Uninstall the Event Parser ............................................................................................. 38

7.2.3. Upgrade the database ................................................................................................... 38

7.2.4. Install the Event Parser(s) ............................................................................................. 38

7.2.5. Install the Reporting Pack ............................................................................................. 38

Database Maintenance ..................................................................................................... 39

Rebuilding Indexes .............................................................................................................. 39

Database Backups .............................................................................................................. 39

Creating a Maintenance Plan .............................................................................................. 40

Purging Defendpoint Data ................................................................................................... 40

8.4.1. Connecting to Enterprise Reporting .............................................................................. 40

Automatic Purging ............................................................................................................... 42

Manual Purging ................................................................................................................... 43

Shrinking the Database ....................................................................................................... 43

Database Population ........................................................................................................... 43

8.8.1. CopyFromStaging locking ............................................................................................. 43

8.8.2. Restarting the database ................................................................................................ 43

8.8.3. Recovering from a restart leaving the lock in place ...................................................... 44

Database error handling ...................................................................................................... 44

Appendix 1. Event Management and Behavior .......................................................................... 45

A 1.1.1. Event Parser SQL Connection .................................................................................. 45

A 1.1.2. Data Transmission .................................................................................................... 45

A 1.1.3. Monitoring and Recovery .......................................................................................... 45

A 1.1.4. Reprocessing Data .................................................................................................... 46

Page 5: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

5 Defendpoint 4.3 ER Setup Guide

Introduction and Overview

This document explains how to install and configure Avecto Defendpoint Enterprise Reporting, which

enables organizations to monitor and report on activity from Windows and Mac desktops and servers.

There are several methods available for centralizing audit data. The most common of these is

Windows Event Forwarding. Defendpoint Enterprise Reporting (ER) can use Windows Event

Forwarding to centralize audit data to one or more Windows Event collector server hosts. Please refer

to the Enterprise Reporting Event Centralization guide available from Avecto for more information.

Once audit data are collected, one (or more) instances of the Avecto Event Parser component load

the data into the Avecto Defendpoint database on a Microsoft SQL Server instance. All audit event

data are stored in one logical SQL Server instance.

ER reports provide visibility to the audit data. ER reports are implemented as custom reports in

Microsoft SQL Server Reporting Services 2008 R2 or later.

Microsoft SQL Server Reporting Services is typically hosted independently from the audit events SQL

Server database instance, except for small implementations and evaluation scenarios where it may

share the audit database server host.

Enterprise Reporting is also available in the Avecto Defendpoint ePO Edition. With the Defendpoint

ePO Edition, event centralization and report presentation are built on the ePO framework agent and

ePO server, with audit data storage in MSFT SQL Server as described in this guide. Please refer to

the Defendpoint ePO Administration Guide for instructions specific to the ePO Edition.

Page 6: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

6 Defendpoint 4.3 ER Setup Guide

Configuration Options

There are two options for deploying the solution:

Option 1 - use a single box solution, which is suitable for evaluating the product, or for SME

installations.

Option 2 - use a scaled out deployment, which is recommended for larger production

environments.

1.1.1. Option 1 – Single Box Solution

In this deployment scenario, a single server is used to provide all functions. This server should ideally

be running Windows Server 2008 or later (Server 2008 R2 recommended), but for evaluation

purposes it could be a client version of Windows, such as Windows 8.

SQL Server 2008 R2 or later should be installed on this server. SQL Server Express can be found

here:

http://www.microsoft.com/en-us/server-cloud/products/sql-server-editions/sql-server-express.aspx

Select the Reporting Services feature in the feature selections page of the MSSQL installer and, to

install Reporting Services, use “Native Mode”.

Database, Event Collector and Reporting Server

Forwarded Event Log

Microsoft SQL

Server Reporting

Services (SSRS)

Event Log

Client(s)

Web Browser

(Dashboard & Reports)

Defendpoint Client

Microsoft SQL

Server Database

Instance

Defendpoint Event

Parser

Page 7: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

7 Defendpoint 4.3 ER Setup Guide

1.1.2. Option 2 – Enterprise Scaled Out Deployment

In this deployment scenario the Event Collector(s), Database and Reporting Server are each installed

on their own dedicated server(s).

SQL Server Database

The database is used as a repository for all the data collected from the clients. The minimum version

of SQL Server required is SQL Server 2008 R2. Clustered databases are also supported.

Note: When you install SQL Server, you must select a case insensitive collation. We recommend you

select Latin1_General_CI_AS.

iC3 installations require Azure SQL Server which is also supported.

Windows Integrated Authentication must be used for Event Parser connections. SSRS connections

can use either Windows Integrated Authentication or SQL Server Authentication.

Note: TCP/IP Connections must be enabled on the SQL Server to allow the Event Collector service to submit

events.

Web Browser

(Dashboard & Reports)

Microsoft SQL

Server Database

Instance

Defendpoint Event

Parser

Forwarded Event Log

Microsoft SQL

Server Reporting

Services (SSRS)

Event Log

Client(s)

Event Collector(s) Reporting Server

Defendpoint Client

Page 8: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

8 Defendpoint 4.3 ER Setup Guide

The database is created during the installation of the Defendpoint Reporting Database component. By

default, the database is named AvectoPrivilegeGuard, and the installation provides the option to

provide a custom database name.

Note: Microsoft SQL Server CE is not supported.

Event Collector (Server)

The Defendpoint Event Parser is a service responsible for detecting new Defendpoint Events, and

submitting them to the database. Typically, the Event Parser is installed on a dedicated Windows

Event Collector Server, and by default will scan the ForwardedEvents Log for new events. The Event

Parser service may be configured to scan the Application Event Log if required to do so, by editing the

following Registry value:

HKEY_LOCAL_MACHINE\Software\Avecto\Privilege Guard Event Parser\

REG_SZ “EventLog”

It is recommended that the Event Collector host should be built on Windows Server 2008 R2 or later,

and ideally should be dedicated solely to this role. If you are using Windows Server 2008 as the Event

Collector, it is necessary to upgrade to Windows Remote Management 2.0. This will allow Windows 7

clients to be monitored without any additional configuration (Windows Server 2008 R2 already

includes WRM 2.0). You may configure multiple Event Collector servers which feed into a single

database.

Note: The Event Parser service(s) are the only components which establish direct connections to the events

database. This keeps the number of concurrent connections to a minimum.

Reporting Server

SQL Server Reporting Services (SSRS) 2008 R2 or later is required. The server should ideally be

dedicated solely to this role. Though the events database and SSRS can be hosted on the same SQL

Server instance, it is recommended that the SSRS instance should be separate from the database

instance, to prevent it impacting on the performance of the database.

The SSRS reports are installed and pre-configured during the installation of the Defendpoint

Reporting Pack component. By default, the SSRS instance is named ReportServer, and the SQL

Server installer provides the option to provide a custom name.

Client Configuration

Windows Event Forwarding is the technology used to gather events from the clients running

Defendpoint. Please refer to the Avecto Event Centralization guide, which details the installation and

configuration of Windows Event Forwarding, which should be configured for all of the computers

running the Defendpoint Client that need to forward events.

The minimum operating system level required on each client is Windows XP SP3. Events can be

forwarded to any of the supported Windows Server Operating system versions (Windows Server 2008

R2 through to through Windows Server 2012 R2).

Page 9: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

9 Defendpoint 4.3 ER Setup Guide

Each client must have Windows Remote Management (WRM) 1.1 or greater installed. The following

table details the default installation for each operating system:

Operating System Windows Remote Management Version

Windows XP SP3 Not Installed

Windows Vista 1.1

Windows 7 2.0

Windows 8 3.0

Windows Server 2003 Not Installed

Windows Server 2008 1.1

Windows Server 2008 R2 2.0

Widows Server 2012 3.0

As you can see from this table, only Windows XP and Windows Server 2003 clients require a version

of WinRM to be deployed. It is recommended that WinRM 1.1 (also known as WS-Management) is

deployed on these clients, which can be downloaded from here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=845289ca-16cc-4c73-8934-

dd46b5ed1d33&displaylang=en

Database Sizing and Resource Consumption

1.6.1. Data Retention Considerations

The Audit Event database and Microsoft SQL Server Reporting Services database used to support

Avecto Defendpoint Enterprise Reporting may be hosted and scaled independently.

It's important to identify the length of time that Defendpoint audit event data must be retained in the

Defendpoint database as it drives resource utilization projections, and initial allocation.

Defendpoint Enterprise Reporting is designed to report on activity in recent time, not as a long term

archival data storage solution.

Avecto provides a database purge utility that may be used to purge data manually, or

automatically on a configured period to ensure database growth is capped.

Unlimited database growth inevitably reduces query execution performance, and increases

resource utilization for queries.

Important: Prior to purging large sets of data, please ensure your SQL Transaction logs are able to grow to

accommodate. It may be necessary to delete data in stages when setting this up for the first time.

Page 10: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

10 Defendpoint 4.3 ER Setup Guide

In order to facilitate your decision making regarding retention time in the Defendpoint database,

please refer to the following sections in our standard documentation:

Description of the views of data exposed in Defendpoint Enterprise Reporting - the Reporting

Dashboard Guide.

Description of the events audited by Defendpoint in the Administration Guide: Auditing and

Reporting – Events.

Description of the Workstyle parameters. You may consider these as the fields that are

collected in the audit events, eventually stored in the Defendpoint Audit Events database.

Defendpoint Administration Guide: Workstyle Parameters.

1.6.2. Database Sizing

The Audit Event database has to be sized to accommodate substantial data volume, matching the

number of clients generating audit data and the desired retention period.

Database storage requirements may be estimated roughly using the following calculation:

Number of hosts

X Number of events per host per day

X 5Kb per event

X Number of retention days

For example, an organization of 10,000 hosts, with each host generating an average of 15 events per

day, requiring a 30 day retention would require a database capacity of:

10,000 X 15 X 5 X 30 = 22,500,000Kb, or 21.5Gb

A typical event volume would be 10-20 events per host per day and varies based on Defendpoint

auditing configuration, user job function (role/workstyle) and user activity patterns.

Note: Please refer to the Defendpoint Database sizing calculator to further explore database sizing and growth

expectations.

Database resource utilization (CPU, Memory) is highly variable depending on the hardware

platform.

Example Use Case Volumes

Based on an organization of 10,000 hosts requiring a 42 day (six weeks) retention.

Discovery: Between 40 – 60 events per machine per day

(4.6K per event (based on real world data))

Average total: 67.06 GB

Production: Between 2 – 10 events per machine per day

(4.6K per event (based on real world data))

Average total: 5.66 GB

Note: If the number of events ‘per machine per day’ is raised to 15 then the Average total increases to 16.99 GB

Page 11: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

11 Defendpoint 4.3 ER Setup Guide

Key considerations:

Volume of inbound audit event records

As seen above, the number of events per hour may be estimated following simple calculations.

The audit event records are bulk inserted (no integrity checks, transactions) in batches of 100 by the

Event Parser, and post-processed by a scheduled job that normalizes the audit event records into the

Audit Event database schema.

Queries triggered from MSFT SQL Reporting Services Reports

As the database grows in size, the resource impact of the reporting platform queries becomes

important.

The volume of data maintained in the audit event database will affect the duration and resource cost

of these queries.

To maintain good performance, it is recommended that the ER Purge Utility is used to limit the

timespan of audit event data retained in the database.

Finer-grained audit data management and clean-up is possible using the ER Database Administration

Dashboard. The Database Administration Dashboard allows the purging of audits related to specific

applications and suppression of incoming audit items related to those applications. For more

information please refer to the Database Administration description in the Reporting Dashboard

Guide.

Important: Prior to purging large sets of data, please ensure your SQL Transaction logs are able to grow to

accommodate. It may be necessary to delete data in stages when setting this up for the first time.

1.6.3. SSRS Sizing

The Microsoft SQL Server Reporting Services database remains relatively small and capacity

planning does not become important.

A dedicated server should be sized according to Microsoft SQL Server Minimum Specifications and

assessed periodically.

Page 12: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

12 Defendpoint 4.3 ER Setup Guide

Defendpoint Reporting Database Installation

The Defendpoint Reporting Database should be installed prior to the Event Parser. As part of the

install, you will specify the database connection details, and the installer will create the Defendpoint

database (if it doesn’t already exist).

Important: The Defendpoint Reporting Database installer creates a database and database permissions through

embedded SQL scripts. If your database administration team does not allow creation of databases, or database

permissions by installers, please contact Avecto support for assistance with an alternative approach.

Pre-installation Tasks

2.1.1. Accounts

Before commencing with the installation of the Defendpoint Reporting Database, it is recommended

that the following accounts are created.

Accounts Required for Installation

Name Details Account Type Permissions / Rights

DatabaseCreator Used by the

Reporting Database

installer to create

the Defendpoint

database

Windows

account or SQL

Authentication

account

SQL Server permission – sysadmin

Note: The database must be

installed by a user whose default

schema is DBO. For more

information, refer to

http://technet.microsoft.com/en-

us/library/ms190387(v=sql.105).aspx

Page 13: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

13 Defendpoint 4.3 ER Setup Guide

Accounts Required for Runtime

Name Details Account Type Permissions / Rights

EventParser Used by the Event

Parser service to

connect to the Avecto

database and write

event data

Windows

Account

SQL Server permission -

Database write access

Windows group member - Event

Log Readers

Windows permission -

Network access (for remote SQL

Server instance)

ReportReader Used by the Reporting

Pack reports to allow

read access to the

Defendpoint database

Windows

account or SQL

Authentication

account

Requires Log On Locally

rights on server hosting SSRS.

(SELECT and EXECUTE

permissions are assigned during

the installation process)

DataAdmin Used by the Reporting

Pack reports to allow

write access to the

Defendpoint database

to purge undesired

data.

This account, and

product feature is

optional – please see

section 4.2 Installation

for more information.

Windows

account or SQL

Authentication

account

Requires Log On Locally

rights on server hosting SSRS.

(SELECT and EXECUTE

permissions are assigned during

the installation process)

Note: If you are using a single server, as in Deployment Option 1, then you may wish to run the Defendpoint

Event Parser service as the SYSTEM account. In this scenario you can use the Database installer to configure

database access for the SYSTEM account.

Note: If Windows Authentication is specified for the SQL Connection, then the account of the installing user

MUST have Alter Any Login and Create Any Database permissions on the SQL Server instance, in order for

the Reporting Services Instance User to be created. If you receive an error 15247, verify these permissions have

been granted.

Page 14: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

14 Defendpoint 4.3 ER Setup Guide

Installation

To install Defendpoint Reporting Database, run the appropriate installation package with an account

that has DatabaseCreator privileges:

If you are running the installer on the database machine use DefendpointReportingDatabase.msi

If you are running the installer on a client machine use DefendpointReportingDatabase.exe

1. Run the appropriate installation package.

2. Click Next to continue. The License Agreement dialog will appear.

3. After reading the license agreement, select I accept the terms in the license agreement and

click Next to continue. The Database Server dialog will appear.

Page 15: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

15 Defendpoint 4.3 ER Setup Guide

4. Enter your name of the database catalog for Defendpoint audit data. click Next to continue.

The Configure Event Parser Database User dialog will appear.

5. Create or configure a user in the database for the Event Parser service to use. Click Next to

continue. The Configure Reporting Services Database User dialog will appear.

Page 16: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

16 Defendpoint 4.3 ER Setup Guide

6. Create or configure a user in the database to read data for the reports. Click Next to continue.

The Configure Data Admin Database User dialog will appear.

7. Create or configure a Data Admin user in the database. Click Next to continue. The Ready to

Install the Program dialog will appear.

Page 17: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

17 Defendpoint 4.3 ER Setup Guide

8. Click Install to complete the installation.

9. The status bar will display the progress of the installation.

Page 18: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

18 Defendpoint 4.3 ER Setup Guide

10. The InstallShield Wizard Completed dialog will be displayed.

Page 19: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

19 Defendpoint 4.3 ER Setup Guide

Defendpoint Event Parser Installation

The Defendpoint Event Parser should be installed on the Event Collectors (or the single server if

using Deployment Option 1). As part of the install, you will specify the database connection details for

the Event Parser to use to write to the Defendpoint database.

Pre-installation Tasks

3.1.1. Accounts

Before commencing with the installation of the Event Parser, it is recommended that the following

accounts are created. The installation steps in subsequent sections of this guide will refer to these

accounts.

Accounts Required for Installation

Name Details Account Type Permissions / Rights

ERInstaller Use this account to

install the Event

Parser

Windows

account

Windows permission - Local

Administrator

Accounts Required for Runtime

Name Details Account Type Permissions / Rights

EventParser Used by the Event

Parser service to

connect to the Avecto

database and write

event data

Windows Account

SQL Server permission -

Database write access

Windows group member - Event

Log Readers

Windows permission - Network

access (for remote SQL Server

instance)

Note: If you are using a single server, as in Deployment Option 1, then you may wish to run the Defendpoint

Event Collector service as the SYSTEM account. In this case you can specify the SYSTEM account as part of the

installation.

Note: The SQL Server configuration must have TCP/IP communications enabled to allow the Event Parser

Service to submit events to the database.

Page 20: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

20 Defendpoint 4.3 ER Setup Guide

Installation

To install Defendpoint Event Parser, run the appropriate installation package with an account that has

ERInstaller privileges:

Systems must be 64-bit. Run DefendpointEventParser_x64.exe

1. Run the appropriate installation package.

2. Click Next to continue. The License Agreement dialog will appear.

3. After reading the license agreement, select I accept the terms in the license agreement and

click Next to continue. The Destination Folder dialog will appear.

Page 21: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

21 Defendpoint 4.3 ER Setup Guide

4. If you wish to change the default installation directory then click the Change… button and

select a different installation directory.

5. Click Next to continue. The Database Server dialog will appear.

6. Specify the details of the database server. Click Next to continue. The Event Parser Service

dialog will appear.

Page 22: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

22 Defendpoint 4.3 ER Setup Guide

7. Specify the EventParser account for the Event Parser Service. Click the Browse button to

select the account if desired.

Note: This account will be added to the Event Log Readers group on the Event Collector server. It will also be

granted the Log on as a service right on the Event Collector server.

8. Click Next to continue. The Ready to Install the Program dialog will appear.

9. Click Install to complete the installation.

Page 23: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

23 Defendpoint 4.3 ER Setup Guide

10. The status bar will display the progress of the installation.

11. The InastallShield Wizard Completed dialog will be displayed.

Page 24: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

24 Defendpoint 4.3 ER Setup Guide

Defendpoint Reporting Pack Installation

The Reporting Pack should be installed on the SQL Server Reporting Services Instance (or the single

server if using a ‘single box’ solution).

Pre-installation Tasks

4.1.1. Accounts

Before commencing with the installation of the Reporting Pack components, it is recommended that

the following accounts are created. The installation steps in subsequent sections of this guide will

refer to these accounts.

Accounts Required for Installation

Name Details Account Type Permissions / Rights

ReportWriter Use this account to

install the Reporting

Pack

Windows

account

Windows permission - Local

Administrator

SSRS site level role - System

Administrator

Page 25: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

25 Defendpoint 4.3 ER Setup Guide

Accounts Required for Runtime

Name Details Account Type Permissions / Rights

ReportReader Used by the Reporting

Pack reports to allow

read access to the

Defendpoint database

Windows

account or SQL

Authentication

account

Requires Log On Locally

rights on server hosting SSRS.

(SELECT and EXECUTE

permissions are assigned during

the installation process)

DataAdmin Used by the Reporting

Pack reports to allow

write access to the

Defendpoint database

to purge undesired

data.

This account, and

product feature is

optional.

Windows

account or SQL

Authentication

account

Requires Log On Locally

rights on server hosting SSRS.

(SELECT and EXECUTE

permissions are assigned during

the installation process)

Page 26: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

26 Defendpoint 4.3 ER Setup Guide

4.1.2. Creating the ReportWriter Account

To add a System Administrator role to the Reporting Services site:

1. Browse to the SQL Server Reporting Services Report Manager URL (this can be located in

the Reporting Services Configuration Manager, under Report Manager URL).

2. Click on Site Settings and then select Security.

3. Click New Role Assignment, and enter the DOMAIN\Username of an authorized account.

Assign the username the System Administrator role.

4. Click OK to create the new role.

Page 27: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

27 Defendpoint 4.3 ER Setup Guide

Installation

To install the Defendpoint Reporting Pack:

1. Run the DefendpointReportingPack.exe installation package as a user with the ReportWriter

permissions:

2. Click Next to continue. The License Agreement dialog will appear.

3. After reading the license agreement, select I accept the terms in the license agreement and

click Next to continue. The Customer Information dialog will appear.

Page 28: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

28 Defendpoint 4.3 ER Setup Guide

4. Enter your name and the name of your organization and click Next to continue. The Database

Server dialog will appear.

5. Specify the details of the report server URL (the reports will fail to upload if you enter an

incorrect URL). You must also specify the database to be used by the SQL Server Reporting

Services instance.

6. If you are unsure of the correct Report Server URL to use, you can find it in the Reporting

Services Configuration Manager under Web Service URL:

Page 29: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

29 Defendpoint 4.3 ER Setup Guide

7. Click Next to continue. The Reporting Services Authentication dialog will appear.

8. Enter the ReportReader account as the account used to connect to the data source.

Note: This is used by the Reporting Services to connect to the database instance when generating dashboards

and reports. The account should be the same account that was specified as part of the Defendpoint Database

Installer.

Note: If Credentials stored locally in the report server is not selected, then any users authorized to access

Enterprise Reporting must have their account credentials added to the SsrsRole database role.

9. Click Next to continue. The Reporting Services Admin Authentication dialog will appear.

This feature is optional and may not be desirable in environments that need to keep tight

control over purging of audit data.

Page 30: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

30 Defendpoint 4.3 ER Setup Guide

10. The purpose of this report is to allow the purging (and subsequent exclusion) of applications

from the populating the database with unwanted data. For more information see the Enterprise

Reporting Dashboard Guide.

11. Use the DataAdmin account for this purpose.

12. Click Next to continue. The Ready to Install the Program dialog will appear.

13. Click Install to complete the installation.

Page 31: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

31 Defendpoint 4.3 ER Setup Guide

Security Configuration

SQL Server Reporting Services

If you chose Credentials supplied by the user running the report or Windows Integrated

Security for Reporting Services Authentication, then each user or group of users who are

permitted to view reports should be granted Browse permissions in SQL Server Reporting Services

(SSRS).

1. Browse to the SSRS Report Manager, using the ReportWriter account (you can locate the

correct URL from within the Reporting Services Configuration Manager, under Report

Manager URL):

Note: You may need to run Internet Explorer with Administrator rights to initially configure the security.

2. Click Folder Settings to view the security of the top level, and then click New Role

Assignment to grant access to a user or group.

3. Specify the group or user, tick the Browser role, and click OK.

Page 32: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

32 Defendpoint 4.3 ER Setup Guide

4. If the Data Administration reports were installed, security on the subfolder should restrict

access to the SSRS System administrator and users authorized to purge data.

Page 33: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

33 Defendpoint 4.3 ER Setup Guide

Viewing Dashboards and Reports

Once all components have been installed, and the security has been configured, the dashboards and

reports can be viewed. The starting point for the reports is ErpSummary, which you will find in the

Avecto Defendpoint (Privilege Guard) reports folder.

If you are unsure of the correct URL to use, you can find it in the Reporting Services Configuration

Manager under Web Service URL:

Note: By default, the web service URL is http://<reportingserver>/ReportServer

Once you have navigated to the correct URL, click on the Avecto Privilege Guard web directory, and

then click on the ErpSummary report:

Page 34: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

34 Defendpoint 4.3 ER Setup Guide

Note: Once you have navigated to the ErpSummary report, save the address to your browser’s Favourites list.

Page 35: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

35 Defendpoint 4.3 ER Setup Guide

There are several dashboards in Enterprise Reporting:

Summary - This report provides a summary overview of information that is available to query.

Discovery – A collection of reports that display the applications that are new to the database.

The information can be used to inform workstyle updates

Actions - Summarizes audited items categorized by the type of action taken. This allows

focusing on the topic of interest – elevation, blocking etc.

Target Types - Summarizes specific application types that have launched and have been

audited. This dashboard includes a sub-report All, where all raw application type data can be

viewed in a tabular report.

Workstyles - Summarizes all Defendpoint workstyle usage, including coverage statistics. It

identifies the top ten workstyles responsible for various application outcomes e.g. elevate,

blocked, passive audited or allocated a custom token. This dashboard includes a sub report

All, where all raw workstyle data can be viewed in a tabular report.

Users - Summarizes how users have interacted with messages, challenge / response dialogs

and the shell integration within the specified time range.

Deployments - Summarizes Defendpoint Client deployments. The report shows which

versions of Defendpoint are currently installed across the organization. It includes asset

information about endpoints such as operating system and default language to assist with

workstyle targeting.

Requests – Summarizes information about the requests that have been raised over the

specific time frame. A blocked message with a reason entered or a cancelled challenge /

response message is considered to be a request.

Events - Summarizes information about the different types of events that have been raised

over the specified time frame. It also shows how long it is since the different hosts raised an

event.

Database Administration – Exposes applications creating excess data that floods the

database and impacts performance. It allows purging and suppression of application audits

when applications are observed to create undesired audits.

Note: The Database Administration dashboard is not available from the Enterprise Reporting interface.

If they have been selected during the Reporting Pack installation (see section 4.1 Step 10)

they are available from the root directory: http://<reportingserver>/ReportServer/

1. Navigate to the root directory in the internet browser address bar and click on

Avecto Privilege Guard.

2. Click on Admin and then click on ErpEventsAdmin.

3. The Database Administration dashboard will be displayed.

For more information on the purging and suppression options available from the Database

Administration dashboard please refer to the Enterprise Reporting Dashboard Guide.

Page 36: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

36 Defendpoint 4.3 ER Setup Guide

There are also several summary reports for key items which are common throughout the various

Dashboards in Enterprise Reporting. Summary Reports are available anywhere that the Information

logo i is displayed, by clicking on the logo:

Application Summary Report - Detailed statistical overview of a particular unique application.

Event Summary Report - Detailed Event Log style summary of a specific event instance.

User Summary Report - Detailed statistical overview of a particular user account.

Host Summary Report - Detailed statistical overview of a particular host computer.

Workstyle Summary Report - Detailed statistical overview of a particular Defendpoint

workstyle.

Many charts and tables in the dashboards can be clicked to drill down into more detailed information.

For more information on the dashboards and reports in Enterprise Reporting, refer to the Enterprise

Reporting Reference Guide that is available on Connect.

Page 37: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

37 Defendpoint 4.3 ER Setup Guide

Upgrading Enterprise Reporting

Assumptions

This guide assumes that there is already a working installation of the Defendpoint Enterprise

Reporting (ER) 4.0 installed.

For Enterprise Reporting 4.1 the EventManagement installer has been split into two installers:

DefendpointEventParser

DefendpointReportingDatabase.

This is because in some configurations the Event Parser is not required.

Upgrade

The upgrade process is as follows:

1. Uninstall the Reporting Pack.

2. Manually delete the reports from SSRS.

3. Uninstall EventManagement (this will not delete the database.)

4. Install the database.

5. Install the EventParser.

6. Install the Reporting Pack.

This upgrade path can be applied to both standalone ER configurations and to configurations spread

over multiple machines.

Note: When installing ER, the Reporting Pack, Defendpoint Database and Event Parser installers should be the

same version e.g. “4.0.122.0”. However, it is permitted to use a different version of the Defendpoint Console and

Client in conjunction with ER, just be aware that the Defendpoint Client generates the data that populates ER, so

if any new features have been added to the reporting pack, it would only be populated if the Defendpoint Client is

on a version that supports the data generation.

7.2.1. Uninstall the Reporting Pack

1. Uninstall the Reporting Pack using the Program and Features Control Panel applet. This will

not delete the reports from SSRS.

2. Delete the reports from SSRS. The SSRS Report Manager interface can be used to delete

the top level Avecto Privilege Guard folder.

Page 38: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

38 Defendpoint 4.3 ER Setup Guide

7.2.2. Uninstall the Event Parser

Uninstall Event Management using the Program and Features Control Panel applet. This will not

delete the reporting database.

Note: Uninstalling Event Management will not delete the event log bookmark in the registry. This means that

when you install the new Event Parser it will carry on processing events from the same location in the event log.

7.2.3. Upgrade the database

1. Make sure that no Event Parsers are running (if you have uninstalled Event Management on

all the Event Collector machines then this will be the case.)

2. Make sure that there are no more pending events to be processed. You can do this by

checking that the Staging, Staging_ServiceStart, Staging_ServiceStop and

Staging_UserLogon tables are empty. If any events are present you should wait for them to

be processed before upgrading the database. This is because the upgrade will not proceed if

the CopyFromStaging procedure is running.

3. Run the DefendpointReportingDatabase installer and direct it to the existing database. This

will upgrade the database schema.

4. Note: You may see an error message “Please stop CopyFromStaging from running before

upgrading the database”. In this case make sure that no new events are being processed and

try again.

5. After a successful installation the database will now be in the newer format.

7.2.4. Install the Event Parser(s)

On your event collector machine(s) run the DefendpointEventParser_x64 installer to install the event

parser on the machine(s).

7.2.5. Install the Reporting Pack

Install the Reporting Pack. Your Enterprise Reporting system should now be upgraded to the newer

version.

Page 39: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

39 Defendpoint 4.3 ER Setup Guide

Database Maintenance

Microsoft SQL Server Management Studio offers database administrators (DBA) a set of tools for

ensuring that databases are optimized, regularly backed up, and free of inconsistencies. Tasks can

be created as Maintenance Plans, and the SQL Server Management Studio includes a wizard for the

creation of core Maintenance Plans.

Note: It is highly recommended that database maintenance tasks are performed only by qualified DBA’s.

Below are a subset of Maintenance Plan tasks Avecto recommends are configured for the

Defendpoint Enterprise Reporting database.

Note: Other Maintenance Plan tasks are offered by Microsoft SQL Server, and your DBA may suggest other

plans that best suit your organization.

Rebuilding Indexes

Microsoft SQL Server maintains indexes whenever events and data are added to or purged from the

Defendpoint database. Over time, these indexes may become fragmented. Heavily fragmented

indexes can cause degradations in database performance and result in increased report generation

times. Rebuilding the indexes will improve database performance and restore report generation times

to their optimum.

Therefore, it is recommended that a Maintenance Plan is applied to SQL Server to ensure that

indexes are regularly rebuilt.

If you are unsure of whether your Defendpoint Enterprise Reporting database indexes are causing a

degradation in performance, then you can observe their percentage fragmentation in SQL Server

Management Studio. The Processes table of the ER database is typically a high volume table, and

most likely will become fragmented first.

To check the index fragmentation of the ER database in SQL Server Management Studio:

1. Navigate to Databases > Avecto Defendpoint (Privilege Guard) > Tables > dbo.Processes

> Indexes.

2. Right-click on IDC Processes and select Properties.

3. In the Index Properties dialog, select Fragmentation.

4. The Total Fragmentation is displayed as a percentage.

Note: If you wish to perform a manual rebuild of a tables indexes, you can right click the Indexes node of any

table and select Rebuild All.

Database Backups

Backing up the ER database on a regular basis is important for preserving Defendpoint activity in the

event of a hardware or system failure on the SQL server that may cause a corruption. Backed up

databases can be quickly restored with minimum disruption to the business.

There are several options for backing up a different components of a database. Avecto recommends

performing a backup of the entire database.

Therefore, it is recommended that a Maintenance Plan is applied to SQL Server to ensure that the ER

database is fully backed up on a regular basis.

Page 40: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

40 Defendpoint 4.3 ER Setup Guide

Creating a Maintenance Plan

Maintenance Plans allow you to create a workflow of maintenance tasks in SQL Server to ensure that

your databases are fully optimized and backed up. Plans can be created manually, or by using the

built-in wizard, and can be performed manually or automatically on a schedule.

Note: Maintenance Plans are executed as SQL Server Agent jobs, and so the SQL Server Agent must be

running.

To create a Maintenance Plan in SQL Server Management Studio:

1. Navigate to Management > Maintenance Plans.

2. Right-click Maintenance Plans and choose Maintenance Plan Wizard.

3. Proceed through the wizard to the Select Maintenance Tasks page and check the following

recommended tasks (as a minimum):

Rebuild Index

Backup Database (Full)

4. Proceed through the wizard (setting any options as appropriate) to the Define Rebuild Index

Task page.

5. Select the AvectoPrivilegeGuard Database and click OK.

6. Proceed through the wizard (setting any options as appropriate) to the Define Back Up

Database (Full) Task page.

7. Select the AvectoPrivilegeGuard Database and click OK.

8. Set the backup schedule, backup location, and any other options as appropriate.

9. Proceed through the wizard (setting any options as appropriate). Click Finish to complete the

wizard and create the new Maintenance Plan.

The new plan will now be listed under the Maintenance Plans node and can be edited at any time.

The Maintenance Plan can be run manually by right-clicking and choosing Execute.

Purging Defendpoint Data

Enterprise Reporting includes an optional ER Purge Tool, which allows old data to be purged from

the Defendpoint database. The ER Purge Tool can be downloaded from the Avecto website. Once

you have installed the ER Purge Tool, it can be run from the Windows Start Menu.

Note: Prior to purging large sets of data, please ensure your SQL Transaction logs are able to grow to

accommodate. It may be necessary to delete data in stages when setting this up for the first time.

8.4.1. Connecting to Enterprise Reporting

When launched, you will first be asked to connect to the database you wish to purge. Enter the name

or IP Address of the SQL server instance and the name of the Defendpoint Database.

The tool supports either pass through Windows authentication, or you may specify an SQL account

and password by checking the Use SQL Authentication box.

Page 41: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

41 Defendpoint 4.3 ER Setup Guide

Note: You must connect to the SQL Server with db_owner privileges for both the Defendpoint database and also

the msdb database, in order to use the ER Purge Tool.

For convenience, successful connection settings (not including the password) are recalled the next

time the tool is run.

Once connected, the tool will begin to collect summary statistics for the database. These statistics are

collected in the background, and depending on the size of the database, may take several seconds to

appear.

Page 42: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

42 Defendpoint 4.3 ER Setup Guide

The statistics collected are:

Number of processes

Number of events

Number of user sessions

Number of host sessions

Note: The total number of events and processes may not be the same. This is expected as some actions, such

as Privilege Monitoring may generate multiple events for the same process.

When a purge is performed, then any data relating to processes, events, user sessions and host

sessions older than the specific period of months will be deleted.

The ER Purge Tool offers two modes of configuration, Automatic Purging and Manual Purging.

Automatic Purging

The ER Purge Tool allows you to configure an automatic purge job via the SQL Server Agent. If there

is an existing job configured on the SQL Server instance, then the current job settings will be

automatically populated, otherwise automatic purging will default to Do not automatically purge

data.

To configure an automatic purge:

1. Expand the drop down box and choose Automatically Purge Data.

2. Specify the number of months (1 to 12) for which older data should be purged.

3. Specify the frequency of how often the automatic purge should be performed (each day, each

week or each month).

4. Click Update Settings to create or update the automatic purge.

Note: In order to configure an automatic purge, the SQL Server Agent must be running.

Once configured, the SQL Server Agent will automatically purge data according to the age and

frequency set.

Daily – The purge will occur at 00:00:00 each day.

Weekly – The purge will occur at 00:00:00 each Monday.

Monthly – The purge will occur at 00:00:00 each first day of the month.

For advanced SQL administrators, the purge schedule may be further configured by editing the SQL

Server Agent job via the SQL Server Management Studio.

Note: If editing the SQL Agent job from within the SQL Server Management Studio, you may receive the

following error:

Page 43: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

43 Defendpoint 4.3 ER Setup Guide

Creating an instance of the COM component with CLSID {AA40D1D6-CAEF-4A56-B9BB-D0D3DC976BA2} from

the IClassFactory failed due to the following error: c001f011. (Microsoft.SqlServer.ManagedDTS)"

This is a known Microsoft issue. Please refer to http://support.microsoft.com/kb/2315727 for steps to resolve this

issue.

Manual Purging

If at any time you wish to perform a manual purge of Defendpoint data, you can use Manual Purging.

To configure a manual purge:

1. Specify the number of months (1 to 12) for which older data should be purged.

2. Specify a timeout in seconds for how long the purge task should be allowed to run before it is

terminated, or accept the default timeout of 300 seconds.

3. Click One-time Purge to activate the manual purge.

4. At the confirmation prompt, click Yes to confirm.

Once the purge operation has completed, you will receive a confirmation.

Note: The ER Purge Tool must remain running for the duration of the manual purge.

Shrinking the Database

If a large amount of data is being purged from the Defendpoint database, it is recommended that the

database is shrunk once the purge has completed. Shrinking the Database reduces the disk space

consumed by the database and log files by removing empty data and log pages.

A database shrink can be configured as a Maintenance Plan within SQL Server Management Studio,

and can be configured to run on a regular schedule.

Database Population

Event data enters the database using four “staging” tables - "Staging” for process type events,

“Staging_UserLogon” for user logon events, “Staging_ServiceStart” for service start events and

“Staging_ServiceStop” for service stop events. The data in these tables is then normalized across

the database by the “CopyFromStaging” stored procedure. This procedure is normally called every 10

seconds by a Service Broker contract. This is setup by the database installer.

8.8.1. CopyFromStaging locking

The “CopyFromStaging” stored procedure must have exclusive access to the staging data otherwise

data could be lost. To prevent it being run concurrently in separate sessions it creates a lock in the

form of a table “DPCopyFromStagingLock.” If this table already exists then the “CopyFromStaging”

stored procedure will terminate without processing any events.

8.8.2. Restarting the database

If the database is restarted when “CopyFromStaging” is running the lock table will be left in place. ”CopyFromStaging” is designed to detect that the database has been restarted and continued despite the lock table being in place. However if the account running ”CopyFromStaging” does not have the "VIEW SERVER STATE" permission then the detection method cannot run and “CopyFromStaging” will terminate without processing any events. To prevent this occurring you should either assign the “CopyFromStaging” account the

Page 44: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

44 Defendpoint 4.3 ER Setup Guide

"VIEW SERVER STATE" permission or follow the following procedure before restarting the database (or rebooting the database host.)

1. Prevent “CopyFromStaging” from being called by renaming it.

2. If CopyFromStaging is currently executing you should wait for it to complete. If it is still

executing then the “DPCopyFromStagingLock” table will be present. If you have instructed

CopyFromStaging to run for a certain amount of time by setting the

@MinDurationToRunForInMinutes parameter you can make CopyFromStaging stop after the

next batch by executing InterruptCopyFromStaging. Note that CopyFromStaging processes

a batch of 10000 events at a time. It checks the new events against existing events for

duplicates so if you have a large database then the processing of each batch can take some

time.

3. Restart the database / machine

4. Rename CopyFromStaging back to its original name.

8.8.3. Recovering from a restart leaving the lock in place

If you have restarted the database without following the above procedure then the lock may have

been left in place and CopyFromStaging will terminate without processing any events. If you are sure

that no events are being processed then you can delete the lock by executing the procedure

ReleaseStagingLock. This will result in any data in the current batch being lost. If you want to recover

without losing the current data please call Avecto Support.

Database error handling

If an error occurs during the execution of CopyFromStaging the batches in StagingTemp and the

three other StagingTemp_x tables are copied to StagingTempBadBatches and

StagingTemp_xBadBatches and the error message is stored in the StagingErrors table.

Processing of new events will then continue as normal.

If a batch has an error then the whole batch is copied into StagingTempBadBatches, not just the

bad rows. In order to process the data in StagingTempBadBatches and leave just the bad rows you

can call RetryCopyFromStaging. This will process the rows one at a time and leave only the

offending ones.

Note that if CopyFromStaging is running then RetryCopyFromStaging will not run. If you are

using the Service Broker you could temporarily rename CopyFromStaging to stop it being run

again. If you are using jobs you can disable the job. If CopyFromStaging has been told to run for a

long time you can call InterruptCopyFromStaging to tell CopyFromStaging to quit after the

current batch is processed.

Page 45: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

45 Defendpoint 4.3 ER Setup Guide

Appendix 1. Event Management and Behavior

A 1.1.1. Event Parser SQL Connection

The connection between the Event Parser and the Database is established using Microsoft SQL

Native Client (OLE DB) provider http://technet.microsoft.com/en-us/library/ms131687.aspx

The connection is secured using Windows Authentication.

The Avecto Event Parser executes as a Windows service using user credentials that have

access to insert data into the AvectoPrivilegeGuard Audit event database.

The connection is secured using Windows Authentication.

The Event Parser executes as a Windows service using user credentials that have access to

insert data to the AvectoPrivilegeGuard Audit event database.

The connection is established when the first event is processed, and kept open thereafter. If

the connection is broken while executing commands the parser will keep trying to recreate

connection. Data will not be lost due to an occasional loss of connection.

A 1.1.2. Data Transmission

The Event Parser service processes audit events in the shortest time possible, using a batching

approach.

Note: This number of events processed in each batch is not configurable in the current release

The Event Parser “subscribes” to the Event Log, and is notified of new events.

When the Event Parser is notified that new data is available, it processes all the events available in

batches of 100.

Audit data are inserted to the AvectoPrivilegeGuard Audit event database using bulk SQL insert to

optimize performance.

The AvectoPrivilegeGuard SQL database is designed to eliminate duplicate audit data, so there is no

need to roll back partial failures – transactional inserts are not used.

If data insert fails, the Event Parser will continue to retry, it will not skip over events.

For example, if the Event Parser Service’s account password expires, the Event Parser will fail to

establish or reconnect to the database and “get stuck” retrying the same insert until the condition is

rectified. This is by design, to ensure no data is lost.

If the failure persists for an extended period, the Windows Event Log may begin to “roll over” causing

the oldest audit events to be removed. Be sure to maximize the event log size, and monitor growth

rate to ensure audit data is retained as long as necessary.

A 1.1.3. Monitoring and Recovery

To diagnose failures in the Event Parser service look in the Windows Application event log on the

Windows Event Collector host.

The Event Parser service will raise events if errors occur, such as failure to connect to the database.

These events typically contain information required to diagnose the problem. If this is insufficient,

Page 46: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

46 Defendpoint 4.3 ER Setup Guide

debug logging can be enabled. The debugging logs are designed for advanced diagnostics by Avecto

staff.

Please open a support case for this as it is not something customers would be expected to handle on

their own.

A 1.1.4. Reprocessing Data

If, for any reason data needs to be reprocessed (such as if the database is deleted and recreated),

the Event Parser can be made to reparse the entire event log. This is always safe to do, as the

database is fully resilient to duplicate data being added - it will discard duplicate data.

Be aware that reprocessing all the events will cause a great deal of database activity in a short period

of time. It is best to plan this during periods of low activity in your environment.

To do this:

1. Stop the Avecto Defendpoint Event Parser service

2. Delete the registry key:

HKEY_USERS\<Event Parser User SID>\Software\Avecto\Privilege Guard Event

Parser\

3. Start the Avecto Defendpoint Event Parser service.

Page 47: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently

47 Defendpoint 4.3 ER Setup Guide

Page 48: Enterprise Reporting - BeyondTrust · 2020-05-18 · Microsoft SQL Server Reporting Services 2008 R2 or later. Microsoft SQL Server Reporting Services is typically hosted independently