Monitoring the Cisco Meraki

CMK version: 2.2
OS version: Linux Raspberry Pi (raw)

Error message:

Output of “cmk -d hostname”: (If it is a problem with checks or plugins)
While running the above command, getting the cisco meraki status, info and license from the command line.

But when I am trying to run the service discovery from the GUI, not getting the services status and info of cisco meraki, only able to retrieve the license overview.

What output does cmk -d hostname yield exactly, and how does the service configuration page in Checkmk look like?

Hello Robin.

After running the command from the site, I am getting the sections/services along with the data.

For example:

<<<cisco_meraki_org_licenses_overview>>>
<<<cisco_meraki_org_device_info>>>
<<<cisco_meraki_org_device_status>>>

But in checkmk GUI only getting the the services.
Check_MK
Check_MK Discovery
Cisco Meraki Licenses ‘org_name/org_id’

Thanks.

@vasu to get the other sections working you need

  • a Dynamic Host Configuration rule to create the devices dynamically in CMK (or you can create them manually under the exact same name as in the Meraki cloud) (Meraki Cloud Monitoring - #25 by thl-cmk)

  • for the cisco_meraki_org_device_info section you need then enable HW/SW inventory.

2 Likes

Hello.

I have more than couple of questions that are flying here and there into my mind :innocent:. After going through documentations and development, I am curious to get some answers/help from your end.
So there doubts are mentioned below :-

  1. I created Dynamic Host Configuration rule in the Enterprise Edition (now finally) for piggyback the data from one host to others which created Meraki hosts automatically but under one folder e.g Main> my_org1 (at the moment). However I have different ‘organization ids’ from Meraki cloud. I want to put filter the information.
    The solution may be ‘regex’ ? Your views on this please or is there any better way?

  2. And I have also enabled the H/W S/W inventory rule but not getting the cisco_meraki_org_section.
    I can see the CPU inventory of my hosts under Monitor>Inventory.

But not the service in the hosts. (due to only three sections of the cisco_meraki agent rules) ?

  1. As for cisco_meraki special agent we have only three sections at the moment:-

License, Status and Temperature Sensor.

Status: Done. (showing in piggyback hosts only)
License: Done, (showing in monitoring hosts only)

Temperature Sensor: Status is Unknown (getting the levels from this plugin under command line omd site, but in checkmk interface showing UNKNOWN and PEND (sometimes) in monitoring host. Configuration of Temperature rule is already done with Sensor under id/item.

Final goal: is to see the port statuses of Meraki Switches from Cloud. As no plugin is implemented from your end at the moment. Is it possible to write that under Sections of special agent meraki in terms of developement end using Python.

Since I got on my monitoring host the status of ports (each as services) using python scripts but those were kind of hardcoaded. One has to put the org_is, network_id, etc. in check_plugins files and then pass the flow to your functions e.g check, parse, discovery functions.

Any ideas how to develop those sections under the special_agent cisco_meraki sections.

Any updates for these long set of questions/queries :slight_smile: will be welcomed.

Thanks in advance :slight_smile:

@vasu not to have too high expectations on the “answers/help from my side”, I am not the developer of the Meraki integration. I just helped a little bit to get it working.

Since dynamic host management is entirely based on the hostname, the only way to move the host to a specific folder depends on your hostnames and regex skills. Depending on the number of your devices (and the dynamics of incoming and outgoing devices), you can move the devices to the correct folder after DCD creates them, or you can create the devices manually (or via bulk import) and not rely on DCD at all.

Another option might be [ cmdbsyncer] from @bkuhn.

You should see the meraki_org section under the host you attached the special agent to (This is basically the license section from the agent) Here you will find a rough overview. For this you do not need the HW/SW inventory. With the HW/SW Inventory enabled you will find at the Meraki devices some Meraki related informatins. This comes from the device status section.

As I do not have any Meraki sensors I can not say anything about this section. So if you can provide me with some agent samples I could have a look at them (If you like as PM).

Jep, for now the Meraki integration provides only the license status per organistation, the device status per host and some inventory data (and of course the sensors section) but not more.

Ideas yes :wink: needs just some time.

1 Like

Another option might be [ cmdbsyncer] from @bkuhn.

In this case, the CMBDSyncer would not be a simple solution. The Syncer needs a Source to get the hosts first. Piggyback Data is not an option. Checkmk himself could, but that I never intended that way. The Syncer would need to query the hosts from Checkmk, and then write them back to the same Checkmk again, but now based on his rules in other Folders. Even that this should work, it’s a lot of overhead you would need to archive what you want. Would not recommend it. Let alone that the Syncer would need to have his own setup.

1 Like

Hello.

Thanks for the info.
Just a quick and typical question :slight_smile:
Can we overwrite the self-written check-plugins (special agent Cisco_meraki :upside_down_face:) ?

Thanks.

the idea was to use the Meraki Cloud as the source I know this needs a new plugin for the syncer…

1 Like

i am not sure what you mean. But of course you can override the build in agent with yor own.

1 Like

Hello.

I have a question regarding Meraki API’s.
As for the Organizations we are retrieving the id and name of organizations using Meraki API key. But where is actually the API end point defined inside the Checkmk. As I went through one of the files on checkmk server inside lib/check_mk/special_agents/agent_cisco_meraki.py.

There is a class Organization()
under Caches Section. But didn’t get the end point defined inside that.
e.g. https://api.meraki.com/api/v1/organizations/

Are we retreiving that from meraki python library using:-

  1. dashboard = meraki.DashboardAPI()
  2. my_orgs = dashboard.organizations.getOrganizations()

Is that right? I am assuming this is the case.

And also where can we store the other API end points from Meraki :slight_smile: (needed for the implementation in local files on checkmk)

And other thing is I want to know is there any config file to store API keys dynamically for meraki API already on the checkmk server.

Thanks.

That is the enpoint definition. It is enclosed/encapsulated by the SDK. I in other words, there is no direct access to the URLs in the special agent.