Meraki Cloud Monitoring

We are using Meraki MX and Ap and switches. I have been told there is a new Meraki cloud integration coming soon. I do not want to monitor 500 devices via snmp. So my question is when is this coming and would it be possible to be part of beta testing for Meraki?

The Meraki checks will be available in checkmk 2.2 which is planned for early Q2 in 2023 with a beta phase starting in february.

Any news regarding the beta phase?

2 Likes

As addition to @aeckstein, it is possible to download daily builds, also from the upcoming 2.2

2 Likes

Ok, I have a demosite of 2.2 now. Started trying the Meraki integration. I have heard there is no docs yet. Has anyone been able to get anything useful? I was hoping I could list my networks, switches and so on.

Tried the latest beta now with the same result. I can wait to the official version and post a bug request as Meraki is still not supported or we can try to fix this now so the Meraki integration works when the stable release is available.

@planet4 send a bug report to feedback-2.2-beta@checkmk.com :slight_smile: it’s specifically for this sort of thing.

@planet4 Have you tryed the Merkai special agent? Setup → Other Integrations → Cisco Meraki?

image

Yes. Like in my image further up in this thread. I was expecting it to fetch my sites and devices but get nothing. However the agent seems to work and gives me no errors. I have tried various settings in the agent but always empty.

I see, did a little debugging my self. There are at least four errors/issues in the special agent.

  1. the key for the org id is not organizationId but id
OMD[cmk22]:~$ /omd/sites/cmk22/share/check_mk/agents/special/agent_cisco_meraki dummy <removed-api-key>

File "/omd/sites/cmk22/local/lib/python3/cmk/special_agents/agent_cisco_meraki.py", line 128, in <listcomp>
  organisation[_API_NAME_ORGANISATION_ID]
  ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^

_API_NAME_ORGANISATION_ID comes from line 32

32 _API_NAME_ORGANISATION_ID: Final = "organizationId" 

this sould be

32 _API_NAME_ORGANISATION_ID: Final = "id" 

with this change we get at least te licenses_overview section

/omd/sites/cmk22/share/check_mk/agents/special/agent_cisco_meraki dummy <removed-api-key> --sections licenses-overview 

<<<cisco_meraki_org_licenses_overview:sep(0)>>>
[
 {"expirationDate": "N/A", "licensedDeviceCounts": {}, "status": "N/A"}, 
 {"expirationDate": "N/A", "licensedDeviceCounts": {}, "status": "N/A"}
]
  1. the key ‘organizationId’ this is expected by the cisco_meraki_org_licenses_overview.py parse function but missing in the above section.

  2. if there are no section to fetch is configured in the agent rule, the agent does nothing. I think by default the agent should fetch all sections.

  3. the item for the services should not be the org id but the org name in my opinion

image

Thanks for the detailed output and testing. I suppose I will have to wait then for the team to fix this.

FYI, we are working on this issue in our current sprint.
Thanks also for the issue analysis. It helps to get started

@gstolz Thoughts on comment 4) regarding services naming from Thomas?

@beermann @Doc Maybe also thoughts from you on that comment regarding naming of the Cisco Meraki services?

Checkmk Werk 15387: agent_cisco_meraki: Fix collecting licenses overview
Checkmk Werk 15389: cisco_meraki_org_licenses_overview: Use NAME/ID as item name

one more issues:

  1. not evry device has a lanIP
    for example
{'name': NAME', 'serial': '1234567890', 'mac': '50:a3:1e:17:20:11', 'networkId': NETWORKID', 'productType': 'appliance', 'model': 'MX64', 'address': 'Germany, 'lat': 40.2., 'lng': 20.1, 'notes': '', 'tags': [], 'wan1Ip': '192.168.178.20', 'wan2Ip': None, 'configurationUpdatedAt': '2023-03-04T20:43:45Z', 'firmware': 'Not running configured version', 'url': 'https://n229.meraki.com/xxxxxxx'}

this leeds to the traceback

 File "/omd/sites/cmk22/local/lib/python3/cmk/special_agents/agent_cisco_meraki.py", line 176, in query
    piggyback=str(device[_API_NAME_DEVICE_LAN_IP]),
                  ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
_API_NAME_DEVICE_LAN_IP: Final = "lanIp"
  1. piggyback data by IP-address

not shure if this is a good idea, As mentioned above not every device has a lanIP. The second issue with this, normaly you have the devices inventorized by name not by IP. I am not entierely shure how the piggyback works, but in my case I got a lot of devices by IP address. I think it would be better to use the device name as every system has one. Or make this configurable.

image

  1. cisco_meraki_org_device_info works, but wrong path

The device info plugin puts the basic device infos in the inventory. So far so good. but the data belong in my opinion not under -> Software -> Applications but more or less under Hardware.

image

Here I am missing OrgID/Name and product type. The address (City, ZIP, …) would also be nice here.

A inventory view to search all this data would be nice.

@TLI

this is one option but very long. Maybe this sould be configurable. And maybe instead of Cisco Meraki Organisation [name/ID] License Overview ‘License Overview [Name/ID]’ is better/shorter. Another option would be use the ID as item and have the name in the info text like License Overview [ID] (info) [name] [rest of info].

I will have a look at the current state as soon as 2.2.0b5 is released :slight_smile:

  1. cisco_meraki_org_device_status.py section name don’t match

The section name needs to be cisco_meraki_org_device_status not cisco_meraki_org_device

<<<<192.168.20.4>>>>
<<<cisco_meraki_org_device_status:sep(0)>>>
[{"components": {"powerSupplies": [{"model": "PWR-MS320-1025WAC", "poe": {"maximum": 740, "unit": "watts"}, "serial": "XXXXXXXX1", "slot": 1, "status": "powering"}, {"model": "PWR-MS320-1025WAC", "poe": {"maximum": 740, "unit": "watts"}, "serial": "XXXXXXXX2", "slot": 2, "status": "powering"}]}, "gateway": "192.168.20.1", "ipType": "static", "lanIp": "192.168.20.4", "lastReportedAt": "2023-04-19T18:08:21.005000Z", "mac": "98:18:88:00:00:01", "model": "MS250-48FP", "name": "devicename", "networkId": "L_1234567890", "organizationId": "09876543", "primaryDns": "192.168.20.1", "productType": "switch", "publicIp": "10.10.10.10", "secondaryDns": null, "serial": "XXXXXXXX3", "status": "online", "tags": ["recently-added"]}]
<<<<>>>>
register.agent_section(
    name="cisco_meraki_org_device",
    parse_function=parse_device_status,
)

register.check_plugin(
    name="cisco_meraki_org_device_status",
    sections=["cisco_meraki_org_device"],
    service_name="Cisco Meraki Device Status",
    discovery_function=discover_device_status,
    check_function=check_device_status,
)

looks like this after fixing

@TLI any reason for not checking the status of the components (in this case the power supplys)?

{"components": {
    "powerSupplies": [
        {"model": "PWR-MS320-1025WAC", ... "serial": "XXXXXXXX1", "slot": 1, "status": "powering"},
        {"model": "PWR-MS320-1025WAC", ... "serial": "XXXXXXXX2", "slot": 2, "status": "powering"}
    ]
}}

I tried the 2.2.0b5 now but it still gives me an error:

[special_cisco_meraki] Agent exited with code 1: Agent failed - please submit a crash report! (Crash-ID: ca640644-e8b8-11ed-bc75-005056a46df7)CRIT, [piggyback] Success (but no data found for this host), execution time 1.7 sec