PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple...

41
PRTG DB PLUGIN USER MANUAL CORP-IT 9/17/2019 V 1.1 Abstract The purpose of this document is to describe the prerequisites, to configure and to use the PRTG DB Plugin application.

Transcript of PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple...

Page 1: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB PLUGIN USER MANUAL

CORP-IT 9/17/2019

V 1.1

Abstract The purpose of this document is to describe the prerequisites, to configure and to use the

PRTG DB Plugin application.

Page 2: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 2 of 41

TABLE OF CONTENTS

1 INSTALLING THE PRTG DB PLUGIN .................................................................................................... 6

1.1 PREREQUISITES .................................................................................................................................. 6

1.1.1 SQL Server Express ..................................................................................................................... 7

1.1.2 IBM DB2 Driver ............................................................................................................................. 8

1.1.3 SAP HANA .................................................................................................................................. 11

1.1.4 .NET Framework 4.5 ................................................................................................................... 12

1.1.5 IBM Informix ................................................................................................................................ 13

1.2 MAIN INSTALLATION ........................................................................................................................... 17

2 WORKING WITH PRTG DB PLUGIN UI ................................................................................................ 20

2.1 HOME ............................................................................................................................................... 20

2.1.1 Generate parameters .................................................................................................................. 24

2.1.2 Execute query ............................................................................................................................. 25

2.2 PROFILES .......................................................................................................................................... 26

2.3 QUERIES ........................................................................................................................................... 27

2.3.1 Query format ............................................................................................................................... 27

2.3.2 Query example ............................................................................................................................ 28

2.3.3 Query result ................................................................................................................................. 28

2.3.4 XML result ................................................................................................................................... 28

2.3.5 Comment section ........................................................................................................................ 29

2.4 ABOUT .............................................................................................................................................. 29

3 WORKING WITH PRTG DB PLUGIN CONSOLE ................................................................................. 31

3.1 LICENSING SPECIFIC PARAMETERS ..................................................................................................... 31

3.1.1 Help ............................................................................................................................................. 31

3.1.2 Activate the trial license .............................................................................................................. 31

3.1.3 Validate a full license .................................................................................................................. 33

3.1.4 Deactivate license ....................................................................................................................... 34

3.1.5 Remove all licenses .................................................................................................................... 34

3.1.6 Remove specific license .............................................................................................................. 34

3.1.7 Remove all hosts ......................................................................................................................... 34

3.1.8 Remove specific host .................................................................................................................. 34

3.2 GENERAL USE ................................................................................................................................... 35

3.2.1 Profile and Query ........................................................................................................................ 35

3.2.2 Manually specify parameters ...................................................................................................... 35

3.2.3 Debug .......................................................................................................................................... 37

4 PRTG IMPLEMENTATION ..................................................................................................................... 38

4.1 ADDING A CUSTOM SENSOR IN PRTG ................................................................................................. 38

Page 3: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 3 of 41

4.2 MENTIONS ......................................................................................................................................... 40

4.2.1 Recommendations ...................................................................................................................... 40

4.2.2 Limitations ................................................................................................................................... 41

Page 4: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 4 of 41

TABLE OF FIGURES FIGURE 1 - THE FIRST WINDOW IN INSTALLER ........................................................................................................ 6

FIGURE 2 - PREREQUISITES WINDOW ................................................................................................................... 7

FIGURE 3 - SQL SERVER EXPRESS DOWNLOAD .................................................................................................... 7

FIGURE 4 - SETUP FILES ...................................................................................................................................... 8

FIGURE 5 - IBM DB2 DRIVER DOWNLOAD ............................................................................................................. 8

FIGURE 6 - IBM DB2 DRIVER INSTALLATION ......................................................................................................... 9

FIGURE 7 - SETUP LICENSE AGREEMENT .............................................................................................................. 9

FIGURE 8 - INSTALLATION TYPE .......................................................................................................................... 10

FIGURE 9 – INSTALL CONFIRMATION ................................................................................................................... 10

FIGURE 10 - IBM DB2 DRIVER INSTALLATION ..................................................................................................... 11

FIGURE 11 - SAP HANA DRIVER INSTALLATION .................................................................................................... 11

FIGURE 12 - SAP HANA INSTALLATION CONFIRMATION ......................................................................................... 12

