PostgreSQL Logs Test
PostgreSQL logs are records of server events that include details about executed queries, configuration warnings, errors, and internal system messages. These logs provide critical insights into the database's behavior, helping administrators detect and resolve issues efficiently. However, if these log messages are ignored, it can lead to serious performance degradation and unresolved issues. A sudden spike in error or panic logs may indicate critical failures that require immediate attention. Additionally, failure to monitor warning or notice messages can result in overlooked performance bottlenecks or improper usage patterns.
This test monitors the number and severity of log messages generated by the PostgreSQL server, including debug, info, notice, warning, error, fatal, and panic messages. By tracking these logs, the test helps proactively detect abnormal behavior, configuration issues, query failures, or potential performance problems.
Target of the test : PostgreSQL server
Agent deploying the test: An internal/remote agent
Outputs of the test :One set of results for every database on the target PostgreSQL server.
Parameter | Description |
---|---|
Test period |
How often should the test be executed |
Host |
The IP address of the host for which this test is to be configured. |
Port |
The port on which the server is listening. The default port is 5432. |
Username |
In order to monitor a PostgreSQL server, you need to manually create a special database user account in every PostgreSQL database instance that requires monitoring. To know how to create such a user based on where the target PostgreSQL server is installed (whether on-premises or hosted on Cloud), refer to How does eG Enterprise Monitor PostgreSQL Server?. |
Password |
The password associated with the above Username (can be ‘NULL’). Here, ‘NULL’ means that the user does not have any password. |
Confirm Password |
Confirm the Password (if any) by retyping it here. |
Log Directory |
Specify the full path to the directory where PostgreSQL stores its server log files, so that the eG agent can access and extract the required metrics. By default, the agent automatically discovers the directory path, but you can provide a specific path if needed. |
DB Name |
The name of the database to connect to. The default is “postgres”. |
SSL |
This indicates that the eG agent will communicate with the PostGreSQL Database via HTTPS or not. By default, this flag is set to No, as the target PostGreSQL database is not SSL-enabled by default. If the target database is SSL-enabled, then set this flag to Yes. |
Verify CA |
If the eG agent is required to establish an encrypted connection with the target PostGreSQL Database server by authenticating the server's identity through verifying the server CA certificate, set Verify CA flag to Yes. By default, this flag is set to No. |
CA Cert File |
This parameter is applicable only if the target PostGreSQL Database is SSL-enabled.The certificate file is a public-key certificate following the x.509 standard. It contains information about the identity of the server, such as its name, geolocation, and public key. Each nodes of the target cluster can have individual certificate files or a single certificate can be used to access all the nodes in the cluster. Essentially, it’s a certificate that the server serves to the connecting users to prove that they are what they claim to be. Therefore, specify the full path to the server root certificate or certificate file that is signed by the CA in .crt file format for all/each node in the CA Cert File text box. For example, the location of this file may be: C:\app\eGurkha\JRE\lib\security\PostGreQL-test-ca.crt. By default, this parameter is set to none. This parameter specification differs according to the type of cluster and configuration: If the certificate file is available for each node of the PostGreSQL Cluster then, provide a comma-seperated list of full path to the certificates in CA Cert File text box: For example:C:\app\eGurkha\JRE\lib\security\postgresql-test-ca.crt,C:\app\eGurkha\JRE\lib\security\postgresql-test-ca2.crt,C:\app\eGurkha\JRE\lib\security\postgresql-test-ca3.crt Specify the full path to the certificate file of the target PostGreSQL Database if a single certificate is used to access all nodes. For example: C:\app\eGurkha\JRE\lib\security\postgresql-test-ca.crt |
Client Cert File |
This parameter is applicable only if the target PostGreSQL Database is SSL-enabled. In order to collect metrics from the target MongoDB cluster, the eG agent requires client certificate in .p12 format. Hence, specify the full path to the Client certificate file in .p12 format in the Client Cert File text box. For example, the location of this file may be: C:\app\eGurkha\JRE\lib\security\test-client.p12. |
Client Key File |
A client key file refers to a file containing the private key that corresponds to the public key used by a client. Provide full path of the file containing client key. |
IsUTF16 |
If UTF-16 encoding is to be used for reading the specified log file, then, set the IsUTF16 flag to true. By default, this flag is set to false. |
DD Frequency |
Refers to the frequency with which detailed diagnosis measures are to be generated for this test. The default is 1:1. This indicates that, by default, detailed measures will be generated every time this test runs, and also every time the test detects a problem. You can modify this frequency, if you so desire. Also, if you intend to disable the detailed diagnosis capability for this test, you can do so by specifying none against DD frequency. |
Detailed Diagnosis |
To make diagnosis more efficient and accurate, the eG Enterprise embeds an optional detailed diagnostic capability. With this capability, the eG agents can be configured to run detailed, more elaborate tests as and when specific problems are detected. To enable the detailed diagnosis capability of this test for a particular server, choose the On option. To disable the capability, click on the Off option. The option to selectively enable/disable the detailed diagnosis capability will be available only if the following conditions are fulfilled:
|
Measurement | Description | Measurement Unit | Interpretation |
---|---|---|---|
Debug messages |
Indicates the number of debug messages logged in the log file during the last measurement period. |
Number |
|
Info messages |
Indicates the number of info messages logged in the log file during the last measurement period. |
Number |
|
Notice messages |
Indicates the number of notice messages logged in the log file during the last measurement period. |
Number |
|
Warning messages |
Indicates the number of warning messages logged in the log file during the last measurement period. |
Number |
|
Errors |
Indicates the number of error messages logged in the log file during the last measurement period. |
Number |
A high value for this measure may indicate problematic queries, invalid user inputs, or application bugs. The detailed diagnosis of this measure lists the Query ID,SQL state,Session ID,Session start time, and Transaction ID. |
Log messages |
Indicates the number of log messages recorded in the log file during the last measurement period. |
Number |
|
Fatal errors |
Indicates the number of fatal errors logged in the log files during the last measurement period. |
Number |
Fatal errors cause session termination. A spike may indicate authentication failures or internal DB issues that must be addressed. The detailed diagnosis of this measure lists the Query ID,SQL state,Session ID,Session start time, and Transaction ID. |
Panic errors |
Indicates the number of panic errors logged in the log files during the last measurement period. |
Number |
Panic errors indicate severe internal failures that force PostgreSQL to shut down. Even a single instance is critical and demands immediate investigation. The detailed diagnosis of this measure lists the Query ID,SQL state,Session ID,Session start time, and Transaction ID. |