Log Collection
The Datadog Agent can forward logs from your applications and hosts to Moneat. Once ingested, logs are searchable using Datadog-compatible query syntax in the Moneat dashboard.
Enable log collection
Add log configuration to your datadog.yaml:
# datadog.yaml
logs_enabled: true
logs_config:
# Host:port only, without scheme or path. Example: api.moneat.io:443
logs_dd_url: "__MONEAT_BACKEND_URL__"
logs_no_ssl: falseThen restart the agent:
docker restart dd-agentConfigure log sources
To collect logs from specific applications, create a configuration file in the agent's conf.d directory. For example, to collect logs from a file:
# /etc/datadog-agent/conf.d/myapp.d/conf.yaml
logs:
- type: file
path: /var/log/myapp/*.log
service: my-application
source: pythonMount the log directory into the agent container:
-v /var/log/myapp:/var/log/myapp:roQuery syntax
Moneat supports Datadog-compatible log query syntax for searching and filtering. Use these queries in the log search bar in the dashboard.
Full-text search
Search across all log messages:
error connecting to databaseAttribute search
Filter by specific log attributes using the @ prefix:
@user_id:12345
@request_id:abc-123
@duration:>500Reserved attributes
These attributes have special handling and don't need the @ prefix:
| Attribute | Description |
|---|---|
service | The service that generated the log |
status | Log level (debug, info, warn, error, fatal) |
host | The originating host |
source | Log source (e.g., python, java, nginx) |
environment | Deployment environment |
message | The log message body |
trace_id | Correlated trace identifier |
span_id | Correlated span identifier |
Example:
service:api-gateway status:errorBoolean operators
Combine conditions with AND, OR, and NOT:
service:api-gateway AND status:error
status:warn OR status:error
NOT source:healthcheckWildcards and ranges
service:user-*
@duration:[100 TO 500]
@response_code:>=400Tag search
Filter by tags attached to logs:
env:production
region:us-east-1Use the time picker in the dashboard alongside queries to narrow results to a specific window. This dramatically improves query performance on large log volumes.
Log retention
Logs ingested via the Datadog Agent are stored in ClickHouse alongside logs from other sources. Retention periods depend on your plan and deployment configuration. Check Billing & Plans for details.