Log Ingestion Settings
Metoro provides granular control over which logs are sent from your cluster for ingestion. You can configure inclusion and exclusion patterns to manage your log data effectively.
Overview
Log ingestion settings allow you to:
- Include only specific logs that match certain patterns
- Exclude sensitive or unnecessary logs from being sent out of your cluster
- Apply filters based on services or namespaces
- Control log ingestion across different environments
Configuring Log Filters
You can configure log filters from the settings page under the Data Ingestion Settings -> Log Filters tab.
Each log filter consists of:
- Include/Exclude Pattern: Choose whether to include or exclude logs that match your filter
- Environment Selection: Apply the filter to specific environments or all environments
- Filter Type: Choose between filtering by specific services or namespaces
- Pattern Matching: Define regex patterns in re2 to match log content
Include Filters
Include filters allow you to specify which logs should be sent to Metoro. Only logs matching these patterns will be sent out of your cluster. This is useful when you want to:
- Only collect logs from specific services
- Only ingest logs containing certain patterns
- Limit log ingestion to specific namespaces
Exclude Filters
Exclude filters prevent matching logs from being sent to Metoro. This is useful for:
- Protecting sensitive data
- Reducing noise from verbose logging
- Managing ingestion costs
- Filtering out unnecessary debug logs
Best Practices
- Start with Broad Patterns: Begin with broader patterns and refine them based on your needs
- Test Your Patterns: Use the regex pattern carefully to ensure you’re not accidentally excluding important logs
- Regular Review: Periodically review your filters to ensure they still align with your needs
- Adjust log alerts: If you have log alerts set up, make sure they are up to date with your log filters
Examples
Here are some common use cases for log filters:
- Exclude Sensitive Data
This filter will exclude logs containing the pattern password=.*
from the auth-service
service in authorization
namespace in all environments.
- Include Only Error Logs
This filter will include logs containing the patterns ERROR
or FATAL
from all services in the namespaceX
namespace in all environments.
- Exclude Debug Logs
This filter will exclude logs containing the pattern DEBUG
from all services in the dev
environment.
Was this page helpful?