# meraki-naemon Python3 Script for pulling Meraki device info into Nagios & Nagios-derived monitoring systems usage: meraki_api.py [-h] -k API_KEY -d {switch,ap} -t {license,uplink,port,latency,ssid,failconn,connassoc,connauth,conndhcp,conndns,connsucc,clients} [-o ORGID] [-n NETWORKID] [-s SERIAL] [-w SSID] [-p PORT] Information from Meraki Dashboard API (https://api.meraki.com/api/v0). For full documentation on the Meraki Dashboard API please see: - https://dashboard.meraki.com/api_docs - https://documenter.getpostman.com/view/897512/meraki-dashboard-api/2To9xm **Required Arguments**: -k API_KEY, --api-key API_KEY API key obtained from Meraki Dashboard admin account -d {switch,ap}, --device {switch,ap} Device type to be queried (Wireless AP or Switch) -t {license,uplink,port,latency,ssid,failconn,connassoc,connauth,conndhcp,conndns,connsucc,clients}, --type {license,uplink,port,latency,ssid,failconn,connassoc,connauth,conndhcp,conndns,connsucc,clients} **Supplemental arguments**: -o ORGID, --orgid ORGID Organization ID API Call (retrieve orgid[s]): GET /organizations -n NETWORKID, --networkid NETWORKID Network ID API Call (retrieve network id[s]): GET /organizations//networks -s SERIAL, --serial SERIAL Meraki Device Serial Number, e.g., ABCD-1234-EF56 API Call (retrieve serial number[s]): GET /networks//devices -w SSID, --ssid SSID Specify the SSID by integer, e.g., 0 API Call (retrieve SSID number[s]): GET /networks//ssids -p PORT, --port PORT Switch port number API Call (retrieve stats for all switch ports): GET /devices//switchPorts **EXPLANATION & USAGE** I. All devices license: Expiration of Meraki device license -t license -o uplink: Status of Meraki device connection to the cloud -t uplink -n -s II. Switch Options port: Get status on an individual switchport -t port -s -p III. AP Options latency: Latency stats over the past hour per AP -t latency -n -s ssid: Status of configured SSID(s) -t ssid -n -w <#> failconn: Number of failed connections over the past hour -t failconn -n connassoc, connauth, conndhcp, conndns, connsucc: Connection stats per AP over the past hour at different stages -t [connassoc, connauth, conndhcp, conndns, connsucc] -n -s clients: Number of connected clients per AP within the past 2 hours -t clients -s