Configuration Reference¶
This document provides a comprehensive reference for all configuration options available in the Meraki Dashboard Exporter.
Overview¶
The exporter can be configured using environment variables. All configuration is based on Pydantic models with built-in validation.
Environment Variable Format¶
Configuration follows a hierarchical structure using environment variables:
- All settings:
MERAKI_EXPORTER_{SECTION}__{SETTING} - Double underscore (
__) separates nested configuration levels
Environment Variable Examples
Meraki Settings¶
Core Meraki API configuration
| Environment Variable | Type | Default | Description |
|---|---|---|---|
MERAKI_EXPORTER_MERAKI__API_KEY | SecretStr | _(required)_ | Meraki Dashboard API key |
MERAKI_EXPORTER_MERAKI__ORG_ID | str | None | _(none)_ | Meraki organization ID. For v1 the single-organization contract applies (one poller instance = one organization): when the API key sees exactly one org it is auto-selected and org_id may be omitted; when the key sees several orgs, set org_id explicitly (startup fails fast on an ambiguous multi-org key). See discovery.py/app startup. |
MERAKI_EXPORTER_MERAKI__API_BASE_URL | str | https://api.meraki.com/api/v1 | Meraki API base URL (use regional endpoints if needed) |
MERAKI_EXPORTER_MERAKI__ALLOW_CUSTOM_API_BASE_URL | bool | False | Explicitly allow an HTTPS Meraki API base URL outside the known regional origins |
Logging Settings¶
Logging configuration
| Environment Variable | Type | Default | Description |
|---|---|---|---|
MERAKI_EXPORTER_LOGGING__LEVEL | str | INFO | Logging level (case-insensitive; normalised to upper-case) |
MERAKI_EXPORTER_LOGGING__LOG_FORMAT | str | json | Structured-log renderer: 'json' (default) or 'logfmt'. JSON is the default because the primary sinks (Loki/ELK/CloudWatch) parse it cheaply and the multi-line exception field becomes valid nested JSON; set 'logfmt' for human-readable console output (#640). |
API Settings¶
Configuration for Meraki API interactions
| Environment Variable | Type | Default | Description |
|---|---|---|---|
MERAKI_EXPORTER_API__MAX_RETRIES | int | 3 | Maximum number of retries for API requests (min: 0, max: 10) |
MERAKI_EXPORTER_API__TIMEOUT | int | 30 | Per-request API timeout in seconds (SDK single_request_timeout). Note this applies to EACH page request, so a total_pages='all' bulk fetch may make many such requests; the overall fetch is additionally bounded by per_fetch_deadline_seconds. Reviewed for large-org bulk fetches (#556): kept at 30s (raise only if large-org page latencies are observed to exceed it). (min: 10, max: 300) |
MERAKI_EXPORTER_API__CONCURRENCY_LIMIT | int | 5 | Max in-flight sub-requests within a SINGLE collector's fan-out (the ManagedTaskGroup bound in device/network_health/organization collectors). This caps concurrency BREADTH (in-flight memory + SDK executor-thread pressure), which is distinct from the client-side AIMD rate limiter that caps request RATE: the limiter paces how fast requests leave, this caps how many are outstanding at once. Both are needed. Not to be confused with collectors.max_concurrent_collectors, which bounds how many collector loops run at once globally (#636). (min: 1, max: 20) |
MERAKI_EXPORTER_API__BATCH_SIZE | int | 20 | Default batch size for API operations (min: 1, max: 100) |
MERAKI_EXPORTER_API__DEVICE_BATCH_SIZE | int | 20 | Batch size for device operations (min: 1, max: 100) |
MERAKI_EXPORTER_API__NETWORK_BATCH_SIZE | int | 30 | Batch size for network operations (min: 1, max: 100) |
MERAKI_EXPORTER_API__CLIENT_BATCH_SIZE | int | 20 | Batch size for client operations (e.g., MR client metrics) (min: 1, max: 100) |
MERAKI_EXPORTER_API__BATCH_DELAY | float | 0.5 | Delay between batches in seconds (min: 0.0, max: 5.0) |
MERAKI_EXPORTER_API__RATE_LIMIT_RETRY_WAIT | int | 5 | Wait time in seconds when rate limited (min: 1, max: 60) |
MERAKI_EXPORTER_API__ACTION_BATCH_RETRY_WAIT | int | 10 | Wait time for action batch retries (min: 1, max: 60) |
MERAKI_EXPORTER_API__VALIDATE_KWARGS | bool | False | When True, the Meraki SDK logs warnings if API methods are called with unrecognized kwargs. Recommended for dev/CI; off by default in production. |
MERAKI_EXPORTER_API__REQUESTS_PROXY | str | None | _(none)_ | HTTPS proxy URL for Meraki API requests (SDK requests_proxy); when unset the requests HTTPS_PROXY/NO_PROXY env vars still apply. |
MERAKI_EXPORTER_API__CERTIFICATE_PATH | str | None | _(none)_ | Path to a custom CA bundle for verifying the Meraki API TLS cert (SDK certificate_path); mount into read-only containers as a volume. |
MERAKI_EXPORTER_API__RATE_LIMIT_ENABLED | bool | True | Enable client-side rate limiting to smooth API calls |
MERAKI_EXPORTER_API__RATE_LIMIT_REQUESTS_PER_SECOND | float | 10.0 | Target requests per second per organization (min: 1.0, max: 50.0) |
MERAKI_EXPORTER_API__RATE_LIMIT_BURST | int | 10 | Token bucket burst capacity per organization. Defaults to Meraki's documented +10 first-second allowance; refill supplies the sustained rate separately. (min: 1, max: 100) |
MERAKI_EXPORTER_API__RATE_LIMIT_SHARED_FRACTION | float | 0.8 | Fraction of the org API call budget this exporter is allowed to consume. Defaults to 0.8 so ~20% headroom is left for other consumers of the same org budget (dashboards, other tools, humans); set to 1.0 to claim the whole budget (#550). (min: 0.1, max: 1.0) |
MERAKI_EXPORTER_API__RATE_LIMIT_JITTER_RATIO | float | 0.1 | Jitter ratio applied to client-side rate limiter waits (min: 0.0, max: 0.5) |
MERAKI_EXPORTER_API__SMOOTHING_ENABLED | bool | True | Spread batch work across the collection interval |
MERAKI_EXPORTER_API__SMOOTHING_WINDOW_RATIO | float | 0.8 | Fraction of the collection interval used for smoothing (min: 0.1, max: 1.0) |
MERAKI_EXPORTER_API__SMOOTHING_MIN_BATCH_DELAY | float | 1.0 | Minimum delay between batches when smoothing (min: 0.0, max: 60.0) |
MERAKI_EXPORTER_API__SMOOTHING_MAX_BATCH_DELAY | float | 15.0 | Maximum delay between batches when smoothing (min: 0.0, max: 300.0) |
MERAKI_EXPORTER_API__MS_PORT_STATUS_USE_ORG_ENDPOINT | bool | True | Use org-level switch port status endpoint for MS status metrics |
MERAKI_EXPORTER_API__MS_PORT_USAGE_INTERVAL | int | 600 | Minimum seconds between per-switch port usage/POE refreshes (min: 0, max: 3600) |
MERAKI_EXPORTER_API__MS_PACKET_STATS_INTERVAL | int | 600 | Minimum seconds between per-switch packet stats refreshes (min: 0, max: 3600) |
MERAKI_EXPORTER_API__CLIENT_APP_USAGE_INTERVAL | int | 600 | Minimum seconds between client application usage refreshes (min: 0, max: 3600) |
MERAKI_EXPORTER_API__CLIENT_SIGNAL_QUALITY_INTERVAL | int | 600 | Minimum seconds between per-client wireless signal-quality refreshes (min: 0, max: 3600) |
MERAKI_EXPORTER_API__CLIENT_SIGNAL_QUALITY_MAX_CLIENTS | int | 200 | Maximum wireless clients queried for signal quality per network per cycle (0 disables the cap). Bounds the sequential per-client API fan-out. (min: 0, max: 5000) |
MERAKI_EXPORTER_API__RETRY_AFTER_MAX_SECONDS | int | 60 | Upper bound (seconds) honoured for a server-sent Retry-After header when backing off a throttled (429/503) request. Caps pathological Retry-After values so a single throttled request cannot stall a collection cycle indefinitely. (min: 1, max: 3600) |
MERAKI_EXPORTER_API__EXECUTOR_WORKERS | int | 10 | Size of the thread pool used to run the synchronous Meraki SDK off the event loop (the asyncio.to_thread executor). Bounds the number of concurrent blocking SDK calls independently of the per-collector API concurrency limit. (min: 1, max: 100) |
MERAKI_EXPORTER_API__PER_FETCH_DEADLINE_SECONDS | int | 120 | Wall-clock deadline (seconds) for a single logical fetch, including all paginated page requests made under total_pages='all'. Sits between the SDK per-request timeout (see 'timeout') and the per-collector timeout so a slow bulk fetch fails fast instead of consuming the whole collector budget. (min: 1, max: 600) |
Server Settings¶
HTTP server configuration for the metrics endpoint
| Environment Variable | Type | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MERAKI_EXPORTER_SERVER__HOST | str | 0.0.0.0 | Host to bind the exporter to | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MERAKI_EXPORTER_SERVER__PORT | int | 9099 | Port to bind the exporter to (min: 1, max: 65535) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
MERAKI_EXPORTER_SERVER__API_TOKEN | SecretStr | None | _(none)_ | Bearer token required to enable state-changing POST control endpoints (/api/collectors/trigger, /api/clients/clear-dns-cache). When unset (default) these endpoints fail closed with HTTP 401 and their UI controls are disabled. When set, the browser controls are hidden and requests must present 'Authorization: Bearer MERAKI_EXPORTER_SERVER__UI_ENABLEDboolTrueWhen false, sensitive GET UI/status endpoints return 404 (metrics/health/ready stay open). | Webhook Settings¶Webhook receiver configuration
Webhooks are received on OpenTelemetry Settings¶OpenTelemetry observability configuration
Monitoring Settings¶Internal monitoring and alerting configuration
Collector Settings¶Enable/disable specific metric collectors
Client Settings¶Client data collection and DNS resolution settings
Cardinality Settings¶Metric cardinality guard (series-per-family caps and shedding)
Scheduler Settings¶Adaptive budget-aware endpoint scheduler (AIMD, stretch, resolve cadence)
Network Filter Settings¶Restrict which networks are scraped by name glob, ID, or tag
All fields default to empty, which leaves the filter inactive (every network in every configured org is scraped). If any |