Cloudflare DNS Records
Beta Feature
This input is currently in beta. If you run into any issues, please reach out to product@monad.com.
Retrieves DNS records from Cloudflare for DNS management and security monitoring. This input collects DNS record data across all zones in your Cloudflare account, including A, AAAA, CNAME, MX, TXT, NS, SRV, CAA, and other DNS record types for comprehensive domain management and monitoring.
Sync Type: Full Synchronisation
Requirements
- A Cloudflare account with API access
- An API Token with the
Zone:ReadandZone:DNS:Readpermissions - Access to at least one DNS zone
Creating an API Token
- Log in to your Cloudflare dashboard
- Navigate to My Profile > API Tokens
- Click Create Token
- Use the Create Custom Token option
- Configure the token:
- Token name: Give it a descriptive name (e.g., "Monad DNS Records")
- Permissions: Add
Zone>Zone>ReadandZone>DNS>Read - Zone Resources: Select the specific zone(s) or "All zones"
- Click Continue to summary and then Create Token
- Copy the token value (you won't be able to see it again)
Details
- State Management: Each full sync retrieves all current DNS records from all zones. Every run collects the full inventory again, including records that have not changed since the previous run.
- API Endpoints:
GET /zones- Lists all zones in the accountGET /zones/{zone_id}/dns_records- Lists DNS records for a specific zone
- Pagination: Page-based pagination with up to 5,000 records per page, sorted in ascending order.
- Rate Limits: 1,200 requests per 5 minutes (approximately 4 requests per second). The input automatically enforces this limit.
- Multi-Zone: Iterates through the zones in the account and fetches DNS records for each zone.
- Zone limit: When Zone IDs is empty, the input reads only the first 20 zones Cloudflare returns for the token. To collect DNS records from more than 20 zones, list every zone's ID in Zone IDs.
Configuration
Settings
| Setting | Type | Required | Default | Description |
|---|---|---|---|---|
cron | string (cron) | Yes | 0 * * * * | Cron string for scheduling the ingest of your input. eg: 0 0 * * * - Daily at midnight, or */15 * * * * - Every 15 minutes. Defaults to an hour. |
use_synthetic_data | bool | No | false | Generate synthetic data for testing, instead of connecting to a real data source. Defaults to an hourly cron schedule for cron-based inputs. |
zone_ids | array of string | No | - | Optional list of specific Cloudflare zone IDs to fetch DNS records from. If empty, fetches from all zones accessible by the API token. |
rate_limit | object | No | - | Maximum outbound source-API request rate. A blank or zero value falls back to the connector's default rate-limiting behavior. Maximum 4 requests per second. See API Rate Limiting for the field format. |
Secrets
| Secret | Type | Required | Description |
|---|---|---|---|
api_token | secret | Yes | Your Cloudflare API token with Zone |
Rate Limits
| Scope | Limit | Window | Notes |
|---|---|---|---|
| API Requests | 1,200 | 5 minutes | Enforced by Cloudflare |
| Records per page | 5,000 | Per request | Maximum allowed by API |
Headers: Authorization: Bearer {api_token}
Source: Cloudflare API Rate Limits
Troubleshooting
Common Issues
Issue: API returned success=false with authentication error
Cause: The API token is invalid, expired, or lacks the required permissions.
Solution: Verify your API token is correct and has both Zone:Read and Zone:DNS:Read permissions. Create a new token if needed.
Issue: No records returned despite having DNS records Cause: The API token may not have access to your zones, or you have no zones configured. Solution: Verify that your API token has been granted access to the zones you want to monitor. Ensure you have at least one active DNS zone in your Cloudflare account.
Issue: Rate limit exceeded errors Cause: Multiple integrations or manual API calls are consuming the rate limit quota. Solution: The input automatically handles rate limiting. If you see persistent errors, reduce the frequency of other API calls to your Cloudflare account.
Issue: Timeout errors when fetching DNS records Cause: Account has a very large number of DNS records across many zones, exceeding timeout. Solution: The input uses page-based pagination. If timeouts persist, consider checking Cloudflare API status or contacting Cloudflare support for large account configurations.
Related Articles
Sample Record
Code
Sync frequency
This input runs on a cron schedule (default hourly, 0 * * * *), which you can configure on the pipeline.
See Input Sync Frequency for details.
Community transforms
The Monad Transforms Repository has ready-made transforms for this input. Import one into your organization, then add it to a pipeline after this input.
| Format | Transform |
|---|---|
| OCSF v1.9.0 | Cloudflare DNS Records to OCSF v1.9.0 |
| ECS v9.5.0 | Cloudflare DNS Records to ECS v9.5.0 |
| CEF | Cloudflare DNS Records to CEF |
CEF transforms emit an intermediate record; add the CEF Serializer transform after one to produce the CEF:0 string.