FIGURE 13 - .NET PREREQUISITE ...................................................................................................................... 12

FIGURE 14 - IBM INFORMIX CHECKBOX .............................................................................................................. 13

FIGURE 15 - DOWNLOADING IBM INFORMIX ........................................................................................................ 13

FIGURE 16 - INSTALL INFORMIX CLIENT ............................................................................................................... 14

FIGURE 17 - INSTALL C++ .................................................................................................................................. 14

FIGURE 18 - C++ ALREADY INSTALLED ............................................................................................................... 15

FIGURE 19 - INFORMIX SLA ............................................................................................................................... 15

FIGURE 20 - INSTALLATION LOCATION................................................................................................................. 15

FIGURE 21 - INSTALL SET .................................................................................................................................. 16

FIGURE 22 - INSTALLATION SUMMARY ................................................................................................................ 16

FIGURE 23 - INSTALLATION COMPLETE ............................................................................................................... 16

FIGURE 24 - MAIN INSTALLATION ........................................................................................................................ 17

FIGURE 25 – SERVER CHOICE ............................................................................................................................ 17

FIGURE 26 – EXISTING DATABASE DETECTION .................................................................................................... 18

FIGURE 27 – INSTALLATION CANCELED ............................................................................................................... 18

FIGURE 28 – INSTALLATION CONFIRMATION ........................................................................................................ 19

FIGURE 29 – HOME PAGE .................................................................................................................................. 20

FIGURE 30 - ADD PROFILE WINDOW ................................................................................................................... 21

FIGURE 31- EDIT PANEL .................................................................................................................................... 22

FIGURE 32 - ADD QUERY ................................................................................................................................... 23

FIGURE 33 - QUERY TEXTBOX ............................................................................................................................ 23

FIGURE 34 - QUERY SELECTION ......................................................................................................................... 24

FIGURE 35 - GENERATE RESULT ........................................................................................................................ 25

FIGURE 36 – EXECUTE QUERY ........................................................................................................................... 25

FIGURE 37 - PROFILES PANEL ............................................................................................................................ 26

FIGURE 38 - QUERIES PANEL ............................................................................................................................. 27

FIGURE 39 - COMMENT SECTION ........................................................................................................................ 29

Page 5: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 5 of 41

FIGURE 40 - ABOUT ........................................................................................................................................... 30

FIGURE 41 - HELP ............................................................................................................................................. 31

FIGURE 42 - APPLICATION WITH PROFILE AND QUERY .......................................................................................... 32

FIGURE 43 - APPLICATION WITH PARAMETERS ..................................................................................................... 32

FIGURE 44 – LICENSE STATUS INFORMATION ...................................................................................................... 33

FIGURE 45 - RETRIEVE MACHINE ID ................................................................................................................... 33

FIGURE 46 - ACTIVATE LICENSE ......................................................................................................................... 33

FIGURE 47 - DEACTIVATE LICENSE ..................................................................................................................... 34

FIGURE 48 - REMOVE ALL NONEXPIRED LICENSES .............................................................................................. 34

FIGURE 49 - REMOVE SPECIFIC LICENSE ............................................................................................................ 34

FIGURE 50 - REMOVE SPECIFIC HOST ................................................................................................................ 34

FIGURE 51 - REMOVE ALL HOSTS....................................................................................................................... 35

FIGURE 52 - PROFILE AND QUERY PARAMETERS ................................................................................................. 36

FIGURE 53 - MANUALLY SPECIFIED PARAMETERS ............................................................................................... 37

FIGURE 54 - DEBUG ........................................................................................................................................... 37

FIGURE 55 - ADD SENSOR 1 .............................................................................................................................. 38

FIGURE 56 - ADD SENSOR 2 .............................................................................................................................. 39

FIGURE 57 - EXE/SCRIPT ADVANCED ................................................................................................................. 39

FIGURE 58 - SENSOR SETTINGS ......................................................................................................................... 40

Page 6: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 6 of 41

1 INSTALLING THE PRTG DB PLUGIN

PRTG DB Plugin UI can be used on multiple servers with the same license and database. If

the PRTG Network Monitor is not installed on the machine, it will only install the PRTG DB Plugin

UI.

