---
title: Set up Meraki Dashboard API monitoring
source: https://docs.newrelic.com/docs/network-performance-monitoring/setup-performance-monitoring/meraki-api-polling
---

You can use New Relic's network monitoring agent to watch your Meraki environment.

![A screenshot showing the meraki dashboard UI in New Relic](https://docs.newrelic.com/images/synthetic_screenshot-full_meraki-dashboard.webp "meraki dashboard")

## Get started

Before you begin, make sure you have the New Relic, Docker, Podman, Meraki, and Network security prerequisites:

-   A New Relic account.
-   A New Relic license key.
-   [Docker](https://docs.docker.com/engine/install) or [Podman](https://podman.io/docs/installation) installed on a Linux host.
-   Ability to launch new containers via command line.
-   [Meraki Dashboard API key](https://documentation.meraki.com/General_Administration/Other_Topics/Cisco_Meraki_Dashboard_API#Generate_API_Key) for authentication.

### Network firewall rules [#prerequisites-network]

| Direction | Source         | Destination                                                                                                                                                                     | Ports         | Protocol | Required |
| --------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -------- | -------- |
| Outbound  | Container host | `ktranslate` image on [Docker Hub](https://hub.docker.com/r/kentik/ktranslate), [Quay.io](https://quay.io/repository/kentik/ktranslate), or your company's internal repository. | 443           | TCP      | ✓        |
| Outbound  | Container host | [New Relic Metric API](https://docs.newrelic.com/docs/data-apis/ingest-apis/metric-api/introduction-metric-api/#requirements) Endpoint: `https://metric-api.newrelic.com`       | 443           | TCP      | ✓        |
| Outbound  | Container host | [New Relic Event API](https://docs.newrelic.com/docs/data-apis/ingest-apis/event-api/introduction-event-api#requirements) Endpoint: `https://insights-collector.newrelic.com`   | 443           | TCP      | ✓        |
| Outbound  | Container host | [New Relic Log API](https://docs.newrelic.com/docs/logs/log-management/log-api/introduction-log-api/#endpoint) Endpoint: `https://log-api.newrelic.com`                         | 443           | TCP      |          |
| Outbound  | Container host | [Meraki Dashboard API](https://documentation.meraki.com/General_Administration/Other_Topics/Cisco_Meraki_Dashboard_API#API_Requests) endpoint: `https://api.meraki.com/api/v1/` | 443 (default) | TCP      | ✓        |

## Installation [#installation]

You can add Meraki Dashboard API monitoring to an existing SNMP container, or deploy it in a dedicated container and keep it separate from your other SNMP devices. Select the option below that best matches your use case:

### Existing SNMP Docker container

1.  In your existing configuration file for the SNMP agent, manually add the Meraki device object. Replace `$MERAKI_DASHBOARD_API_KEY` with your [Meraki Dashboard API key](https://documentation.meraki.com/General_Administration/Other_Topics/Cisco_Meraki_Dashboard_API#Generate_API_Key):

    ```yaml
    devices:
      meraki_cloud_controller:
        device_name: meraki_cloud_controller
        device_ip: snmp.meraki.com
        provider: meraki-cloud-controller
        ext:
          ext_only: true
          meraki_config:
            api_key: "$MERAKI_DASHBOARD_API_KEY"
    ```

    > #### 💡 TIP
    >
    > This is a basic example. You can find additional configuration options in our [advanced configuration doc](https://docs.newrelic.com/docs/network-performance-monitoring/advanced/advanced-config/).

2.  Stop and remove the existing container:

    ```shell
    # Find your current container
    docker ps -a

    # Forcibly stop and delete the target container (you may also use the container ID here in place of the name)
    docker rm -f $CONTAINER_NAME
    ```

3.  Start a fresh container with the updated configuration file. Replace `$CONTAINER_SERVICE` with a unique name for the container and substitute`$YOUR_NR_LICENSE_KEY` and `$YOUR_NR_ACCOUNT_ID` with your values. In this example, it's assumed the default configuration file has the name `snmp-base.yaml`:

    ```shell
    docker run -d --name ktranslate-$CONTAINER_SERVICE \
      --restart unless-stopped --pull=always -p 162:1620/udp \
      -v `pwd`/snmp-base.yaml:/snmp-base.yaml \
      -e NEW_RELIC_API_KEY=$YOUR_NR_LICENSE_KEY \
      kentik/ktranslate:v2 \
      -snmp /snmp-base.yaml \
      -nr_account_id=$YOUR_NR_ACCOUNT_ID \
      -metrics=jchf \
      -tee_logs=true \
      -service_name=$CONTAINER_SERVICE \
      -snmp_discovery_on_start=true \
      -snmp_discovery_min=180 \
      nr1.snmp
    ```

### Dedicated Meraki API Docker container

1.  On a Linux host with Docker installed, use the text editor of your choice to create the configuration file you'll use to run the container. Replace `$MERAKI_DASHBOARD_API_KEY` with your [Meraki Dashboard API key](https://documentation.meraki.com/General_Administration/Other_Topics/Cisco_Meraki_Dashboard_API#Generate_API_Key).

    Example using [vim](https://www.vim.org/):

    ```shell
    sudo vim meraki-base.yaml
    ```

    File contents:

    ```yaml
    devices:
      meraki_cloud_controller:
        device_name: meraki_cloud_controller
        device_ip: snmp.meraki.com
        provider: meraki-cloud-controller
        ext:
          ext_only: true
          meraki_config:
            api_key: "$MERAKI_DASHBOARD_API_KEY"
    trap: {}
    discovery: {}
    global:
      poll_time_sec: 300
      timeout_ms: 30000
    ```

    > #### 💡 TIP
    >
    > This is a basic example. You can find additional configuration options in our [advanced configuration doc](https://docs.newrelic.com/docs/network-performance-monitoring/advanced/advanced-config/).

    Update file permissions to allow Docker to make changes as needed:

    ```shell
    chown 1000:1000 meraki-base.yaml
    ```

2.  Start the network monitoring agent to poll the Meraki Dashboard API. Replace `$CONTAINER_SERVICE` with a unique name for the container and substitute `$YOUR_NR_LICENSE_KEY` and `$YOUR_NR_ACCOUNT_ID` with your values. In this example, we've saved our configuration file as 'meraki-base.yaml':

    ```shell
    docker run -d --name ktranslate-$CONTAINER_SERVICE \
      --restart unless-stopped --pull=always --net=host \
      -v `pwd`/meraki-base.yaml:/snmp-base.yaml \
      -e NEW_RELIC_API_KEY=$YOUR_NR_LICENSE_KEY \
      kentik/ktranslate:v2 \
      -snmp /snmp-base.yaml \
      -nr_account_id=$YOUR_NR_ACCOUNT_ID \
      -metrics=jchf \
      -tee_logs=true \
      -service_name=$CONTAINER_SERVICE \
      nr1.snmp
    ```

### Existing SNMP Podman container

1.  In your existing configuration file for the SNMP agent, manually add the Meraki device object. Replace `$MERAKI_DASHBOARD_API_KEY` with your [Meraki Dashboard API key](https://documentation.meraki.com/General_Administration/Other_Topics/Cisco_Meraki_Dashboard_API#Generate_API_Key):

    ```yaml
    devices:
      meraki_cloud_controller:
        device_name: meraki_cloud_controller
        device_ip: snmp.meraki.com
        provider: meraki-cloud-controller
        ext:
          ext_only: true
          meraki_config:
            api_key: "$MERAKI_DASHBOARD_API_KEY"
    ```

    > #### 💡 TIP
    >
    > This is a basic example. You can find additional configuration options in our [advanced configuration doc](https://docs.newrelic.com/docs/network-performance-monitoring/advanced/advanced-config/).

2.  Stop and remove the existing container:

    ```shell
    # Find your current container
    podman ps -a

    # Forcibly stop and delete the target container (you may also use the container ID here in place of the name)
    podman rm -f $CONTAINER_NAME
    ```

3.  Start a fresh container with the updated configuration file. Replace `$CONTAINER_SERVICE` with a unique name for the container and substitute`$YOUR_NR_LICENSE_KEY` and `$YOUR_NR_ACCOUNT_ID` with your values. In this example, we're assuming the default configuration file name of `snmp-base.yaml`:

    ```shell
    podman run -d --name ktranslate-$CONTAINER_SERVICE \
      --userns=keep-id --restart unless-stopped --pull=always --net=host \
      -v `pwd`/snmp-base.yaml:/snmp-base.yaml \
      -e NEW_RELIC_API_KEY=$YOUR_NR_LICENSE_KEY \
      kentik/ktranslate:v2 \
      -snmp /snmp-base.yaml \
      -nr_account_id=$YOUR_NR_ACCOUNT_ID \
      -metrics=jchf \
      -tee_logs=true \
      -service_name=$CONTAINER_SERVICE \
      -snmp_discovery_on_start=true \
      -snmp_discovery_min=180 \
      nr1.snmp
    ```

    > #### ⚠️ IMPORTANT
    >
    > If you haven't already created an `iptables` rule to handle packet redirection for trap messages, you will need to do so with the command:
    >
    > ```shell
    > sudo iptables -t nat -A PREROUTING -p udp --dport 162 -j REDIRECT --to-port 1620
    > ```

### Dedicated Meraki API Podman container

1.  On a Linux host with Podman installed, use the text editor of your choice to create the configuration file you'll use to run the container. Replace `$MERAKI_DASHBOARD_API_KEY` with your [Meraki Dashboard API key](https://documentation.meraki.com/General_Administration/Other_Topics/Cisco_Meraki_Dashboard_API#Generate_API_Key).

    Example using [vim](https://www.vim.org/):

    ```shell
    sudo vim meraki-base.yaml
    ```

    File contents:

    ```yaml
    devices:
      meraki_cloud_controller:
        device_name: meraki_cloud_controller
        device_ip: snmp.meraki.com
        provider: meraki-cloud-controller
        ext:
          ext_only: true
          meraki_config:
            api_key: "$MERAKI_DASHBOARD_API_KEY"
    trap: {}
    discovery: {}
    global:
      poll_time_sec: 300
      timeout_ms: 30000
    ```

    > #### 💡 TIP
    >
    > This is a basic example. You can find additional configuration options in our [advanced configuration doc](https://docs.newrelic.com/docs/network-performance-monitoring/advanced/advanced-config/).

    Update file permissions to allow Podman to make changes as needed:

    ```shell
    chown 1000:1000 meraki-base.yaml
    ```

2.  Start the network monitoring agent to poll the Meraki Dashboard API. Replace `$CONTAINER_SERVICE` with a unique name for the container and substitute `$YOUR_NR_LICENSE_KEY` and `$YOUR_NR_ACCOUNT_ID` with your values. In this example, we have saved our configuration file as 'meraki-base.yaml':

    ```shell
    podman run -d --name ktranslate-$CONTAINER_SERVICE \
      --userns=keep-id --restart unless-stopped --pull=always --net=host \
      -v `pwd`/snmp-base.yaml:/snmp-base.yaml \
      -e NEW_RELIC_API_KEY=$YOUR_NR_LICENSE_KEY \
      kentik/ktranslate:v2 \
      -snmp /snmp-base.yaml \
      -nr_account_id=$YOUR_NR_ACCOUNT_ID \
      -metrics=jchf \
      -tee_logs=true \
      -service_name=$CONTAINER_SERVICE \
      nr1.snmp
    ```

    > #### ⚠️ IMPORTANT
    >
    > If you haven't already created an `iptables` rule to handle packet redirection for trap messages, you will need to do so with the command:
    >
    > ```shell
    > sudo iptables -t nat -A PREROUTING -p udp --dport 162 -j REDIRECT --to-port 1620
    > ```

## What's next

You can set up more agents to complement your Meraki environment data:

-   To get better visibility into how your network is used, [set up network flow data monitoring](https://docs.newrelic.com/docs/network-performance-monitoring/setup-performance-monitoring/network-flow-monitoring).

-   To get insights into system messages from your devices, [setup network syslog collection](https://docs.newrelic.com/docs/network-performance-monitoring/setup-performance-monitoring/network-syslog-monitoring).
