Skip to main content

Prometheus exporter for Cisco Meraki Dashboard API metrics

Project description

Meraki Dashboard Exporter

FOSSA Status

A Prometheus exporter for Cisco Meraki Dashboard API metrics with OpenTelemetry support.

Features

  • Collects metrics from all Meraki device types (MS, MR, MV, MT, MX, MG)
  • Organization-level metrics (API usage, licenses, device counts)
  • Device-specific metrics (status, performance, sensor readings)
  • Async collection for improved performance
  • OpenTelemetry support for metrics and logs
  • Structured logging with JSON output
  • Docker support with health checks
  • Configurable collection intervals

Quick Start

Using Docker

  1. Copy .env.example to .env and add your Meraki API key:

    cp .env.example .env
    # Edit .env and add your MERAKI_API_KEY
    
  2. Run with Docker Compose:

    docker-compose up -d
    
  3. Access metrics at http://localhost:9099/metrics

Using Python

  1. Install dependencies:

    uv pip install -e .
    
  2. Set environment variables:

    export MERAKI_API_KEY=your_api_key_here
    
  3. Run the exporter:

    python -m meraki_dashboard_exporter
    

Configuration

All configuration is done via environment variables. See .env.example for all available options.

Key Settings

Required

  • MERAKI_API_KEY: Your Meraki Dashboard API key

Optional

  • MERAKI_EXPORTER_ORG_ID: Specific org ID to monitor (monitors all orgs if not set)
  • MERAKI_EXPORTER_LOG_LEVEL: Logging level (default: INFO)
  • MERAKI_EXPORTER_API_BASE_URL: API base URL for regional endpoints (default: https://api.meraki.com/api/v1)
  • MERAKI_EXPORTER_API_TIMEOUT: API request timeout in seconds (default: 30)
  • MERAKI_EXPORTER_API_MAX_RETRIES: Maximum API request retries (default: 4)

Update Intervals

  • MERAKI_EXPORTER_FAST_UPDATE_INTERVAL: Fast tier interval in seconds (default: 60, range: 30-300)
  • MERAKI_EXPORTER_MEDIUM_UPDATE_INTERVAL: Medium tier interval in seconds (default: 300, range: 300-1800)
  • MERAKI_EXPORTER_SLOW_UPDATE_INTERVAL: Slow tier interval in seconds (default: 900, range: 600-3600)

Regional API Endpoints

For users in specific regions, use the appropriate API base URL:

  • Global/Default: https://api.meraki.com/api/v1
  • Canada: https://api.meraki.ca/api/v1
  • China: https://api.meraki.cn/api/v1
  • India: https://api.meraki.in/api/v1
  • US Federal: https://api.gov-meraki.com/api/v1

Example:

export MERAKI_EXPORTER_API_BASE_URL="https://api.meraki.ca/api/v1"  # For Canada region

Metrics

Organization Metrics

  • meraki_org_api_requests_total: Total API requests
  • meraki_org_networks_total: Number of networks
  • meraki_org_devices_total: Number of devices by type
  • meraki_org_licenses_total: License counts by type and status
  • meraki_org_clients_total: Total active clients (5-minute window)
  • meraki_org_usage_total_kb: Total data usage in KB (5-minute window)
  • meraki_org_usage_downstream_kb: Downstream data usage in KB (5-minute window)
  • meraki_org_usage_upstream_kb: Upstream data usage in KB (5-minute window)

Device Metrics

  • meraki_device_up: Device online status
  • meraki_device_uptime_seconds: Device uptime

Switch (MS) Metrics

  • meraki_ms_port_status: Port connection status
  • meraki_ms_port_traffic_bytes: Port traffic counters
  • meraki_ms_port_errors_total: Port error counters

Access Point (MR) Metrics

  • meraki_mr_clients_connected: Connected client count
  • meraki_ap_channel_utilization_*: Channel utilization metrics
  • meraki_network_bluetooth_clients_total: Bluetooth clients detected by MR devices

Sensor (MT) Metrics

  • meraki_mt_temperature_celsius: Temperature readings
  • meraki_mt_humidity_percent: Humidity readings
  • meraki_mt_door_status: Door sensor status
  • meraki_mt_water_detected: Water detection status
  • And more...

Alert Metrics

  • meraki_alerts_active: Number of active alerts by type, category, severity, and device type
  • meraki_alerts_total_by_severity: Total alerts grouped by severity level
  • meraki_alerts_total_by_network: Total alerts per network

Configuration Metrics

  • meraki_org_login_security_*: Various login security settings (see config collector for full list)
  • meraki_org_configuration_changes_total: Total configuration changes in the last 24 hours

Development

Running Tests

uv run pytest

Linting and Type Checking

uv run ruff check .
uv run mypy .

License

MIT

FOSSA Status

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meraki_dashboard_exporter-0.5.0.tar.gz (276.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meraki_dashboard_exporter-0.5.0-py3-none-any.whl (126.8 kB view details)

Uploaded Python 3

File details

Details for the file meraki_dashboard_exporter-0.5.0.tar.gz.

File metadata

File hashes

Hashes for meraki_dashboard_exporter-0.5.0.tar.gz
Algorithm Hash digest
SHA256 e2f9f384e86162acfb730efe4c30eddb42c148d7f83edf7a1ddd26ffba729027
MD5 3d4ca9bd3f17c3db28ef40a88d1ef6b5
BLAKE2b-256 1882b7b157f98a52c30fe1a7b97d41db9a0083dd4d2cfc57f48aa160cb9f5eff

See more details on using hashes here.

Provenance

The following attestation bundles were made for meraki_dashboard_exporter-0.5.0.tar.gz:

Publisher: python-publish.yml on rknightion/meraki-dashboard-exporter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file meraki_dashboard_exporter-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for meraki_dashboard_exporter-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51f4b3b489d553208dc740f8ae32b98a1af1600b0d3129c3846bc4ca9d02da71
MD5 43c269a8aaa23fbf1c0fc64f7a503a35
BLAKE2b-256 456e39a20496641fec3bc994e1e0b80157cacace4c85636f62fa4778efe0b529

See more details on using hashes here.

Provenance

The following attestation bundles were made for meraki_dashboard_exporter-0.5.0-py3-none-any.whl:

Publisher: python-publish.yml on rknightion/meraki-dashboard-exporter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page