You need to install DB Plugin on each PRTG Probe server where you want to create

DB Plugin sensors.

Figure 1 - The first window in installer

1.1 Prerequisites

When you click on next, the second window will appear, containing information about the

prerequisites.

When a driver is missing, it will be checked by default. Otherwise, it will be unchecked and will

appear as already installed.

You may choose only those drivers that you need. If, for example, you do not want to monitor

IBM DB2 database, you can uncheck IBM DB2 Driver.

Drivers for MSSQL, MySQL and Oracle are always installed. Drivers for IBM DB2 and SAP Hana

are optional.

Page 7: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 7 of 41

Figure 2 - Prerequisites Window

1.1.1 SQL Server Express

DB Plugin requires a MSSQL database. If you already have a SQL instance available

where you want to place this database, you can deselect SQL Server Express and choose existing

SQL Instance in later step.

If you do not have any MSSQL Instance (2012 SP1 and newer), you can choose to install

the free version of MSSQL Express locally on your PRTG server or you can manually install this

product on any other system in your environment reachable from PRTG server.

You need sysadmin role (or dbcreator and securityadmin roles) on the SQL server for the

installation phase. MSSQL database need to be accessible from each DB Plugin installation.

Figure 3 - SQL Server Express download

Page 8: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 8 of 41

If you choose to install SQL Server Express via the installer, it will download and install a

SQL instance locally for you. Your Windows account will be granted sysadmin role on the instance.

Figure 4 - Setup files

1.1.2 IBM DB2 Driver

If the checkbox is checked, the IBM DB2 client will be downloaded and installed. This is an

optional step required only if you plan to monitor IBM DB2 instances. The IBM DB2 Client installation

consumes about 350MB of space. It also requires an internet connection.

Figure 5 - IBM DB2 Driver download

Page 9: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 9 of 41

When the download is completed, the below window appears. If you click on Next, the

Software License Agreement appears. If you click on Cancel, the installation of the driver will be

interrupted.

Figure 6 - IBM DB2 Driver Installation

To continue with the installation of the driver, it is required to have the first box checked as

in Figure 7 after which, you can click on Next to continue.

If you click on Cancel, the installation of the driver will be interrupted. If you click on Back, the

installation will return on the previous step.

Figure 7 - Setup License Agreement

Page 10: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 10 of 41

After that, the Installation type window will appear. The installation type needed is Typical.

Figure 8 - Installation Type

After you click on Next, the window in Figure 9 will appear.

Once the Install button is pressed, the installation starts.

Figure 9 – Install Confirmation

Once the instalation is complete, you will be prompted with a confirmation window as in

Figure 10.

Page 11: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 11 of 41

Figure 10 - IBM DB2 Driver installation

1.1.3 SAP HANA

If the checkbox is checked, the SAP Hana Driver will be installed. This driver is part of the

DB Plugin installer and does not need to be downloaded, hence there is no need for an internet

connection to finish this step.

Figure 11 - Sap Hana Driver Installation

Page 12: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 12 of 41

Once the installation is completed, a confirmation message such as in Figure 12 will appear.

Figure 12 - Sap Hana installation confirmation

1.1.4 .NET Framework 4.5

On older Operating Systems such as Windows Server 2008 R2 or older, .NET Framework

4.5 is not installed by default.

If .NET Framework 4.5 is not installed when initializing the installation, the installer will notify

you and automatically check the relevant box in the Prerequisites list.

Figure 13 - .NET Prerequisite

Page 13: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 13 of 41

1.1.5 IBM Informix

If the checkbox is checked, the IBM Informix client will be downloaded and installed. This is

an optional step required only if you plan to monitor IBM Informix instances.

Figure 14 - IBM Informix Checkbox

After selecting the IBM Informix Client SDK option and selecting Next, it will start

downloading the IBM Informix installer.

Figure 15 - Downloading IBM Informix

Page 14: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 14 of 41

Figure 16 - Install Informix Client

If Microsoft Visual C++ is not installed on your system, it will ask you for approval to install

it.

Figure 17 - Install C++

If it is already installed, you can close the message that pops up.

Page 15: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 15 of 41

Figure 18 - C++ Already Installed

After accepting the Software License Agreement, you can choose the installation path, the

