Configuring PostgreSQL KM database filtering, query, and debug options


After you have registered a PostgreSQL environment in the PATROL console, you can configure filtering options to adjust the data that you receive from each configured PostgreSQL environment.

These filters allow you to set the PostgreSQL databases to filter, the tablespaces to filter, set custom SQL query parameters, and enable debug logging functions.

This information includes:

Before you begin

  • You must have installed and loaded PATROL for PostgreSQL.
  • The operating system user account must have read and execute permissions for the Java Home directory, and full access to the ../Patrol3/pgrkm directory.
  • A PostgreSQL environment must be configured in the PATROL console.

To configure PostgreSQL database filtering options

In the PATROL console hierarchy, select the PostgreSQL KM under the PostgreSQL database. Then, select KM Commands > Filtering...

You can select filtering options for the database or the tablespaces as shown below.

Filtering Options.png

The database and tablespace filtering options are as follows:

 Database filtering options

Filtering mode

By default, there is no filtering of any PostgreSQL databases. To configure a filtering option, select either the Include or Exclude option.

Include/Exclude from monitoring (regex)

Enter the PostgreSQL database to filter. Use commas to separate database names. The input must be in a regex pattern.

Tablespace filtering options

Filtering mode

By default, there is no filtering of any PostgreSQL database tablespaces. To configure a filtering option, select either the Include or Exclude option.

Include/Exclude from monitoring (regex)

Enter the PostgreSQL database tablespace to filter. Use commas to separate database names. The input must be in a regex pattern.

After you have completed configuring the filtering options, click Accept to add these filtering options to the PostgreSQL KM configuration.

To configure custom SQL queries

In the PATROL console hierarchy, select the PostgreSQL KM under the PostgreSQL database. Then, select KM Commands > Custom SQL Query Configuration>Add Custom SQL Query.

Custom SQL Query.png

The custom SQL query parameters are as follows:

 Custom SQL queries

SQL query name

Enter a name for the SQL query.

Note: The name cannot include blank spaces or any of the following special characters: # $ \ ' | ~ ! @ % ^ ; ` ( ) { } ? \ " [ ] + = & : > < * /

Database name

Enter the name of the PostgreSQL database on which this query will be executed.

SQL query 

Enter the SQL query.

Collection time (min) 

Enter the SQL query collection time. The default collection time is 1 minute.

After you have completed configuring the SQL query, click OK to add this custom SQL query to the PostgreSQL KM configuration.

Click Cancel to exit without saving any changes.

You can continue to add more custom queries.

You can also edit or delete a custom query.

  • To edit a custom query, select KM Commands > Custom SQL Query Configuration>Edit Custom SQL Query, change the applicable query details, and click OK.
  • To delete a custom query, select KM Commands > Custom SQL Query Configuration>Delete Custom SQL Query, select the query from the list, and click Yes.

Note

The Execute Query command is not used for the PATROL PostgreSQL KM.

To set the debug option

In the PATROL console hierarchy, select a specific PostgreSQL database environment. Then, select KM Commands > KM Administration>Define Debug Settings.

Environment Debug.png

If you select On/Off and Accept, the specific PostgreSQL environment is enabled/disabled to collect PSL and Java logs.

Debug option.png