You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2026-02-02 21:35:40.130 UTC:10.24.155.141(34110):app_user@books_store:[32032]:2:40001:2026-02-02 21:33:19 UTC:25/112:0:693c34cb.2398::psqlERROR: canceling statement due to user request
183
183
```
184
184
185
185
This is done by setting the log_line_prefix param to `%m:%r:%u@%d:[%p]:%l:%e:%s:%v:%x:%c:%q%a`.
186
186
187
-
#### How to configure the log_line_prefix
187
+
#### Configure the log_line_prefix
188
188
189
189
**Self hosted Postgres server**
190
190
@@ -203,11 +203,13 @@ SELECT pg_reload_conf();
203
203
On AWS RDS, you cannot use `ALTER SYSTEM` commands. Instead, configure `log_line_prefix` via RDS Parameter Groups:
204
204
205
205
1. Open the AWS RDS Console → Parameter Groups
206
-
2. Create or modify your parameter group
207
-
3. Set `log_line_prefix` to: `%m:%r:%u@%d:[%p]:%l:%e:%s:%v:%x:%c:%q%a`
208
-
4. Apply the parameter group to your RDS instance
206
+
1. Create or modify your parameter group
207
+
1. Set `log_line_prefix` to: `%m:%r:%u@%d:[%p]:%l:%e:%s:%v:%x:%c:%q%a`
208
+
1. Apply the parameter group to your RDS instance
209
209
210
-
**Note:** Ensure [CloudWatch Logs export is enabled](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.Procedural.UploadtoCloudWatch.html) for `Error log` and `General log` in your RDS instance settings.
210
+
{{< admonition type="note" >}}
211
+
Ensure [CloudWatch Logs export is enabled](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.Procedural.UploadtoCloudWatch.html) for `Error log` and `General log` in your RDS instance settings.
212
+
{{< /admonition >}}
211
213
212
214
#### Check the configuration
213
215
@@ -223,7 +225,7 @@ The `logs` collector only processes logs with timestamps after the collector's s
223
225
224
226
**Behavior:**
225
227
- On startup: Skips logs with timestamps before the collector started
226
-
-Use source component features (like `storage` in `otelcol.receiver.awscloudwatch` or `positions` in `loki.source.file`) to prevent duplicate log ingestion across restarts
228
+
-Relies on the source component features to prevent duplicate log ingestion across restarts
227
229
228
230
## Examples
229
231
@@ -305,11 +307,13 @@ loki.write "logs_service" {
305
307
}
306
308
```
307
309
308
-
**Persistent storage:** Alloy's data path (`--storage.path`) must be persisted across restarts to maintain loki.source.file positions file.
310
+
{{< admonition type="note" >}}
311
+
**Persistent storage:** The {{< param "PRODUCT_NAME" >}} data path (`--storage.path`) must be persisted across restarts to maintain `loki.source.file` positions file.
312
+
{{< /admonition >}}
309
313
310
-
### With otelcol.receiver.awscloudwatch
314
+
### With `otelcol.receiver.awscloudwatch`
311
315
312
-
This needs to be used with`--stability.level=experimental`
316
+
This requires`--stability.level=experimental`
313
317
314
318
```alloy
315
319
// Storage for CloudWatch state persistence
@@ -413,7 +417,7 @@ loki.write "logs_service" {
413
417
}
414
418
```
415
419
416
-
**AWS Credentials:** The `otelcol.receiver.awscloudwatch` component requires AWS credentials. Configure via:
420
+
**AWS Credentials:** The `otelcol.receiver.awscloudwatch` component requires AWS credentials. Configure with:
- Docker: Mount `~/.aws` credentials or pass environment variables
419
423
- Kubernetes: Use [IAM Roles for Service Accounts (IRSA)](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html) or Kubernetes secrets
0 commit comments