install set (Typical recommended) and start the installation.

Figure 19 - Informix SLA

Figure 20 - Installation Location

Page 16: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 16 of 41

Figure 21 - Install Set

Figure 22 - Installation Summary

When the installation has finished, you will receive a confirmation message.

Figure 23 - Installation Complete

Page 17: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 17 of 41

1.2 Main Installation

After all drivers are installed, a window such as in Figure 14 will appear. To start the main

installation, you must check I agree to the License terms and condition and click on Install.

Figure 24 - Main Installation

Afterwards, the Configure SQL Server Connection window will appear as shown in

Figure 15.

Figure 25 – Server Choice

After you click on Install, the installation will begin. The first time the application is

installed, it creates a new database on the chosen server with new SQL login. After that, every

Page 18: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 18 of 41

time you try to install it on the same server, it will notify you that the database already exists as

shown in Figure 16.

Figure 26 – Existing Database Detection

If you select OK, the installation will continue as shown in Figure 18, and if you select

Cancel, it will end the wizard without installing the DB Plugin as shown in Figure 17.

Figure 27 – Installation Canceled

Page 19: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 19 of 41

Figure 28 – Installation Confirmation

Page 20: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 20 of 41

2 WORKING WITH PRTG DB PLUGIN UI

2.1 Home

The first page of the application is the place where you can:

- add or edit profiles/queries

- generate sensor parameters in format -profile:<profile_name> -query:<query_name>

that can be used to create a sensor in PRTG

- execute a query to see its XML representation directly in UI for testing and debugging

purposes.

Figure 29 – Home page

You can add a profile from the Home page by selecting Add in the Profile panel. When the

database type is selected from the dropdown men, the rest of the fields will be visible:

To add a profile, there are some mandatory fields that are necessary to complete. These are:

- Profile: Mandatory field. Represents the name of the profile, which cannot contain

spaces.

- Host: Mandatory field. Use hostname, IP address or SQL Server name

- Database: Mandatory field only for DB2, Oracle and SAPHANA database type.

Represents the name of the database.

Page 21: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 21 of 41

- Port: Optional field. For MYSQL, if it is not filled, the default value will be 3306. For

ORACLE, if it is not filled, the default value will be 1521. For DB2, if it is not filled the

default value will be 5000.

- Authentication: The default authentication type is “SQL Authentication”. If the database

type chosen is MSSQL, you can choose “Window authentication”. In this case, your

Windows user is used for execution in UI and PRTG Service account or Device Windows

credentials are used when scanning the sensor from PRTG. For the rest of the database

types, the authentication is set to “SQL authentication” and cannot be modified.

- User / password: Mandatory fields, except for MSSQL, when using Windows

Authentication.

After all the required information has been filled in, you can save the profile by selecting Save at the

bottom of the window.

Before saving, you also have the option of testing the configuration by selecting Test.

Figure 30 - Add Profile Window

Page 22: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 22 of 41

If you want to edit a profile, you can do so by selecting Profile from the dropdown menu, after

which you need to select the Edit option.

Figure 31- Edit Panel

To add a query from the home window, it is necessary to click on the add button from the

query panel. The following fields are mandatory:

- Name: Mandatory field. Represents the name of the query, which cannot contain spaces.

- Path: Optional field. If you want to load a query from a file click Upload button and browse

to your file. The query can be added from a .txt or .sql file.

- Query: Mandatory field. If you choose file upload, your query is loaded here and you can

review and edit the query in the Edit window. To write a new query, click on the pencil

icon.

Page 23: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 23 of 41

Figure 32 - Add Query

After that, a new window will appear, where you can input the script.

Figure 33 - Query Textbox

On the query textbox you will find a help button. If you hover over it, a popup window will

appear which contains information about the structure of the script:

Page 24: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 24 of 41

- Database type: Mandatory field.

- Description: Optional field.

- Tag: Optional field. Enter any relevant tags separated by comma – (,). These tags can be

use later to easily search and filter queries.

To save the query, you will need to select Save. To cancel, you will need to select Cancel.

If you want to choose a query, you need to select a Profile first. Only queries matching the

DBMS profile type will be available.

You can edit a query by selecting it from the dropdown menu on the Queries panel and

selecting the Update option.

Figure 34 - Query Selection

