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:

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: false

Then restart the agent:

Shell
docker restart dd-agent

Configure 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:

YAML
# /etc/datadog-agent/conf.d/myapp.d/conf.yaml
logs:
  - type: file
    path: /var/log/myapp/*.log
    service: my-application
    source: python

Mount the log directory into the agent container:

Shell
-v /var/log/myapp:/var/log/myapp:ro

Query 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 database

Attribute search

Filter by specific log attributes using the @ prefix:

@user_id:12345
@request_id:abc-123
@duration:>500

Reserved attributes

These attributes have special handling and don't need the @ prefix:

AttributeDescription
serviceThe service that generated the log
statusLog level (debug, info, warn, error, fatal)
hostThe originating host
sourceLog source (e.g., python, java, nginx)
environmentDeployment environment
messageThe log message body
trace_idCorrelated trace identifier
span_idCorrelated span identifier

Example:

service:api-gateway status:error

Boolean operators

Combine conditions with AND, OR, and NOT:

service:api-gateway AND status:error
status:warn OR status:error
NOT source:healthcheck

Wildcards and ranges

service:user-*
@duration:[100 TO 500]
@response_code:>=400

Tag search

Filter by tags attached to logs:

env:production
region:us-east-1
Combine with time ranges

Use 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.