MIKRO005 - MikroTik REST API Not Available
Agent error code #MIKRO005 indicates that the agent reached the host but did not find the RouterOS REST API at the expected path. Either the REST API is disabled, the device is running an older RouterOS version that predates REST, or the hostname is pointing at something other than a RouterOS device.
The REST API was introduced in RouterOS v7. RouterOS v6 does not have it. Integrations against v6 require the older API protocol, which Knocknoc does not currently use.
Steps to Resolve
Confirm the RouterOS Version
- SSH into the router and run
/system resource print, or check System > Resources in WebFig - The
versionfield must be7.xor newer - If the device is on RouterOS v6, upgrade to v7 or use the EDL (Passive) Knoc type with a
/ip firewall address-listimport on a timer instead
Enable the www-ssl Service
- In RouterOS, go to IP > Services
- Enable
www-ssl - Note the port (default
443) and update the RouterOS URL field in the Knocknoc backend to match
Confirm You Are Hitting the Right Host
- From the agent host, run:
curl -ku '<user>:<pass>' https://<router-host>/rest/system/resource - The response should be JSON containing a
versionfield - If you get an HTML page, a different JSON shape, or a
404 not found, the URL is pointing at something other than RouterOS REST
Still Having Issues?
We can help you out, contact us at support@knocknoc.io.