2.1.1 Generate parameters

You need to select both, Profile and Query to be able to Generate parameters for a PRTG

Sensor.

Page 25: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 25 of 41

Figure 35 - Generate Result

2.1.2 Execute query

You need to select both Profile and Query to be able to Execute the query. The result is an

XML formatted data prepared for PRTG processing. This can be used for testing and troubleshooting

your queries. For details about the Query design, see chapter 2.3 Queries

Figure 36 – Execute query

Page 26: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 26 of 41

2.2 Profiles

A profile represents your Database servers / instances.

You can see the saved profiles on the Profiles panel. From this panel, you can Add, Edit or

Delete profiles.

Figure 37 - Profiles Panel

To search for a profile, use the search field on the right side. The search is performed on

Host and Database names.

To add a profile, you need to select the Plus icon, which is available on the left side in the

header section of the table.

To edit a profile, you need to select the Pencil icon, which is available on the left side of

each row, excepting the ones that have the database type as title.

To delete a profile, you need to select the Trash icon, which is available on the left side of

each row. Once the option is confirmed, the profile is deleted.

Page 27: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 27 of 41

2.3 Queries

On the queries panel, you will find the queries that have been added to the database. From

this panel, you can add, edit or delete queries.

Figure 38 - Queries Panel

2.3.1 Query format

The query result is expected to have 2 or 3 columns in specific format.

Column 1

Name: Channel (not case sensitive)

Type: VARCHAR, NOT NULL

Purpose: name of the channel in PRTG Sensor

Column 2

Name: Value (not case sensitive)

Type: INT | FLOAT (numeric)

Purpose: numeric value for the channel in PRTG

Column 3

Name: Channel_Settings (not case sensitive)

Type: VARCHAR, XML format

Purpose: PRTG channel configuration according to Paessler documentation.

Page 28: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 28 of 41

Column 4

Name: Error (can be 1 or 0)

Type: BIT (numeric)

Purpose: Setting a sensor status.

Column 5

Name: Text (case sensitive)

Type: VARCHAR

Purpose: Displaying a message on the sensor in PRTG.

2.3.2 Query example

SELECT DB_NAME(database_id) as Channel, sum(size * 8/1024) as Value,

'<Unit>Custom</Unit> <CustomUnit>MB</CustomUnit>' as Channel_Settings FROM sys.master_files GROUP BY database_id

2.3.3 Query result

Channel Value Channel_Settings

master 6 <Unit>Custom</Unit> <CustomUnit>MB</CustomUnit>

tempdb 72 <Unit>Custom</Unit> <CustomUnit>MB</CustomUnit>

model 16 <Unit>Custom</Unit> <CustomUnit>MB</CustomUnit>

msdb 15 <Unit>Custom</Unit> <CustomUnit>MB</CustomUnit>

PRTG_DB_Plugin 16 <Unit>Custom</Unit> <CustomUnit>MB</CustomUnit>

2.3.4 XML result <prtg>

<result>

<channel>master</channel>

<value>6.00</value>

<Unit>Custom</Unit>

<CustomUnit>MB</CustomUnit>

</result>

<result>

<channel>tempdb</channel>

<value>72.00</value>

<Unit>Custom</Unit>

<CustomUnit>MB</CustomUnit>

</result>

<result>

<channel>model</channel>

<value>16.00</value>

<Unit>Custom</Unit>

<CustomUnit>MB</CustomUnit>

</result>

<result>

<channel>msdb</channel>

<value>15.00</value>

Page 29: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 29 of 41

<Unit>Custom</Unit>

<CustomUnit>MB</CustomUnit>

</result>

<result>

<channel>PRTG_DB_Plugin</channel>

<value>16.00</value>

<Unit>Custom</Unit>

<CustomUnit>MB</CustomUnit>

</result>

<result>

<channel>zPlugin Execution Time</channel>

<value>0.1760474</value>

<unit>TimeSeconds</unit>

<float>1</float>

</result>

</prtg>

2.3.5 Comment section

Within the UI, you can use the auto-complete functionality. This can be used to complete the

input from a query file or window by using comment tags (eg. @NAME:'query name').

Figure 39 - Comment Section

2.4 About

The About section contains information about the license that you have activated. The license

