Configuring PostgreSQL KM database filtering, query, and debug options
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.
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.
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.
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.
If you select On/Off and Accept, the specific PostgreSQL environment is enabled/disabled to collect PSL and Java logs.