Here a very Basic HowTo:
Pretext
There are 2 versions of the Meraki agent
- the built-in agent, shipped with Checkmk since 2.3(?)
- and my extended version
This HowTo is about the extended agent. Some points from the HowTo can also be used for the built-in agent ( Prerequisites, Preparation [except for the Remove..), part of the agent Rules, Check the configuration (except cache files).
Prerequisites
- Meraki API activated in Meraki Dashboard
- Meraki API key from Meraki Dashboard
- The Meraki Organization ID(s) (optional, if you have only one organization)
- Checkmk Server must have access to the Meraki API (internet)
Preparation
- Remove all rules releated to the built-in Merak Agent
- Create a folder for your Meraki devices (optional)
- In this folder
- Create a folder for the Meraki Agent hosts (optional) → AgentFolder
- Create a folder for each of your Meraki organizations → OrgFolder (optional)
- in the AgentFolder create a Checkmk host for each of your Meraki organizations (AgentHosts)
- no ip address
- Checkmk agent / API integrations: Configured API integrations, no Checkmk agent
- create one DCD rule for each of your Meraki organizations
- Restrict source hosts to the AgentHost(s)
- Create hosts in OrgFolder
- Create a stored Password with the Meraki API key
Installation
- update or install the Meraki SDK from Github or as MKP (min. version 1.46.0)
- install the extended Meraki Agent (latest version from thl-cmk.hopto.org)
Meraki Agent Rules
- create one Meraki Agent Rule for each of your Meraki organizations
- Setup → Cisco Meraki:
- API Key the Meraki API key (Stored Password)
- Organizations Meraki OrgID
- Proxy if necessary
- Exclude Sections here you can disable unnneded/unwanted sections → start slow
- Meraki region configure if you have your devices in the Canada/China/India or US Gov. Cloud
- Conditions → Explicit hosts AgentHost
- Setup → Cisco Meraki:
Check the configuration
on the CLI:
cmk -D AgentHosts | grep Program
Program: /omd/sites/site/local/lib/python3/cmk_addons/plugins/meraki/libexec/agent_cisco_meraki --pwstore=2@0@/omd/sites/build/var/check_mk/passwords_merged@meraki_bechtle Meraki'****************************************' --excluded-sections org-switch-ports-statuses --orgs 1234567
Here you should find the actual agent command generated by Checkmk. You can run this as site user to check if the agent can comunicate with the cloud.
The date the agent fetches from the Meraki cloud will be cached under
~/tmp/check_mk/agents/agent_cisco_meraki/<AgentHost>
To see if Checkmk generates piggyback data for your Meraki devices, you can use
cmk -vII AgentHosts
Note the latest version of this HowTo will be now available on my gitlab.
Cheers
Thomas