is shown in a green background if it is active, on an orange background if the support date is expired

and on a light gray background if the license is expired.

Page 30: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 30 of 41

Figure 40 - About

Page 31: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 31 of 41

3 WORKING WITH PRTG DB PLUGIN CONSOLE

When you are starting to work with the PRTG DB Plugin, the first step is to open a Command

prompt window with administrator rights on the drive where PRTG is installed (by default: C:\).

For example: C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML

3.1 Licensing specific parameters

3.1.1 Help

To receive more information about parameters, you can run the application with the -GetHelp

parameter as shown in Figure 30 or without any parameters.

Figure 41 - Help

3.1.2 Activate the trial license

For licensing purposes, you are required to use the main machine. The main machine is

the system on which the application (PRTG_DB_Plugin.exe) is executed for the first time and is the

place from where you have full access and from where all licensing parameters can be used.

The trial license has 30 days validity.

You will not be able to use licensing specific parameters on any other server besides the

main machine.

That can be obtained at first execution of the application as in Figure 31 or Figure 32 or

when you have created a sensor in PRTG.

Page 32: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 32 of 41

Figure 42 - Application with profile and query

Figure 43 - Application with parameters

Page 33: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 33 of 41

After that execution, a trial license will be activated. If the trial is successfully activated, when

the application is executed as in Figure 33, you will receive the following information.

Figure 44 – License Status Information

After the Trial is expired, at the next execution, a free license will be automatically

activated, which includes 5 DBMS instances.

3.1.3 Validate a full license

To validate a full license, you are required to send us the machine id. For that, you must call

the console application with the -GetID parameter as shown in Figure 34.

Figure 45 - Retrieve Machine ID

After you receive the license, you can activate it. For that, you must call the console

application with the -validate:<license key> parameter as in Figure 35. After the license is

successfully activated, you will receive a confirmation message.

Figure 46 - Activate License

Page 34: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 34 of 41

3.1.4 Deactivate license

When you want to deactivate a license, you must call the console application with the -

deactivate:<license key> parameter as in Figure 36. That can be done in 30 days after you have

activated the license.

Figure 47 - Deactivate License

3.1.5 Remove all licenses

When you want to remove all nonexpired licenses from the database, you must call the

console application with the -RemoveAllLicenses parameter as in Figure 37.

Figure 48 - Remove All Nonexpired Licenses

3.1.6 Remove specific license

When you want to remove a specific license from the database, you must call the console

application with the -RemoveLicense:<license key> parameter as in Figure 38.

Figure 49 - Remove Specific License

3.1.7 Remove all hosts

When you want to remove all hosts from database, you must call the console application

with the -RemoveAllHosts parameter as shown in Figure 39. This can be done only once per day.

Figure 50 - Remove Specific Host

3.1.8 Remove specific host

When you want to remove a specific host from the database, you must call the console

application with the -RemoveHost:<IP Address> parameter as shown in Figure 40.

After it was successfully executed, you will receive a confirmation message.

Page 35: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 35 of 41

Figure 51 - Remove All Hosts

3.2 General use

You can execute the console in 2 ways:

3.2.1 Profile and Query

- -profile: followed by a profile name defined in DBPluginUI

- -query: followed by the name of the query as shown in Figure 31

3.2.2 Manually specify parameters

You can execute the console and manually specify the parameters:

-host: followed by a host or IP. This parameter is mandatory.

-database: followed by the database name. Mandatory field only for DB2, Oracle and SAPHANA

database type.

-SID: followed by SID. This parameter is mandatory for Oracle database.

-port: followed by the port number. This parameter is optional. For MYSQL, if it is not filled, the

default value will be 3306. For ORACLE, if it is not filled, the default value will be 1521. For DB2, if

it is not filled the default value will be 5000.

-WA: followed by 0 or 1.

- 0 is the value for SQL server authentication

- 1 is the value for windows authentication (MSSQL Specific)

The default value is 0. If the database type chosen is MSSQL, you can choose 1, for “Window

authentication”. In this case, your Windows user is used for execution in UI and PRTG Service

account or Device Windows credentials are used when scanning the sensor from PRTG. For DB2,

MYSQL, Oracle and SAPHANA database type, WA is set to 0 and cannot be modified.

