> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/gcp-postgresql-instance-database-flag-log-min-messages-is-not-set-to-warning-or-higher.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# GCP PostgreSQL instance database flag log\_min\_messages is not set to Warning or higher

### Synopsis

| Field               | Value                                                                                    |
| ------------------- | ---------------------------------------------------------------------------------------- |
| Rule Type           | Detection                                                                                |
| Finding Type        | GCP PostgreSQL instance database flag log\_min\_messages is not set to Warning or higher |
| Finding ID          | 60000429                                                                                 |
| Generates a Finding | This detection rule also generates a finding                                             |
| Severity            | Low                                                                                      |
| Category            | CONFIGURATION                                                                            |
| Cloud Providers     | GCP                                                                                      |
| Platform Module     | CSPM                                                                                     |
| Asset Types         | GOOGLE\_CLOUD\_SQL\_DB\_INSTANCE                                                         |
| ATT\&CK Tactic      | TA0112 (TA0112)                                                                          |
| ATT\&CK Technique   | T1685 (T1685)                                                                            |

### Description

Insufficient logging in GCP PostgreSQL instances exposes them to security risks. A misconfiguration where the 'log\_min\_messages' flag is not set or is set to an insufficient logging level prevents the recording of crucial database events.

The 'log\_min\_messages' flag within the PostgreSQL instance configuration dictates the level of detail logged for database activity. Setting it to a low level, such as 'WARNING' or 'ERROR', limits the visibility into potential malicious activities like unauthorized access attempts or data breaches. This lack of granular logging hinders incident response and forensic analysis, making it difficult to detect and respond to security incidents effectively.

The impact of this misconfiguration is a significant reduction in the organization's ability to detect and respond to security incidents. Detailed logs are crucial for security monitoring, incident investigation, and compliance auditing. Inadequate logging can lead to delayed detection of attacks, compromised data, and difficulty in meeting regulatory requirements. Setting the 'log\_min\_messages' flag to a higher level provides comprehensive logging for better security posture.

To mitigate this, set the 'log\_min\_messages' flag to an appropriate level according to the organization's logging policy. Regularly review and update the logging level as needed.

### Remediation

**Manual steps:**

Google Cloud SQL DB Instance - Manual remediation steps:

1. Log in to the GCP console
2. Navigate SQL Instances page
3. Click on the reported PostgreSQL instance
4. Click 'EDIT'

   NOTE: If the instance is stopped, you need to START the instance first to edit the configurations, then click on 'EDIT'.
5. Under the 'Flags and parameters' section, click on 'ADD A DATABASE FLAG'. Choose the flag 'log\_min\_messages' from the drop-down menu and set the value to any of these values : warning, error, log, fatal, and panic.
6. Click 'Save'


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/gcp-postgresql-instance-database-flag-log-min-messages-is-not-set-to-warning-or-higher.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
