Question

Meraki Cloud Devices doesn't get pulled for monitoring when using api or snmp, need help!

  • 20 February 2023
  • 10 replies
  • 197 views

Badge

Hello all,

Going all by the book, following each step on LM support page for meraki cloud monitoring, but no lock getting the devices listed.

snmp v2c, v3 no luck, providing api key from the dashboard just gives me the organizations and their device counts but no luck seeing devices.

Tried using previous existing environment we have, i still can’t get this setup for the customer specifically. Any help?

I also keep getting snmp community connection error, where it says it couldn’t communicate with snmp.

 


10 replies

Userlevel 7
Badge +17

FWIW: we couldn’t use the netscan provided by LM. We had to tweak it:

excludedNetworks = []
import com.santaba.agent.util.GroovyScriptShell
import com.logicmonitor.mod.Snippets
modLoader = GroovyScriptShell.getInstance().getScript("Snippets", Snippets.getLoader()).withBinding(getBinding())
meraki = modLoader.load("cisco.meraki", "0")
def token = "<<<<<your api token here>>>>>"
List<String> orgsAllowed = ['123456789123456789']
Boolean debug = false
orgs = meraki.cachedHttpGet(token, "/organizations")
orgs.each { org ->
def orgId = org.id
if (orgsAllowed != null) {
if (!orgsAllowed.contains(orgId.toString())) {return}
}
def orgName = org.name
def networks = []
def devices = []
try {
networks = meraki.cachedHttpGet(token, "/organizations/${orgId}/networks")
devices = meraki.cachedHttpGet(token, "/organizations/${orgId}/devices")
} catch (Exception error) {
if (debug) println error.message
return
}
networks.each { network ->
def networkId = network.id
if (excludedNetworks.contains(networkId)) {return}
def networkDevices = devices.findAll{it.networkId == networkId}
if (networkDevices.size() == 0) {return}
def networkName = network.name.replaceAll('##','--')
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}##system.categories=NoPing")
}
if (networks.size() > 0) {
println("${orgName.replaceAll('\\W', '')}.invalid##Meraki Org: ${orgName}##meraki.org.name=${orgName}##meraki.org.id=${orgId}##meraki.api.key=${token}")
}
}
apiDevice = ["api.meraki.com", "api.meraki.com", "meraki.api.key=${token}"].join("##")
println(apiDevice)
return 0

Replace the token value with your token value and your orgsAllowed with the orgs you want to discover. Run it in the debug console of the collector that will be doing your collection.

If that only outputs Orgs, there might be something wrong with the permissions on your token.

After you get that working, make sure that SNMP is enabled on the network and put the community string as a property on the discovered network (snmp.community). 

Also, after/if the networks get discovered, you’ll probably need to kick off discovery manually on each network. Not sure why it doesn’t work automatically.

Userlevel 3
Badge +3

@ydurguner, do you happen to have an active support case I could reference?

Badge

@ydurguner, do you happen to have an active support case I could reference?

I currently don’t, should I open one?  As far as I believe this should have worked right out of the box after following the instructions from LM website. I haven’t had a chance to try Stuart’s method below your response.

Badge

@ydurguner, do you happen to have an active support case I could reference?

opened a ticket, request  419551

Userlevel 3
Badge +3

Thanks @ydurguner for opening a support case. 

Userlevel 4
Badge +5

Thank you @Patrick Rouse! Yes, a support ticket is the best route for assistance with your specific environment and needs. 

One thing that might also help is testing API endpoints here: https://developer.cisco.com/meraki/api-v1/

Good starting point is the /organizations endpoint which is mentioned in our setup doc: https://developer.cisco.com/meraki/api-v1/#!get-organizations

LM Meraki setup doc: https://www.logicmonitor.com/support/monitoring/networking-firewalls/cisco-meraki-monitoring

Badge

So, after I realized there was an update available for the lm module for cisco api, I got pulled out all the locations but then it shows device counts, not the devices themselves to be monitored. Using the API key with all the configurations, actual meraki devices can be monitored or not?

snmp.meraki.com with snmp meraki cloud monitoring seems to be no longer applicable to LM. any idea?

Badge

Also, when you add snmp.meraki.com as a monitored resource, what type of device needs to be selected? since meraki cloud monitoring thru snmp, does it fall under other?

 

 

Userlevel 3
Badge +3

@ydurguner this support article explains how to use the Meraki Dashboard API and SNMP to monitor Cisco Meraki Networks.

https://www.logicmonitor.com/support/monitoring/networking-firewalls/cisco-meraki-monitoring

 

Alternatively or additionally, some customers monitor discrete Meraki devices as LM Resources using local SNMP.

Userlevel 2
Badge +1

I’ve enjoyed bringing many Meraki networks into our monitoring over the last month. The newish Cisco_Meraki modules work great, although it took me awhile to create my own standard which I now use to for adding devices:

GROUP Properties needed for SNMP v3:
meraki.api.key = 
meraki.org.id =
meraki.org.name =
snmp.auth = "SHA"
snmp.authToken = auth password
snmp.priv = "AES128"
snmp.privToken = privacy password 

DEVICE Properties needed for SNMP v3:
meraki.network.id = “L/N_...”
meraki.network.name = 
snmp.security = “o/...”
snmp.port = "16100"
snmp.version = "v3" 

system.categories = "MerakiAPINetwork,NoPing" or “MerakiAPIOrg,MerakiAPINetwork,NoPing”

Reply