-user: followed by username. The parameter is mandatory for DB2, MYSQL, Oracle and SAPHANA

database type and for MSSQL when WA is set to 0 or when it is not specified.

Password is mandatory for DB2, MYSQL, Oracle and SAPHANA database type and for MSSQL

when WA is set to 0 or when it is not specified. For password, you can use one of the options -PWD

or -PWDNE, not both at the same time.

Page 36: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 36 of 41

-PWD: followed by the encrypted password. To encrypt the password, it is required to use

initially -encrypt to encrypt your password first

-PWDNE: followed by the password

-type: followed by the DBMS type < MSSQL | ORACLE | MySQL | SAPHana | DB2 >. The parameter

is mandatory.

-queryfile: followed by the path to the query. This parameter is mandatory

If you want to execute a query with parameters, he can use -params.

-params: used with -query or -queryfile as in Figure 41 and Figure 42. The user can define

maximum 9 parameters, which are separated by comma.

Example: -params:@param1=5000,@param2=1000.

Every parameter defined will be replaced in the query, meaning @param1 will be replaced

with 5000 and @param2 will be replaced with 1000.

Figure 52 - Profile and Query Parameters

Parameters for informix:

-protocol: Can have the following values: drsocssl, drsoctcp, drtlitcp, onipcshm, onipcstr, ontlitcp,

onsocssl, onsoctcp, onsocimc, ontliimc, onsqlmux

-server: The server name

Page 37: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 37 of 41

-service: TCP/IP service name. If it does not work with the Service Name, you can try adding the

port number in this section.

Figure 53 - Manually Specified Parameters

3.2.3 Debug

You can use the parameters with the -debug option. That will enable you to see the query result

without XML transformation.

Figure 54 - Debug

Page 38: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 38 of 41

4 PRTG IMPLEMENTATION

Implementation into PRTG is done through Custom Sensors.

4.1 Adding a custom sensor in PRTG

To add a custom sensor in PRTG, the following steps are needed:

1) Create a new Sensor

This can be done in one of two ways:

- Right click the device on which you need the new sensor and select the option Add Sensor

Figure 55 - Add Sensor 1

Page 39: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 39 of 41

- Open the Device and click on Add Sensor

Figure 56 - Add Sensor 2

2) Configure the Sensor

When creating the Sensor, you have the option to search for the type of Sensor that you need.

In this case, you will need the EXE/Script Advanced

Figure 57 - EXE/Script Advanced

Page 40: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 40 of 41

After selecting the sensor type, you will be prompted to fill in the sensor details.

Figure 58 - Sensor Settings

The following will need to be specified:

- Sensor Name

- EXE/Script – select the PRTG_DB_Plugin.exe

- Parameters – use parameters generated by DB Plugin UI or if you don’t have proper Profile

created, use full set of parameters as documented within the PRTG_DB_Plugin.exe console

application.

3) Review the Sensor

After clicking on Create, you will be automatically redirect back to the device page created sensor.

Here, you can review the sensor and the channels within it and ensure that it is configured as

desired.

4.2 Mentions

4.2.1 Recommendations

- The PRTG Custom sensor does not support more than 50 channels officially. Paessler

recommends a maximum number of 40 channels per sensor. Although it is possible to have

more channels in a sensor, it generally makes the sensor less senseful.

- Paessler recommends Windows 2012 R2 or newer on the monitoring system for this kind of

sensor’s optimal performance.

Page 41: PRTG DB Plugin - corp-it.ch DB Plugin User Manua… · PRTG DB Plugin UI can be used on multiple servers with the same license and database. If the PRTG Network Monitor is not installed

PRTG DB Plugin

CORP-IT +41 55 417 4744 Seedammstrasse 3, 8808 Pfäffikon [email protected] 9/17/2019 Switzerland www.corp-it.ch Page 41 of 41

4.2.2 Limitations

- The PRTG Custom Sensor Channel can hold only values which are numeric (integers or floats).

To display text values, you would need to use lookup tables, these can be configured within the

query channel_settings directly.

- The executable file (PRTG_DB_Plugin.exe) must be stored on the system of the probe the

sensor is created on. If used on a remote probe, the file must be stored on the system running

the remote probe. In a cluster setup, please install the plugin on every cluster node.