Cisco Meraki Monitoring (Legacy)
Last updated on 11 November, 2024Disclaimer: This content applies only to legacy Cisco Meraki modules (for Cisco Meraki Networks). For more information about the latest monitoring solution for Cisco Meraki, see Cisco Meraki Monitoring.
Use the LogicMonitor Cisco Meraki suite to monitor Meraki devices on a per-network level using a hybrid API/SNMP data collection approach. You can monitor API usage and device counts on a per-organization level.
Requirements
- Import the
LogicMonitor_Collector_Snippets
DataSource and apply it to your monitored collector resource to ensure that your collector supports the code in this monitoring suite, or update to EA Collector 32.100 or later. - Enable access to the Meraki Dashboard API.
- In your Meraki environment, navigate to Organization > Settings > Dashboard API access.
- Select Enable access to the Cisco Meraki Dashboard API.
- Generate an API key from the My Profile page. The API key will be assigned to a property within LogicMonitor. Copy the API key in a secure location once it is generated. For more information, see Cisco Meraki Dashboard API.
- Enable SNMP v2c or v3 on the Meraki Cloud Controller. For more information, see SNMP Overview and Configuration.
Creating a Meraki Device Group
From the LogicMonitor Resources page, create a Meraki device group with the following properties. For more information, see Adding Device Groups.
Property | Description |
meraki.api.key | Meraki API key (key must be generated and API must be enabled as discussed in previous section) |
snmp.port | 16100 |
snmp.version | Because LogicMonitor is not querying the devices themselves, but rather the Cloud Controller, it is not able to automatically assign the SNMP version to this property as it typically does for other monitoring operations that leverage SNMP. Be sure to manually assign the corresponding SNMP version (either “v2c” or “v3”) to this property. |
snmp.community (v2c only) snmp.security (v3 only) | These values are generated by Meraki and start with “o/”. |
Other SNMP credentials | The properties required to establish the remaining SNMP credentials vary depending on the SNMP version being used. For more information, see Defining Authentication Credentials. |
Adding Resources to Monitoring
Use an Advanced NetScan to automatically add all relevant devices into monitoring (and auto-assign several required device properties). Or, you can manually add the devices into monitoring.
Adding Resources Using NetScan
To create an Advanced NetScan, see Creating an Advanced NetScan. Apply the following settings to the Advanced NetScan:
- Select Upload a script or csv to discover devices as the Method.
- Select Embed a Groovy script as the scripting option.
- Copy the following Groovy script and paste it into the field provided.
- Insert your API token into the line:
def token = ""
/*******************************************************************************
* © 2007-2024 - LogicMonitor, Inc. All rights reserved.
******************************************************************************/
import com.santaba.agent.groovy.utils.GroovyScriptHelper as GSH
import com.logicmonitor.mod.Snippets
modLoader = GSH.getInstance(GroovySystem.version).getScript("Snippets", Snippets.getLoader()).withBinding(getBinding())
meraki = modLoader.load("cisco.meraki", "0")
// Set this variable to meraki API token.
def token = ''
def urlList = [['https://api.meraki.com/api/v1', 'snmp.meraki.com'], ['https://api.meraki.cn/api/v1', 'snmp.meraki.cn']]
def serviceUrl, snmpUrl
// Optionally, create a list of organizations (e.g. [1243,2343,3564,4355])
// Setting this variable will only discover networks on those orgs.
List<Long> orgsAllowed = null
orgsAllowed = orgsAllowed?.collect{ it.toLong() }
Boolean debug = false
def orgs
urlList.find{ urls ->
try {
orgs = meraki.cachedHttpGet(token, "/organizations", [:], urls[0])
serviceUrl = urls[0]
snmpUrl = urls[1]
}
catch(java.net.ProtocolException ignored){ } //service url didn't work, trying next one
}
orgs.each { org ->
def orgId = org.id
// Filter in only allowed orgs if it's defined.
if (orgsAllowed != null) {
if (!orgsAllowed.contains(orgId.toLong())) {
return
}
}
def orgName = org.name
def networks = []
def devices = []
try {
networks = meraki.cachedHttpGet(token, "/organizations/${orgId}/networks", [:], serviceUrl)
devices = meraki.cachedHttpGet(token, "/organizations/${orgId}/devices", [:], serviceUrl)
} catch (Exception error) {
if (debug) println error.message
return
}
networks.each { network ->
def networkId = network.id
// Check if this network has any devices and avoid reporting deviceless networks.
def networkDevices = devices.findAll{it.networkId == networkId}
if (networkDevices.size() == 0) {
return
}
def networkName = network.name
def networkTags = network.tags.join(",")
def hostName = "${orgName.replaceAll('\\W', '')}.${networkName.replaceAll('\\W', '')}.invalid"
def displayName = "Meraki Network: ${networkName}"
println "${hostName}##${displayName}##meraki.org.name=${orgName}##meraki.org.id=${orgId}##meraki.api.key=${token}##meraki.network.id=${networkId}##meraki.network.name=${networkName}##meraki.network.tags=${networkTags}##meraki.service.url=${serviceUrl}##meraki.snmp.url=${snmpUrl}"
}
// Only add orgs if they have networks.
if (networks.size() > 0) {
println "${orgName.replaceAll('\\W', '')}.invalid##Meraki Org: ${orgName}##meraki.org.name=${orgName}##meraki.org.id=${orgId}##meraki.api.key=${token}##meraki.service.url=${serviceUrl}##meraki.snmp.url=${snmpUrl}"
}
}
def domain = (serviceUrl.split(/\/+/) as List<String>)?.get(1)
apiDevice = [domain, domain, "meraki.api.key=${token}", "meraki.service.url=${serviceUrl}", "meraki.snmp.url=${snmpUrl}"].join("##")
println apiDevice
return 0
- In the Default Group field, enter the Cisco Meraki device group you created.
Note: Your SNMP credentials and Meraki key must be set as properties on this group before running the NetScan. For more information, see Create a Meraki Device Group.
- Select Save or Save & Run.
Manually Add Devices into Monitoring
You can manually add your Meraki devices into monitoring. There are three types of Meraki devices that can be added:
- Network device
- Organization device
- Meraki API device
When adding these devices, assign them to the device group you created previously. For instructions on manually adding resources into monitoring, see Adding Devices.
Network Device
The network device reports per-device and per-interface data for a specific network.
- The network device’s hostname (as entered into the IP Address/DNS name field) must end with
.invalid
. - Network-specific properties must be assigned to the device. For more information, see Assign Properties to Resources.
Organization Device
The organization device reports per-network device counts and API Usage statistics for a specific organization.
- The organization device’s hostname (as entered into the IP Address/DNS name field) must end with
.invalid
. - Organization-specific properties must be assigned to the device. For more information, see Assign Properties to Resources.
Meraki API Device
The Meraki API device reports per-network device counts and API Usage statistics for all organizations on the account.
- The Meraki API device’s hostname (as entered into the IP Address/DNS name field) must be
api.meraki.com
.
Assign Properties to Resources
In addition to the group-level properties you configured, you must also set the following device-level properties in LogicMonitor. If you used a NetScan to add these resources into monitoring, the properties are assigned automatically.
Property | Description |
meraki.org.id | Set this property on organization devices only. For a list of organizations and their respective IDs, visit https://developer.cisco.com/meraki/api-v1/#!get-organizations. |
meraki.network.id | Set this property on network devices only. Enter the organization ID for the organization for which you want to see networks. For a list of networks and their respective IDs, visit https://developer.cisco.com/meraki/api-v1/#!get-organization-networks. |
meraki.service.url | The service URL https://api.meraki.com/api/v1 is used by default. An alternative service url such as https://api.meraki.cn/api/v1 can be specified. |
meraki.snmp.url | The SNMP URL snmp.meraki.com is used by default. An alternative SNMP URL such as snmp.meraki.cn can be specified. |
Note: Set the X-Cisco-Meraki-API-Key header to your API key when running any API requests from https://developer.cisco.com/meraki/api.
Multiple Organizations
Some Meraki configurations can encompass multiple organizations with different SNMP credentials. In such instances, resources belonging to an organization can be grouped by creating a dynamic group for each organization and assigning the specific properties there.
Importing LogicModules
From the LogicMonitor public repository, import all Cisco Meraki LogicModules, which are listed in the LogicModules in Package section of this support article. If these LogicModules are already present, ensure you have the most recent versions.
Once the LogicModules are imported (assuming all previous setup requirements have been met), the suite of Meraki DataSources will automatically begin collecting data.
LogicModules in Package
LogicMonitor’s package for Cisco Meraki consists of the following LogicModules. For full coverage, please ensure that all of these LogicModules are imported into your LogicMonitor platform.
Display Name | Type | Description |
---|---|---|
Access Point Interfaces | DataSource | Monitors Meraki Access Point interface data throughput and packet transmission on a per-network level. |
Access Points | DataSource | Monitors Meraki Access Point client connections and operating status. |
Gateway Interfaces | DataSource | Monitors Meraki Teleworker Gateway interface data throughput and packet transmission on a per-network level. |
Gateways | DataSource | Monitors Meraki Teleworker Gateway client connections and operating status. |
Meraki API Usage | DataSource | Counts Meraki API Usage on a per-org basis. |
Meraki Device Count | DataSource | Count of Meraki devices by organization on a per-network level as well as a total count. |
Meraki Device Count | DataSource | Count of Meraki devices by organization. |
Meraki License Status | DataSource | Reports licensing status of a given organization, of type “co-term”, in Meraki. |
Meraki Licenses | DataSource | Reports licensing status of a given organization in Meraki using the v1 API. This version supports per-device licensing. |
Meraki Troubleshooter | DataSource | Validates configuration of Cisco Meraki devices. |
Meraki_Cloud_Topology | TopologySource | Map Meraki Cloud topologies |
Meraki_Org_Topology | TopologySource | Map Meraki Org topologies |
Security Appliance Interfaces | DataSource | Monitors Meraki Security Appliance interface data throughput and packet transmission on a per-network level. |
Security Appliances | DataSource | Monitors Meraki Security Appliance client connections and operating status. |
Switches | DataSource | Monitors Meraki Switch client connections and operating status. |
Uplink Appliance Status | DataSource | Lists the uplink status of every Meraki MX and Z series appliances in the organization. |
Uplink Loss And Latency | DataSource | Returns the uplink loss and latency for every MX in the organization. |
addCategory_Meraki_API | PropertySource | Identifies if the host is configured for Meraki API access, adds various system auto properties and appropriate system category of based on whether it is an organization or network device. See Cisco Meraki Monitoring for more information. |
addERI_Meraki | PropertySource | Adds ERI’s for Meraki hosts. See Cisco Meraki Monitoring for more information. Requires collector version 30.000 or greater. |
addERI_Meraki_Device | PropertySource | Discover and add meraki specific ERI’s for meraki resources |
addERI_Meraki_Org | PropertySource | Adds ERI’s for Meraki orgs. See Cisco Meraki Monitoring for more information. Requires collector version 30.000 or greater. |
When setting static datapoint thresholds on the various metrics tracked by this package’s DataSources, LogicMonitor follows the technology owner’s best practice KPI recommendations. If necessary, we encourage you to adjust these predefined thresholds to meet the unique needs of your environment. For more information on tuning datapoint thresholds, see Tuning Static Thresholds for Datapoints.
Migration from Legacy DataSources
In June 2022, LogicMonitor updated the Cisco Meraki suite to use the Meraki API v1 and expand topology support for identifying Meraki devices. As part of this update, the Cisco_Meraki_Switch_Interfaces DataSource was deprecated. You can still monitor switch connection status and client count using the Cisco_Meraki_Switches DataSource. For more information, see Deprecated LogicModules.
In June 2020, LogicMonitor released a new suite of Cisco Meraki DataSources to expand monitoring coverage and improve efficiency for future scalability and support. The release of these new DataSources serves to deprecate the following legacy Meraki DataSources:
- Meraki_CloudController_DeviceInventory
- Meraki_MR_Interfaces
- Meraki_MR_Stats
- Meraki_MS_Stats
- Meraki_MX_Interfaces
- Meraki_MX_Stats
- Meraki_Z_Interfaces
- Meraki_Z_Stats
If you are currently monitoring Meraki devices using any of these legacy DataSources, you will not experience data loss upon importing the new DataSources. This is because DataSource names have been changed to eliminate module overwriting.
However, you will collect duplicate data and receive duplicate alerts for as long as both sets of DataSources are active. For this reason, we recommend that you disable the above-listed DataSources after importing the new set of DataSources and confirming that they are working as intended in your environment.
When a DataSource is disabled, it stops querying the host and generating alerts, but maintains all historical data. At some point in time, you may want to delete the legacy DataSources altogether, but consider this move carefully as all historical data will be lost upon deletion. For more information on disabling DataSources, see Disabling Monitoring for a DataSource or Instance.